Bill Jonas on Tue, 2 Apr 2002 02:55:18 -0500


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

Re: [PLUG] Kernel recompiles with GRUB


On Mon, Apr 01, 2002 at 10:17:35PM -0500, Michael Leone wrote:
> Or am I mis-understanding this GRUB stuff again?

GRUB groks filesystems, and its second-stage loader reads the menu.lst
when it runs.  Just add your new image to the menu.lst; that's all
that's needed.

Here's a nifty little trick: If you forget to add the stanza you want,
hit c when GRUB's menu appears.  This will put you into command-line
mode.  Then you can "find /boot/name-of-image" (or "find /name-of-image"
if your /boot directory is on its own partition).  Then you can just
type the stanza as it would appear in the menu.lst file (the title
directive is not needed).  For example, "root (hd0,0)" followed by
"kernel /vmlinuz root=/dev/hda5 ro hdd=ide-scsi" (to take an example
from my own configuration).  Then just "boot" to boot the kernel you
selected.

Actually, I was installing another distribution, and I told it not to
install a bootloader.  I found a command prompt, mounted my /boot
partition, edited the menu.lst, umounted, then continued the
installation as normal.  The new entry was there upon reboot.  GRUB's
really excellent. :)

update-grub might be Debian-specific; I'm not sure (haven't used GRUB
much with other distributions yet).  If it is, it's there to give the
kernel-image postinst scripts something to run, like LILO.  It will look
for /boot/vmlinuz-* and use that to update the "DEBIAN AUTOMAGIC KERNELS
LIST" section it marks off in the menu.lst, or to generate a default
menu.lst if you don't already have one.

-- 
Bill Jonas    *    bill@billjonas.com    *    http://www.billjonas.com/

Developer/SysAdmin for hire!   See http://www.billjonas.com/resume.html

Attachment: pgpSZlvqj0KCO.pgp
Description: PGP signature