Re: grub2 confusion

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

 



On Thu, Oct 6, 2011 at 11:37 AM, Michael Schwendt <mschwendt@xxxxxxxxx> wrote:


> $ cat /etc/grub.d/41_custom
> #!/bin/sh
> cat <<EOF
> if [ -f  \$prefix/custom.cfg ]; then
>  source \$prefix/custom.cfg;
> fi
> EOF
>
> If I didn't want to append stuff to that file, what might
> $prefix expand to? Very likely it is not /usr:
>
> $ grep prefix /etc/grub.d/*
> /etc/grub.d/00_header:prefix=/usr
> /etc/grub.d/00_header:exec_prefix=/usr
> /etc/grub.d/00_header:if [ -s \$prefix/grubenv ]; then
> /etc/grub.d/10_linux:prefix=/usr
> /etc/grub.d/10_linux:exec_prefix=/usr
> /etc/grub.d/10_linux:export TEXTDOMAINDIR=${prefix}/share/locale
> /etc/grub.d/20_linux_xen:prefix=/usr
> /etc/grub.d/20_linux_xen:exec_prefix=/usr
> /etc/grub.d/20_linux_xen:export TEXTDOMAINDIR=${prefix}/share/locale
> /etc/grub.d/30_os-prober:prefix=/usr
> /etc/grub.d/30_os-prober:exec_prefix=/usr
> /etc/grub.d/41_custom:if [ -f  \$prefix/custom.cfg ]; then
> /etc/grub.d/41_custom:  source \$prefix/custom.cfg;

If you go to the grub cli from the grub boot menu, "$prefix" will be
"/boot/grub2".


> We've had years of /etc/grub.conf -> /boot/grub/grub.conf plus
> additional "menu.lst" symlinks, so users around the world referred
> to either one out of three (!) possible config file paths. Now the
> fun is being repeated with grub2... I think that is a bug.

grub1's upstream had "/boot/grug/menu.lst". Fedora and some other
distributions used "/boot/grub/grub.conf" (logically IMHO) with
menu.lst as a symlink to grub.conf. And Fedora (and possibly others)
had "/etc/grub.conf" as a symlink to "/boot/grub/grub.conf".
-- 
test mailing list
test@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe: 
https://admin.fedoraproject.org/mailman/listinfo/test



[Index of Archives]     [Fedora Desktop]     [Fedora SELinux]     [Photo Sharing]     [Yosemite Forum]     [KDE Users]

  Powered by Linux