grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: grub2 back to lilo ?


From: Colin D Bennett
Subject: Re: grub2 back to lilo ?
Date: Fri, 14 May 2010 22:13:32 -0700

Perhaps instead of pre-generating the entire GRUB configuration
(e.g. from a particular Distro like Ubuntu 9.10) things could be
inserted into the main grub.cfg at GRUB boot time.

Here's just a portion of what Ubuntu 10.04 puts in the generated
grub.cfg (of course with a stern warning not to hand modify the file):

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-22-generic' --class ubuntu --class
gnu-linux --class gnu --class os { recordfail
        insmod ext2
        set root='(hd0,3)'
        search --no-floppy --fs-uuid --set
534672c7-9930-407e-a13d-66a8e873a842 linux   /vmlinuz-2.6.32-22-generic
root=UUID=a5c8657b-e206-47d5-8cc2-30cc6cbfc77e ro   quiet splash
initrd  /initrd.img-2.6.32-22-generic
}
### etc. etc.


Now what if specific OS parts could be separated out into another file,
which could be referred to by GRUB at boot time.  Something like:

--- grub.cfg

# General settings
set timeout=10
set root='(hd0,3)'

# OS-specific parts
include ubuntu-10.04.cfg
include macos.cfg
include windows_xp.cfg

--- ubuntu-10.04.cfg

menuentry 'Ubuntu, with Linux 2.6.32-22-generic' --class ubuntu --class
gnu-linux --class gnu --class os { recordfail
        insmod ext2
        set root='(hd0,3)'
        search --no-floppy --fs-uuid --set
534672c7-9930-407e-a13d-66a8e873a842 linux   /vmlinuz-2.6.32-22-generic
root=UUID=a5c8657b-e206-47d5-8cc2-30cc6cbfc77e ro   quiet splash
initrd  /initrd.img-2.6.32-22-generic
}

And so on.

Regards,
Colin



reply via email to

[Prev in Thread] Current Thread [Next in Thread]