grub dependencies

Andrew Benton b3nton at gmail.com
Mon Jun 20 04:03:54 PDT 2011


On Sun, 19 Jun 2011 21:43:20 -0500
Bruce Dubbs <bruce.dubbs at gmail.com> wrote:

> -------
> The scripts in /etc/grub.d/ are quite complicated.  The also insist that 
> the kernel names be in the form of
> 
>     /boot/vmlinuz-* /vmlinuz-* /boot/kernel-*
> 
> I like to name my kernels in the form of linux* so none were picked up.
> I'm leaning towards just eliminating the use of grub-mkconfig other than 
> for a warning not to use it.

I call my kernels bzImage so it doesn't work for me either.

> We can just use a
> 
> cat  > /boot/grub/grub.cfg << "EOF"
> ...
> EOF

Works for me. 

set timeout=10

menuentry "Linux From Scratch" {
   linux /boot/bzImage root=/dev/sdb2 quiet
}

What more do you need? For me it's never needed any insmod or whatever

> If you already have GRUB2 loaded, upgrading is a bit trickier.  Running:
> 
>    grub-install --grub-setup=/bin/true /dev/sda
> 
> to an existing grub location (/boot/grub/ by default) will completely 
> disable the ability to boot from the disk (including the grub command 
> line) until you run:
> 
>    grub-setup /dev/sda
> 

I don't follow you. Surely /boot/grub/ will be on the new LFS
partition. How does that affect the currently installed grub/MBR?

> Perhaps we should not try to do the testing as currently described and 
> just do:
> 
>    grub-install /dev/sda
> 
> instead.  That means that /boot/grub/grub.cfg better be right.  In any 
> case I think that would allow the system to get to the grub command 
> prompt even with a missing .cfg file.
> 
> Thoughts?

I've always disliked the scripts grub2 installs with their DO NOT EDIT
THIS FILE nonsense. Grub-1.99 has worked well for me for more than a
month. It'll be fine.

Andy



More information about the lfs-dev mailing list