http://www.stanford.edu/~alfw/PXE-Kickstart/PXE-Kickstart-8.html

Next Previous Contents

8. Linux Kernel, Initial RAM disk

Two components loaded onto a client are the Linux Kernel and the initial RAM disk. For Red Hat 6.2 I got them out of the bootnet.img file.

Here is how you get to them:

bash# mkdir /mnt/linux /mnt/linux1
bash# mount /tmp/bootnet.img /mnt/linux -o loop
bash# cp /mnt/linux/initrd.img /tftp/initrd-6.2.img
bash# cp /mnt/linux/vmlinuz /tftp/vmlinuz-6.2
  

For Red Hat 7.1 and higher the files are already in a special directory in the distribution:

bash# cp i386/images/pxeboot/initrd.img /tftp/initrd-7.2.img
bash# cp i386/images/pxeboot/vmlinuz /tftp/vmlinuz-7.2
  

You can of course use the same method as for Red Hat 6.2 if you want to.

Starting with Red Hat 9 you have to use the images in the pxeboot directory because the bootdisk.img does not contain any network drivers!

The installer "anaconda" from Red Hat Linux 6.2 cannot install over "eth1"! If you have a motherboard NIC which cannot do PXE but your machine has a second NIC which can do PXE (which was the case for my clients), you need to modify the "anaconda" source code.

"anaconda" in Red Hat 7 and later has a new parameter ksdevice for exactly this purpose (see the default.netboot-7.2 example in Section Bootloader).

Here is the modification you need to make in file RedHat6.2/i386/misc/src/anaconda/loader/loader.c:

1584,1585c1583
+   /* Modification by Alf Wachsmann <[email protected]> */
+   if (kickstartNetwork("eth1", &netDev, "dhcp", flags)) {
---
-   if (kickstartNetwork("eth0", &netDev, "dhcp", flags)) {
  

You get the new loader program into your initial RAM disk with the following commands:

bash# cd i386/misc/src/anaconda/loader
bash# vi loader.c        # make the changes from above
bash# make
bash# strip loader-network

bash# mkdir /mnt/linux /mnt/linux1
bash# cp i386/images/bootnet.img /tmp/bootnet.img
bash# mount /tmp/bootnet.img /mnt/linux -o loop
bash# cp /mnt/linux/initrd.img /tmp/initrd.img.gz
bash# gzip -d /tmp/initrd.img.gz
bash# mount /tmp/initrd.img /mnt/linux1 -o loop

bash# cp i386/misc/src/anaconda/loader/loader-network /mnt/linux1/sbin/loader

bash# umount /mnt/linux1
bash# gzip /tmp/initrd.img 

bash# cp /tmp/initrd.img.gz /tftp/initrd.img
  

This new initial RAM disk will now perform Kickstart over "eth1" (and only over "eth1").


Next Previous Contents

Reply via email to