How to edit grub menu (menu.lst) properly?

Alex Ingle ingle.as at gmail.com
Wed Sep 9 15:21:45 CEST 2009


Michael,
Do I understand correctly the recipe?

1) to execute in instsoft.GRUB hook the commands:
fcopy /boot/grub/menu.lst
$ROOTCMD update-initramfs -k all -u
$ROOTCMD update-grub
(This provides that menu.lst exists and is configured.)

2) to remove file faiconfig/files/boot/grub/menu.lst/postinst to GRUB
script's directory and to comment
 grub update command in it.
(This will install grub but not change menu.lst)

We tried to install using the config described above and got the following
errors in fai.log:

chroot: cannot run command `update-initramfs': No such file or directory
chroot: cannot run command `update-grub': No such file or directory
instsoft.GRUB        FAILED with exit code 127.

Please correct me if I'm wrong.

Thank you

2009/9/9 Michael Goetze <mgoetze at mgoetze.net>

> Hi Alexey,
>
> > We have a deb packet that modifies /boot/grub/menu.lst file.
> > But FAI ( we used config structure from example ) creates this file
> > during GRUB configuration after "instsoft" task is done.
> >
> > We tried to call "fcopy -Uv /boot/grub/menu.lst" in instsoft.GRUB hook
> > but the menu.lst was overwritten by 10-setup GRUB script to default. So
> > we need to modify menu.lst again but this method seems not correct.
> > If 10-setup GRUB script was deleted then GRUB did't install at all.
> > Can you please suggest how to have menu.lst configured once?
>
> why don't you just replace your GRUB/* scripts with something like
>
> $ROOTCMD update-initramfs -k all -u
> $ROOTCMD update-grub
>
> Keep in mind that grub-install is by default executed by an fcopy
> postinst script, so you must retain at least one fcopy
> /boot/grub/menu.lst or move that to one of your scripts as well.
>
> Regards,
> Michael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20090909/bc611c6f/attachment.htm 


More information about the linux-fai mailing list