[opensuse-autoinstall] PXE installation and endless loop
Hello,
I am implementing a PXE installation with autoyast, and it has been
working well. However, the system continues to boot from PXE and the
installation repeats itself over and over. I will not have access to the
machines to disable PXE in the bios.
I have look at the autoyast documentation and Section 7.2.3 recommends a
solution of adding an entry to autoyast.xml profile. I have tried this
option, however I still receive the same result. This is what I have
added to my autoinst.xml
<pxe>
I think a better solution is to disable tftp ( or even DHCP if IPs are fixed ) for the given client as soon as the installation has reached the post install step. During the post install a script on the client removes its PXE and/or dhcp configuration on the installation. Thus the next pxe boot will fail and the client should proceed with the local boot. Of course this does work only the the client will try to boot from its harddisk if PXE boots fails hth Hajo
Wayman Smith
24/01/2008 13:58 >>> Hello,
I am implementing a PXE installation with autoyast, and it has been
working well. However, the system continues to boot from PXE and the
installation repeats itself over and over. I will not have access to the
machines to disable PXE in the bios.
I have look at the autoyast documentation and Section 7.2.3 recommends a
solution of adding an entry to autoyast.xml profile. I have tried this
option, however I still receive the same result. This is what I have
added to my autoinst.xml
<pxe>
Hi*, maybe you can try this: Change Bootorder to: 1: Local Disk 2: PXE Then, if you want to reinstall System simply destroy Boot Block of local Disk and reboot. 1: fails 2: PXE succeds and starts reinstall. After (re)install: 1: Local Disk Succeds, which has also the benefit of more security (PXE cannot be spoofed !!), and shorter Boot Time. Jut my 2ct/EUR Dirk Hans-Joachim Ehlers schrieb:
I think a better solution is to disable tftp ( or even DHCP if IPs are fixed ) for the given client as soon as the installation has reached the post install step.
During the post install a script on the client removes its PXE and/or dhcp configuration on the installation. Thus the next pxe boot will fail and the client should proceed with the local boot. Of course this does work only the the client will try to boot from its harddisk if PXE boots fails
hth Hajo
Wayman Smith
24/01/2008 13:58 >>> Hello,
I am implementing a PXE installation with autoyast, and it has been working well. However, the system continues to boot from PXE and the installation repeats itself over and over. I will not have access to the machines to disable PXE in the bios.
I have look at the autoyast documentation and Section 7.2.3 recommends a solution of adding an entry to autoyast.xml profile. I have tried this option, however I still receive the same result. This is what I have added to my autoinst.xml
<pxe>
true <pxelinux-config> DEFAULT linux LABEL linux localboot 0</pxelinux-config> <tftp-server>192.168.66.1</tftp-server> <pxelinux-dir>/pxelinux.cfg</pxelinux-dir> </pxe>
I also am using dhcp and the hexadecimal file names. What section of the autoinst.xml should the pxe section be inserted in?
I have made alot of progress with my installation, thanks for all the support.
Wayman
-- TRIA IT-consulting GmbH Joseph-Wild-Straße 20 81829 München Germany Tel: +49 (89) 92907-0 Fax: +49 (89) 92907-100 http://www.tria.de Registergericht München HRB 113466 USt.-IdNr. DE 180017238 Steuer-Nr. 802/40600 Geschäftsführer: Thomas Lerner -------------------------------------------------------------------------------- Nachricht von: Dirk.Schreiner@tria.de Nachricht an: opensuse-autoinstall@opensuse.org # Dateianhänge: 0 -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
On Thu, Jan 24, 2008 at 02:31:04PM +0100, Hans-Joachim Ehlers wrote:
During the post install a script on the client removes its PXE and/or dhcp configuration on the installation. Thus the next pxe boot will fail and the client should proceed with the local boot.
This is exactly how our setup works, and it works well. You can either use a symlink/file that you delete, or file that you edit on the fly in scripts (I recommend chroot as the install was likely successful by then and happens before initial reboot). We use the files named by the mac address.. easy to get from running system like so: mycfg=`ifconfig $pxe_dev | awk '/HWaddr/{print $NF}' | sed 's/:/-/g' | tr '[:upper:]' '[:lower:]'` mycfg="01-$mycfg" i.e. this: eth1 Link encap:Ethernet HWaddr 00:0C:6E:7A:69:D1 results in: $ echo $mycfg 01-00-0c-6e-7a-69-d1 We setup files with default declarations for the install and for the boot from disk options, then use sed to flip which is commented out (mounted the /tftpboot dir onto /tmp/pxe): mv -f /tmp/pxe/pxelinux.cfg/$mycfg /tmp/pxe/pxelinux.cfg/${mycfg}.orig sed -e 's/^DEFAULT/#DEFAULT/g' -e 's/^#\(DEFAULT disk\)/\1/g' /tmp/pxe/pxelinux.cfg/${mycfg}.orig > /tmp/pxe/pxelinux.cfg/$mycfg I'm sure plenty know this but for the few that might not; the really nice side-effect of having hosts set in the bios to pxe boot first is that it makes doing widespread OS upgrades/installs a piece of cake. We have a batched script for configuring the install info, then can power on whole racks of boxes at once and never have to touch them. -- Mike Marion-Unix SysAdmin/Staff IT Engineer-http://www.qualcomm.com Commentator in "Triple Play Baseball" for PS2: "The key to scoring runs is cashing in when you're in scoring position." -- Thank you, Captain Obvious! -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Mike Marion wrote:
On Thu, Jan 24, 2008 at 02:31:04PM +0100, Hans-Joachim Ehlers wrote:
During the post install a script on the client removes its PXE and/or dhcp configuration on the installation. Thus the next pxe boot will fail and the client should proceed with the local boot.
This is exactly how our setup works, and it works well. You can either use a symlink/file that you delete, or file that you edit on the fly in scripts (I recommend chroot as the install was likely successful by then and happens before initial reboot).
We use the files named by the mac address.. easy to get from running system like so: mycfg=`ifconfig $pxe_dev | awk '/HWaddr/{print $NF}' | sed 's/:/-/g' | tr '[:upper:]' '[:lower:]'` mycfg="01-$mycfg"
i.e. this: eth1 Link encap:Ethernet HWaddr 00:0C:6E:7A:69:D1 results in: $ echo $mycfg 01-00-0c-6e-7a-69-d1
We setup files with default declarations for the install and for the boot from disk options, then use sed to flip which is commented out (mounted the /tftpboot dir onto /tmp/pxe): mv -f /tmp/pxe/pxelinux.cfg/$mycfg /tmp/pxe/pxelinux.cfg/${mycfg}.orig sed -e 's/^DEFAULT/#DEFAULT/g' -e 's/^#\(DEFAULT disk\)/\1/g' /tmp/pxe/pxelinux.cfg/${mycfg}.orig > /tmp/pxe/pxelinux.cfg/$mycfg
I'm sure plenty know this but for the few that might not; the really nice side-effect of having hosts set in the bios to pxe boot first is that it makes doing widespread OS upgrades/installs a piece of cake. We have a batched script for configuring the install info, then can power on whole racks of boxes at once and never have to touch them.
I would like to employ this solution. But if I understand correctly, you use a chroot script to edit the MAC address specific configuration file. I understand the sed portion of what you are doing, but I don't realize how the client machine is accessing the MAC address specific configuration file on the server. But this is the ideal solution. Thanks, --Wayman -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
On Thu, Jan 31, 2008 at 10:00:26AM -0500, Wayman Smith wrote:
I would like to employ this solution. But if I understand correctly, you use a chroot script to edit the MAC address specific configuration file. I understand the sed portion of what you are doing, but I don't realize how the client machine is accessing the MAC address specific configuration file on the server. But this is the ideal solution.
From the above example, these would result in:
Assuming I'm getting what you're missing :)... The tftp server exportfs /tftpboot to the world with no_root_squash (since the clients will be root owned processes when they go to either delete the file or use sed to change it). We pass the host and device (some of that left over from when we sometimes did pxe boots off eth1 on a closed loop network but later configured eth0 on the company network) on the /proc/cmdline like so: pxe=eth0,0,1.2.3.4 The values figured out from that before the tftp config file is deleted/changed are (I do this using Bash variable conventions): cmdline=`cat /proc/cmdline` pxe_ip=${cmdline/*pxe=eth[0-9],[0-9],/} pxe_ip=${pxe_ip/ */} pxe_dev=${cmdline/*pxe=/} pxe_dev=${pxe_dev/,*/} pxe_ip=1.2.3.4 pxe_dev=eth0 Note: the middle number 0 is another left over where scripts would assume if it was a 1 instead of 0 then the install tree was on the same host as the pxe_ip value.. I since figured out how to get the full nfs install path another way, but left this in for old scripts. Then the script can get the mac address and figure out the file on the tftp server named for that mac: mycfg=`ifconfig $pxe_dev | awk '/HWaddr/{print $NF}' | sed 's/:/-/g' | tr '[:upper:]' '[:lower:]'` mycfg="01-$mycfg" So host with mac 00:0C:6E:7A:69:D1 becomes file 01-00-0c-6e-7a-69-d1 Also have to mount the path off the tftp server in order to change the file: mount -o rw,nolock ${pxe_ip}:$pxe_path /tmp/pxe pxe_path=/tftpboot (another thing where we use a slightly different path in some cases) So in my example the mount becomes: mount -o rw,nolock 1.2.3.4:/tftpboot /tmp/pxe You can then use sed to change the config file, which would be /tmp/pxe/pxelinux.cfg/01-00-0c-6e-7a-69-d1 -- Mike Marion-Unix SysAdmin/Staff IT Engineer-http://www.qualcomm.com Beer recipe: free! ~= Source Cold pints: $2 ~= Product Safe rides home, any hour: $25 ~= Technical Support -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Hi, Am Donnerstag 24 Januar 2008 schrieb Wayman Smith:
Hello,
I am implementing a PXE installation with autoyast, and it has been working well. However, the system continues to boot from PXE and the installation repeats itself over and over. I will not have access to the machines to disable PXE in the bios.
I have look at the autoyast documentation and Section 7.2.3 recommends a solution of adding an entry to autoyast.xml profile. I have tried this option, however I still receive the same result. This is what I have added to my autoinst.xml
As the PXE boot happens before all that, I don't think that works. If you start the install manually by selecting from a PXE menu, then default harddisk in /tftpboot/pxelinux.cfg/hexmacaddress helps: default harddisk # SLES10SP1 label SLES10SP1 kernel linux append initrd=initrd ramdisk_size=65536 insmod=e100 netdevice=eth0 autoyast= ... # OES - wie SLES10SP1, nur anderer AutoYaST-File label OES2 kernel linux append initrd=initrd ramdisk_size=65536 insmod=e100 netdevice=eth0 autoyast= ... ... Combined with a message file you have to choose an installation when the machine boots; if you don't make a choice the machine boots from harddisk. If you start the install remotely and do not sit in front of the machine to start it, I don't think there is a choice but to remove the hexadecimal file specific for that machine before it reboots as part of the installation. The machine-specific one would not have "default harddisk", but default 0, for example, and if you remove that file, the file named default is used, which has the "default harddisk" line in it. The trick is to remove the file in the right moment. But if you trigger things remotely with WoL, for instance, you could have some script that sends the WoL package and then deletes the corresponding file after 5 minutes. You would have to remove the file in any event, because when the user starts his machine, the installation would start all over as well. Björn -- Dr. Björn Lotz, Instructional Designer Novell Training Services Novell GmbH, Willy-Brandt-Allee 2, 81829 München Tel: 089/206002000 Fax: 089/206002100 ------------------ Novell GmbH, Düsseldorf; GF: Volker Smid, Djamel Souici HRB 21108 (AG Düsseldorf) -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Hi all,
We just changed our fixed size partitioning scheme to a use percentages.
It works partially.
I am left with a rootlv and tmplv in the correct size, but the varlv produces an error. (see the attached log file,
search for "not found")
Looking at the partitioning, there is a freespace component of the exact size that varlv should be....
Below is the autoyast portion we use for the partitioning scheme.
Again, this used to work with fixed values....
<partitioning config:type="list">
<drive>
<partitions config:type="list">
<partition>
<filesystem config:type="symbol">reiser</filesystem>
<format config:type="boolean">true</format>
<mount>/boot</mount>
It turns out that if I use <max> as the last statement (for varlv in this example) or assign no more than 99% all works well. In both cases I am left with around 10MB of freespace. Can someone explain why it fails if I assign 100%? HRV
On Thu, Jan 24, 2008 at 5:37 PM, in message <4798CCE6.964B.001A.0@novell.com>, "Hans-Robert Vermeulen"
wrote: Hi all, We just changed our fixed size partitioning scheme to a use percentages. It works partially.
I am left with a rootlv and tmplv in the correct size, but the varlv produces an error. (see the attached log file, search for "not found") Looking at the partitioning, there is a freespace component of the exact size that varlv should be....
Below is the autoyast portion we use for the partitioning scheme. Again, this used to work with fixed values....
<partitioning config:type="list"> <drive> <partitions config:type="list"> <partition> <filesystem config:type="symbol">reiser</filesystem> <format config:type="boolean">true</format> <mount>/boot</mount>
1 primary <size>300M</size> </partition> <partition> <filesystem config:type="symbol">swap</filesystem> <format config:type="boolean">true</format> <mount>swap</mount>2 primary <size>auto</size> </partition> <partition>system 3 primary <size>max</size> </partition> </partitions> <use>all</use> </drive> <drive> <device>/dev/system</device>true <evms config:type="boolean">true</evms> <partitions config:type="list"> <partition> <filesystem config:type="symbol">reiser</filesystem> <format config:type="boolean">true</format>rootlv <mount>/</mount> <size>50%</size> </partition> <partition> <filesystem config:type="symbol">reiser</filesystem> <format config:type="boolean">true</format>tmplv <mount>/tmp</mount> <size>20%</size> </partition> <partition> <filesystem config:type="symbol">reiser</filesystem> <format config:type="boolean">true</format>varlv <mount>/var</mount> <size>30%</size> </partition> </partitions> <pesize>8M</pesize> <use>all</use> </drive> </partitioning>Hans-Robert Vermeulen Consultant HVermeulen@Novell.com Phone: +31 (0)6 224 06 424
SUSE* Linux Enterprise 10 Your Linux is ready*
Hans-Robert Vermeulen Consultant HVermeulen@Novell.com Phone: +31 (0)6 224 06 424 SUSE* Linux Enterprise 10 Your Linux is ready* -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
On Freitag, 25. Januar 2008, Hans-Robert Vermeulen wrote:
It turns out that if I use <max> as the last statement (for varlv in this example) or assign no more than 99% all works well. In both cases I am left with around 10MB of freespace. Can someone explain why it fails if I assign 100%?
I have changed the calculation of the maximum of a harddisk that can be used from a quite aggressive calculation to a very defensive way. I often had problems with partitions that on some machines fit but on some others are half a cylinder too big or so. Someday I had enough of that and I changed to calculation. Since then every now and then people complain about some wasted MB but at least the partitioning never fails because of not enough space anymore. That "100%" does not work is not so nice though. I have to take a look at it. -- ciao, Uwe Gansert Uwe Gansert, Server Technologies Team SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) Business: http://www.suse.de/~ug -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
On Thursday 24 January 2008 12:58:40 Wayman Smith wrote:
Hello,
I am implementing a PXE installation with autoyast, and it has been working well. However, the system continues to boot from PXE and the installation repeats itself over and over. I will not have access to the machines to disable PXE in the bios.
I use PXE to install clients here. My PXE setup default to booting from the local hard disk using MENU LABEL Boot from the hard^disk--- MENU DEFAULT kernel chain.c32 append hd0 If I was wanting to automatically install a machine without having to visit it, I'd use a custom pxe config file for the mac address of the machine. Once the install had started, I'd remove the custom config file. -- Simon Crute IS&T. Bracknell. UK. -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
participants (8)
-
Björn Lotz
-
Dirk Schreiner
-
Hans-Joachim Ehlers
-
Hans-Robert Vermeulen
-
Mike Marion
-
Simon Crute
-
Uwe Gansert
-
Wayman Smith