trinity-devel@lists.pearsoncomputing.net

Message: previous - next
Month: August 2012

tdmrc BootManager support for Grub2 ??

From: "David C. Rankin" <drankinatty@...>
Date: Sun, 12 Aug 2012 17:03:55 -0500
Tim, All,

  Since grub is dead upstream and movement is toward grub2, how will this be
supported in tdm? Currently Grub and Lilo are the only boot managers supported.
Has anybody looked to see what is needed to add Grub2 support?

  This will affect the shutdown dialog options to restart "Select bootloader".
It looks like the main differences will be to parse /boot/grub/grub.cfg instead
of /boot/grub/menu.lst. In grub, the menu.lst file was formatted like:

# comment
title
root
kernel
initrd
savedefault

# comment for chainload
title
rootnorverify
makeactive
chainloader
savedefault

  Under grub2 grub.cfg, you have something like:

### comment ###
menuentry 'New Title' --class arch --class gnu-linux --class gnu --class os
$menuentry_id_option 'gnulinux-core repo
kernel-true-a625b429-6143-459c-a57c-6c5bba56d715' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos5'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5
--hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5
a625b429-6143-459c-a57c-6c5bba56d715
        else
          search --no-floppy --fs-uuid --set=root
a625b429-6143-459c-a57c-6c5bba56d715
        fi
        echo    'Loading Linux core repo kernel ...'
        linux   /boot/vmlinuz-linux
root=UUID=a625b429-6143-459c-a57c-6c5bba56d715 ro  quiet
        echo    'Loading initial ramdisk ...'
        initrd  /boot/initramfs-linux.img
}

  So for grub2 it looks like you will parse for 'menuentry' 'set root' in order
to pass that information to grub2 for restart. Anybody looked into this yet? Do
we want to open a feature request on it?

(for those not using grub2 yet -- just wait :)

-- 
David C. Rankin, J.D.,P.E.