Archive

Archive for October, 2012

Bootstrapping a Fedora 17 rootserver

October 20th, 2012 No comments

Quite a few things have changed since I made the Bootstrapping a Fedora 15 rootserver post, e.g. download urls, anaconda options and the way you add boot targets to grub2 (in contrast to legacy grub). So here’s an updated version…

Get initial ramdisk and kernel

This is basically still the same as with Fedora 15. The download links have changed a bit since download.fedora.redhat.com doesn’t exist any longer (but I’ve updated the old post anyway)

cd /boot/
wget http://dl.fedoraproject.org/pub/fedora/linux/releases/17/Fedora/x86_64/os/isolinux/initrd.img
wget http://dl.fedoraproject.org/pub/fedora/linux/releases/17/Fedora/x86_64/os/isolinux/vmlinuz

Add a boot target to grub

Edit /etc/grub.d/40_custom and add the following menu entry

[...]
menuentry 'Fedora 17 Install' {
  set root='hd0,2'
  echo    'Loading Linux'
  linux   /vmlinuz vnc vncpassword=SECRET ksdevice=link ks=http://server/ks.cfg
  echo    'Loading initial ramdisk ...'
  initrd  /initrd.img
}

Adjust the root parameter depending on the partition that contains the vmlinuz and initrd.img files (/dev/sda2 in this example, see also Adding custom boot target to GRUB2).

Also note, that I changed the ksdevice parameter from eth0 (which sets a specific interface) to link (which uses the first interface with link up) since NIC interface names are no longer predictable in recent kernel versions (p10p1, em1, eth0, etc.). For a list of all possible value of ksdevice hava a look at the corresponding Fedora wiki page.

After editing /etc/grub.d/40_custom, don’t forget to recreate grub.cfg by invoking

grub2-mkconfig -o /boot/grub2/grub.cfg

After rebooting, connect to the vnc server using the password you specified as usual.

F17vncInstall

click for full size image

Categories: Uncategorized Tags: ,

Adding custom boot target to GRUB2

October 1st, 2012 No comments

In GRUB2 one doesn’t alter the main configuration file /boot/grub2/grub.cfg manually any more. Boot menu entries are automatically determined by the grub2-mkconfig script.

To add a custom menu entry, edit /etc/grub.d/40_custom

[...]
menuentry 'Custom Entry' {
  set root='hd0,msdos2'
  echo    'Loading Linux'  
  linux   /vmlinuz
  echo    'Loading initial ramdisk ...'
  initrd  /initramfs.img
}

Note that GRUB2 partition numbering starts with 1 (not 0 like GRUB) but disk numbering starts with 0, e.g. if your kernel and inital ramdisk are located on /dev/sda2, this translates to hd0,2.

On MS-DOS type partitions (which currently is the majority of partitions out there) hd0,2 and hd0,msdos2 are interchangeable.

To recreated grub.cfg with the added boot menu entry, invoke

grub2-mkconfig -o /boot/grub2/grub.cfg

Resources:
http://home.roadrunner.com/~computertaijutsu/grub2.html

Categories: Uncategorized Tags: