grub2 confusion

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

 



Just a brief look, trying to learn a little bit prior to the decision
whether I want to keep GRUB2:

$ 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;

Doubtful. These definitions probably are the different prefix=/usr
we all know.

$ rpm -ql grub2|grep custom.cfg
$
$ rpm -ql grub2|grep grubenv
$

$ zgrep grubenv /usr/share/info/grub2.info.gz
normally lives in `/boot/grub/grubenv' (although you should not assume
$
$ zgrep custom.cfg /usr/share/info/grub2.info.gz
`/etc/grub.d/40_custom' or creating `/boot/grub/custom.cfg', changing
$

Could that be the $prefix? /boot/grub/ instead of /usr/?

$ rpmls grub2|grep ^d
drwxr-xr-x  /boot/grub2
drwxr-xr-x  /etc/grub.d
drwxr-xr-x  /usr/lib/grub
drwxr-xr-x  /usr/lib/grub2
drwxr-xr-x  /usr/lib/grub2/i386-pc
drwxr-xr-x  /usr/share/doc/grub2-1.99

The package doesn't contain /boot/grub/ but /boot/grub2/ - sigh.
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.

/etc/grub.d/40_custom
AND
/boot/grub2/custom.cfg
AND
the documentation defaulting to /boot/grub/custom.cfg.

https://bugzilla.redhat.com/743964

-- 
Fedora release 16 (Verne) - Linux 3.1.0-0.rc8.git0.1.fc16.x86_64
loadavg: 0.14 0.10 0.11
-- 
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