Enable UEFI Red Hat support on Cobbler (2.6.7) - HOW?
by Ž D
Hallo. I was successful in UEFI boot and install, here are details:
1) Cobbler server : 2.6.9
source: ?, ?
build time: Fri Jun 12 07:42:24 2015
Cobbler is installed on Oracle Linux 6.6
2) I am installing Oracle Linux R6-U6-x86_64 on the Oracle Server x3-2
3) DHCP service is provided by another box, the config is:
host my-hostname.domain.com {
hardware ethernet 00:10:e0:aa:aa:aa;
fixed-address 10.xx.xx.xx;
next-server 10.yy.yy.yy; # my cobbler server
filename "/grub/BOOTX64.efi";
}
4) How to find proper BOOTX64.efi file, read the doc:
http://docs.oracle.com/cd/E37670_01/E41137/E41137.pdf
See the paragraph 1.4.7 (starts on page 9), the page 10 talks about
UEFI-based PXE client.
This is the key: UEFI-based PXE clients can use the BOOTX64.efi boot
loader, which is available as EFI/BOOT/BOOTX64.efi from the Oracle Linux
6 Update 6 Media Pack DVD image.
So I placed BOOTX64.efi in <my_cobbler_server>:/var/lib/tftpboot/grub/
5) I also have the file splash.xpm.gz in
<my_cobbler_server>:/var/lib/tftpboot/grub/
6) The file /var/lib/tftpboot/grub/00:10:e0:aa:aa:aa looks like
timeout=10
splashimage=(nd)/splash.xpm.gz
title OL-R6-U6-x86_64-UEFI
root (nd)
kernel /images/OL-R6-U6-x86_64/vmlinuz ksdevice=bootif lang= text
ks=http://my_cobbler_server/cblr/svc/op/ks/system/host_name
initrd /images/OL-R6-U6-x86_64/initrd.img
7) The kickstart file is
# ks for OL 6.6 UEFI
install
text
url --url=http://10.yy.yy.yy/cobbler/links/OL-R6-U6-x86_64
lang en_US.UTF-8
keyboard us
rootpw --iscrypted $1$zw2wh8P1$zZMsVBx4.HbZNxM8p1uPX1
firewall --disabled
authconfig --enableshadow --enablemd5
selinux --disabled
timezone --utc America/Los_Angeles
reboot
bootloader --location=partition
clearpart --all --initlabel
part /boot/efi --fstype=vfat --size=200 --asprimary --ondisk=sda
part /boot --fstype=ext4 --size=500 --label=/boot --asprimary --ondisk=sda
part / --fstype=ext4 --size=8192 --grow --maxsize=51200 --label=/
--ondisk=sda
part /var --fstype=ext4 --size=4096 --label=/var --ondisk=sda
part /u01 --fstype=ext3 --size=4096 --label=/u01 --ondisk=sda
part swap --size=16384 --label=swap --ondisk=sda
%packages
@base
@core
device-mapper-multipath
kexec-tools
net-tools
pciutils
sysfsutils
system-config-kickstart
wget
lsscsi
nfs-utils
8) Works for me. Let me know if you need any other detail?
--
Thanks,
Zarko
7 years, 8 months
Power management problem
by Waldron, Michael H
I'm trying to use the power management feature in cobbler, but when I run any of the power commands, such as 'cobbler system powerstatus', I get the error:
Failed: Unable to obtain correct plug status or plug is not available
It is calling the fence_ipmilan agent, and I have verified that this works from the command line:
fence_ipmilan -a 172.26.145.151 -P -l root -p password -o status
Has anyone else seen this issue?
Mike Waldron
Systems Specialist
ITS - Research Computing Center
University of North Carolina at Chapel Hill
8 years, 3 months
Importing Fedora 23 (and 22 I believe) yields a kernel option of "repo=$tree"
by Scot Floess
All,
I've been going round and round importing Fedora 23 for a bit now. Yesterday I finally realized why imports were failing. I performed the following (as root on my cobbler box):
cd distro/iso/
mkdir Fedora-23-x86_64
mount Fedora-Server-DVD-x86_64-23.iso Fedora-23-x86_64 -t iso9660 -o loop
cobbler import --name="Fedora-23-Test" --path="/root/distro/iso/Fedora-23-x86_64"
The import works as expected. I see the distro and profile for Fedora-23-Test in the web UI.
I added a system named fedora-workstation-test...
Then tried the following with koan:
koan --server=admincloud --system=fedora-workstation-test --virt
When looking at the console of the installing VM, it fails and I am greeted with this dracut error:
[ 20.097937] dracut-initqueue[540]: cat: /tmp/dd_disk: No such file or directory
I couldn't quite figure out what was going on or why. I've done the above for RHEL/CentOS 7.x as well.
Here is the interesting part (and what I discovered yesterday): I started looking closely at the web UI and noticed that for the Fedora 23 import, the Kernel Options had this value: repo=$tree
I do not see that for RHEL/CentOS 7.2 (following similar steps). When I removed the repo=$tree , koan installs worked without issue for Fedora.
I'm enclosing a png that illustrates my point.
I certainly have a work around (as in remove that kernel option) - but definitely found this interesting. I tried Fedora 22 and thought I saw the same behavior.
Thanks!
Flossy
--
Make It So Number One
8 years, 3 months
Weirdness when trying to sync Centos 7 updates repo
by Bret Wortman
I have my repo defined as follows:
# cobbler repo report --name=C7-x86_64-updates
Name : C7-x86_64-updates
Apt Components (apt only) :
Apt Dist Names (apt only) :
Arch : x86_64
Breed : yum
Comment :
Createrepo Flags : <<inherit>>
Environment Variables : {}
Keep Updated : True
Mirror : http://mirror.cs.vt.edu/pub/CentOS/7/updates/x86_64
Mirror locally : True
Owners : ['admin']
Priority : 99
External proxy URL :
RPM List : []
Yum Options : {}
And when I try to do the reposync:
# cobbler reposync --only=C7-x86_64-updatestask started: 2016-01-05_130456_reposync
task started (id=Reposync, time=Tue Jan 5 13:04:56 2016)
hello, reposync
run, reposync, run!
creating: /var/www/cobbler/repo_mirror/C7-x86_64-updates/config.repo
creating: /var/www/cobbler/repo_mirror/C7-x86_64-updates/.origin/C7-x86_64-updates.repo
running: /usr/bin/reposync -l -n -d --config=/var/www/cobbler/repo_mirror/C7-x86_64-updates/.origin/C7-x86_64-updates.repo --repoid=C7-x86_64-updates --download_path=/var/www/cobbler/repo_mirror -a x86_64
13 kB 00:00
3.6 kB 00:00
3.6 kB 00:00
2.5 kB 00:00
2.5 kB 00:00
2.5 kB 00:00
2.5 kB 00:00
2.7 kB 00:00
1.2 kB 00:00
2.7 kB 00:00
2.7 kB 00:00
11 kB 00:00
C7-x86_64-updates/prestodelta FAILED
Failed to download prestodelta for repository C7-x86_64-updates: [Errno 256] No more mirrors to try.
389-ds-base-1.2.11.15-68.el6_7 FAILED
389-ds-base-devel-1.2.11.15-68 FAILED
:
:
selinux-policy-doc-3.7.19-279.el6_7.8.noarch: [Errno 256] No more mirrors to try.
rsyslog7-7.4.10-3.el6_7.1.x86_64: [Errno 256] No more mirrors to try.
2:qemu-kvm-0.12.1.2-2.479.el6_7.3.x86_64: [Errno 256] No more mirrors to try.
postgresql-devel-8.4.20-4.el6_7.i686: [Errno 256] No more mirrors to try.
1:libreoffice-langpack-zh-Hans-4.2.8.2-11.el6_7.1.x86_64: [Errno 256] No more mirrors to try.
:
:
received on stderr:
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'cobbler reposync failed'
Exception Info:
File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 126, in die
raise CX(msg)
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'cobbler reposync failed'
Exception Info:
File "/usr/lib/python2.7/site-packages/cobbler/action_reposync.py", line 126, in run
self.sync(repo)
File "/usr/lib/python2.7/site-packages/cobbler/action_reposync.py", line 170, in sync
return self.yum_sync(repo)
File "/usr/lib/python2.7/site-packages/cobbler/action_reposync.py", line 431, in yum_sync
utils.die(self.logger,"cobbler reposync failed")
File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 134, in die
raise CX(msg)
reposync failed, tries left: 0
reposync failed, retry limit reached, skipping
running: chown -R root:apache /var/www/cobbler/repo_mirror/C7-x86_64-updates
received on stdout:
received on stderr:
running: chmod -R 755 /var/www/cobbler/repo_mirror/C7-x86_64-updates
received on stdout:
received on stderr:
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'overall reposync failed, at least one repo failed to synchronize'
Exception Info:
File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 126, in die
raise CX(msg)
Exception occured: <class 'cobbler.cexceptions.CX'>
Exception value: 'overall reposync failed, at least one repo failed to synchronize'
Exception Info:
File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 87, in run
rc = self._run(self)
File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 247, in runner
3), name=name, nofail=nofail, logger=self.logger)
File "/usr/lib/python2.7/site-packages/cobbler/api.py", line 820, in reposync
return reposync.run(name)
File "/usr/lib/python2.7/site-packages/cobbler/action_reposync.py", line 155, in run
utils.die(self.logger,"overall reposync failed, at least one repo failed to synchronize")
File "/usr/lib/python2.7/site-packages/cobbler/utils.py", line 134, in die
raise CX(msg)
!!! TASK FAILED !!!
#
What's really odd about this is that I have a C6 repo defined exactly the same as this one (though the version number is different) and it updates just fine. I've removed and re-added the repo without joy. I can use lftp to pull the whole thing down, and still get errors when attempting the reposync.
What am I missing?
8 years, 3 months
Some generic questions about Cobbler
by o haya
Hi,
I was able to get my installation (RHEL, plus an app) working with Cobbler, but there are some things I am not clear about:
1) The .ks file I was able to get working is in the /var/lib/cobbler/kickstarts directory, but I noticed that there is another file in that directory that has a .cfg file extension. What is that file for?
2) In the .ks file, I saw a variable (I think it's a variable) named "$continueAnyway". It looks like that sets whether the kickstart file should continue being processed. Is that a standard variable in Cobbler? How do it get set?
Sorry, I know these are kind of vague questions, but I'm still puzzling my way through all of this :)!!
Thanks,
Jim
8 years, 3 months
Error in the Python code which Cheetah generated - EOL while scanning string literal
by o haya
Hi,
Sorry for all of the posts/questions. I am encountering another problem (see below) that I thought was similar to the ones I posted earlier, but I've tried escaping the "$" in the md5 string (tried both \ and adding add'l $), and I've also tried surrounding the bootloader line with #raw/#end raw, and still get the same error so I'm kind of confused now :(...
Tue Jan 12 21:38:20 2016 - INFO | REMOTE generate_kickstart; user(?)
Tue Jan 12 21:38:20 2016 - INFO | generate_kickstart
Tue Jan 12 21:38:20 2016 - INFO | Exception occured: <class 'Cheetah.Parser.ParseError'>
Tue Jan 12 21:38:20 2016 - INFO | Exception value:
Error in the Python code which Cheetah generated for this template:
================================================================================
EOL while scanning string literal (cheetah_DynamicallyCompiledCheetahTemplate_1452652700_46_47704.py, line 116)
Line|Python Code
----|-------------------------------------------------------------
114 |
115 | try:
116 | return eval('''VFFSL(SL,"cat",True) /proc/cmdline | sed -n 's/.*'"$1"'=\([^ ]*\).*/\1/p'''', globals(), localsDict)
^
117 | return self._CHEETAH__errorCatcher.warn(exc_val=e, code= u'VFFSL(SL,"cat",True) /proc/cmdline | sed -n \'s/.*\'"$1"\'=\\([^ ]*\\).*/\\1/p\'' , rawCode= u'$(cat /proc/cmdline | sed -n \'s/.*\'"$1"\'=\\([^ ]*\\).*/\\1/p\')' , lineCol=(183, 6))
118 |
119 | def __errorCatcher9(self, localsDict={}):
================================================================================
Here is the corresponding Cheetah code.
** I had to guess the line & column numbers, so they are probably incorrect:
Line 35, column 42
Line|Cheetah Code
----|-------------------------------------------------------------
32 |
33 |# Install boot loader on those platforms that need it
34 |# RHEL6+ only
35 |# bootloader --location=mbr --password=$1$hEmeS$fRZdC.8kHLI8lhOk.1XSJ1 --iscrypted
^
36 |# RHEL5
37 |
38 |bootloader --location=mbr --md5pass=$1$hEmeS$fRZdC.8kHLI8lhOk.1XSJ1
Tue Jan 12 21:38:20 2016 - INFO | Exception Info:
File "/usr/lib/python2.6/site-packages/cobbler/remote.py", line 1055, in generate_kickstart
return self.api.generate_kickstart(profile,system)
File "/usr/lib/python2.6/site-packages/cobbler/api.py", line 694, in generate_kickstart
return self.kickgen.generate_kickstart_for_system(system)
File "/usr/lib/python2.6/site-packages/cobbler/kickgen.py", line 257, in generate_kickstart_for_system
return self.generate_kickstart(profile=p, system=s)
File "/usr/lib/python2.6/site-packages/cobbler/kickgen.py", line 293, in generate_kickstart
data = self.templar.render(raw_data, meta, None, obj)
File "/usr/lib/python2.6/site-packages/cobbler/templar.py", line 116, in render
data_out = self.render_cheetah(raw_data, search_table, subject)
File "/usr/lib/python2.6/site-packages/cobbler/templar.py", line 201, in render_cheetah
t = Template(source=raw_data, searchList=[search_table], compilerSettings={'useStackFrame':False})
File "DynamicallyCompiledCheetahTemplate.py", line 55, in __init__
File "_etc_cobbler_cheetah_macros.py", line 55, in __init__
File "/usr/lib64/python2.6/site-packages/Cheetah/Template.py", line 1257, in __init__
self._compile(source, file, compilerSettings=compilerSettings)
File "/usr/lib64/python2.6/site-packages/Cheetah/Template.py", line 1551, in _compile
keepRefToGeneratedCode=True)
File "/usr/lib/python2.6/site-packages/cobbler/template_api.py", line 127, in compile
return Cheetah.Template.Template.compile(*args, **kwargs)
File "/usr/lib64/python2.6/site-packages/Cheetah/Template.py", line 795, in compile
raise parseError
8 years, 3 months
Re: What is wrong with this (Cheetah) code?
by o haya
Hi,
Thanks. I'll try that!
--------------------------------------------
On Fri, 1/15/16, Buckley, Joel <Joel.Buckley(a)polycom.com> wrote:
Subject: [cobbler] Re: What is wrong with this (Cheetah) code?
To: "o haya" <ohaya(a)yahoo.com>, "cobbler mailing list" <cobbler(a)lists.fedorahosted.org>
Date: Friday, January 15, 2016, 10:41 PM
Break the line into two
lines:
NAMESERVER=$(echo $(awk
'/^nameserver/ {print $2}' </etc/resolv.conf) |
sed 's/ /,/g')
DNS=$(echo
$NAMESERVER | sed 's/ /,/g')
OR reduce the line to a single execution
sequence:
DNS=$(awk '/^nameserver/
{print $2}' </etc/resolv.conf | sed 's/
/,/g')
-----Original
Message-----
From: o haya [mailto:ohaya@yahoo.com]
Sent: Friday, January 15, 2016 8:33 PM
To: cobbler(a)lists.fedorahosted.org
Subject: [cobbler] What is wrong with this
(Cheetah) code?
Hi,
I'm not that familiar with
Cheetah code, but I am getting this error in my .ks file:
Long-form placeholders - ${},
$(), $[], etc. are not valid inside expressions. Use them in
top-level $placeholders only.
Line 347,
column 13
Line|Cheetah
Code
----|-------------------------------------------------------------
344 | IP=$(ifconfig $IFACE | sed
-n 's/.*inet addr:\([^ ]*\).*/\1/p')
345 | MASK=$(ifconfig $IFACE | sed
-n 's/.*Mask:\([^ ]*\).*/\1/p')
346
| GATE=$(route -n | awk '/^0\.0\.0\.0/
{print $2}')
347
| DNS=$(echo $(awk '/^nameserver/ {print
$2}' </etc/resolv.conf) | sed 's/ /,/g')
^
348 |else
349 | #
pick up defaults from command line args
350
| IFACE=$(cmdline_val "ksdevice"
"eth0")
Can
someone tell me what is wrong with that line 347?
Thanks,
Jim
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/cobbler@lists.fedorahosted.org
_______________________________________________
cobbler mailing list
cobbler(a)lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/cobbler@lists.fedorahosted.org
8 years, 3 months
What is wrong with this (Cheetah) code?
by o haya
Hi,
I'm not that familiar with Cheetah code, but I am getting this error in my .ks file:
Long-form placeholders - ${}, $(), $[], etc. are not valid inside expressions. Use them in top-level $placeholders only.
Line 347, column 13
Line|Cheetah Code
----|-------------------------------------------------------------
344 | IP=$(ifconfig $IFACE | sed -n 's/.*inet addr:\([^ ]*\).*/\1/p')
345 | MASK=$(ifconfig $IFACE | sed -n 's/.*Mask:\([^ ]*\).*/\1/p')
346 | GATE=$(route -n | awk '/^0\.0\.0\.0/ {print $2}')
347 | DNS=$(echo $(awk '/^nameserver/ {print $2}' </etc/resolv.conf) | sed 's/ /,/g')
^
348 |else
349 | # pick up defaults from command line args
350 | IFACE=$(cmdline_val "ksdevice" "eth0")
Can someone tell me what is wrong with that line 347?
Thanks,
Jim
8 years, 3 months