You are not logged in.
Pages: 1
Hi!
I today found out that "GRUB_DISABLE_RECOVERY=true" in /etc/default/grub, won't hide my fallback images of my installed kernels.
This is my /etc/default/grub:
GRUB_DEFAULT=6
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet ro raid=noautodetect libahci.ignore_sss=1 loglevel=3 ipv6.disable=1 logo.nologo fastboot init=/usr/sbin/e4rat-preload-lite"
GRUB_CMDLINE_LINUX="quiet ro raid=noautodetect libahci.ignore_sss=1 loglevel=3 ipv6.disable=1 logo.nologo fastboot init=/usr/sbin/e4rat-preload-lite"
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true
# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console
# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto
# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
# modes only. Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"
# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"
#GRUB_SAVEDEFAULT="true"And in my grub menu, as i said before, fallback images are still there.
Any idea?
Thanks!
Last edited by nierro (2012-08-16 15:33:07)
Offline
Did you run grub mkconfig again after you changed /etc/default/grub?
Offline
I'd try what 2ManyDogs said:
# grub-mkconfig -o /boot/grub/grub.cfgPlease post a feedback.
domac [ git ]
Offline
Yes i previously ran it!
Offline
Yes i previously ran it!
You need to run it after you make any changes to /etc/default/grub to regenerate grub.cfg.
Please run it again, and if you still have those options in your grub menu, post your /boot/grub/grub.cfg and your /etc/default/grub.conf files.
Offline
I ran it before posting, i meant ![]()
Last edited by nierro (2012-08-16 14:50:00)
Offline
I ran it before posting, i meant
OK then, please post your /boot/grub/grub.cfg file, and your /etc/default/grub.conf file if you made any changes to it after you posted it in your first post.
Do you have more than one distro installed on the hard drive with Arch?
Last edited by 2ManyDogs (2012-08-16 15:02:12)
Offline
No changes in /etc/default/grub since then.
Here it is my grub.cfg:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="6"
if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
else
menuentry_id_option=""
fi
export menuentry_id_option
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
if [ x$feature_all_video_module = xy ]; then
insmod all_video
else
insmod efi_gop
insmod efi_uga
insmod ieee1275_fb
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
fi
}
if [ x$feature_default_font_path = xy ] ; then
font=unicode
else
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 a2f388e5-b566-4eb3-9db8-0d80579dfd15
else
search --no-floppy --fs-uuid --set=root a2f388e5-b566-4eb3-9db8-0d80579dfd15
fi
font="/usr/share/grub/unicode.pf2"
fi
if loadfont $font ; then
set gfxmode=auto
load_video
insmod gfxterm
set locale_dir=$prefix/locale
set lang=it_IT
insmod gettext
fi
terminal_input console
terminal_output gfxterm
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch GNU/Linux, con Linux uksmck kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-uksmck kernel-true-a2f388e5-b566-4eb3-9db8-0d80579dfd15' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 a2f388e5-b566-4eb3-9db8-0d80579dfd15
else
search --no-floppy --fs-uuid --set=root a2f388e5-b566-4eb3-9db8-0d80579dfd15
fi
echo 'Caricamento Linux uksmck kernel...'
linux /boot/vmlinuz-linux-uksm-ck root=UUID=a2f388e5-b566-4eb3-9db8-0d80579dfd15 ro quiet ro raid=noautodetect libahci.ignore_sss=1 loglevel=3 ipv6.disable=1 logo.nologo fastboot init=/usr/sbin/e4rat-preload-lite quiet ro raid=noautodetect libahci.ignore_sss=1 loglevel=3 ipv6.disable=1 logo.nologo fastboot init=/usr/sbin/e4rat-preload-lite
echo 'Caricamento ramdisk iniziale...'
initrd /boot/initramfs-linux-uksm-ck.img
}
menuentry 'Arch GNU/Linux, with Linux uksmck kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-uksmck kernel-fallback-a2f388e5-b566-4eb3-9db8-0d80579dfd15' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 a2f388e5-b566-4eb3-9db8-0d80579dfd15
else
search --no-floppy --fs-uuid --set=root a2f388e5-b566-4eb3-9db8-0d80579dfd15
fi
echo 'Caricamento Linux uksmck kernel...'
linux /boot/vmlinuz-linux-uksm-ck root=UUID=a2f388e5-b566-4eb3-9db8-0d80579dfd15 ro quiet ro raid=noautodetect libahci.ignore_sss=1 loglevel=3 ipv6.disable=1 logo.nologo fastboot init=/usr/sbin/e4rat-preload-lite quiet ro raid=noautodetect libahci.ignore_sss=1 loglevel=3 ipv6.disable=1 logo.nologo fastboot init=/usr/sbin/e4rat-preload-lite
echo 'Caricamento ramdisk iniziale...'
initrd /boot/initramfs-linux-uksm-ck-fallback.img
}
menuentry 'Arch GNU/Linux, con Linux core repo kernel' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-true-a2f388e5-b566-4eb3-9db8-0d80579dfd15' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 a2f388e5-b566-4eb3-9db8-0d80579dfd15
else
search --no-floppy --fs-uuid --set=root a2f388e5-b566-4eb3-9db8-0d80579dfd15
fi
echo 'Caricamento Linux core repo kernel...'
linux /boot/vmlinuz-linux root=UUID=a2f388e5-b566-4eb3-9db8-0d80579dfd15 ro quiet ro raid=noautodetect libahci.ignore_sss=1 loglevel=3 ipv6.disable=1 logo.nologo fastboot init=/usr/sbin/e4rat-preload-lite quiet ro raid=noautodetect libahci.ignore_sss=1 loglevel=3 ipv6.disable=1 logo.nologo fastboot init=/usr/sbin/e4rat-preload-lite
echo 'Caricamento ramdisk iniziale...'
initrd /boot/initramfs-linux.img
}
menuentry 'Arch GNU/Linux, with Linux core repo kernel (Fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-core repo kernel-fallback-a2f388e5-b566-4eb3-9db8-0d80579dfd15' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 a2f388e5-b566-4eb3-9db8-0d80579dfd15
else
search --no-floppy --fs-uuid --set=root a2f388e5-b566-4eb3-9db8-0d80579dfd15
fi
echo 'Caricamento Linux core repo kernel...'
linux /boot/vmlinuz-linux root=UUID=a2f388e5-b566-4eb3-9db8-0d80579dfd15 ro quiet ro raid=noautodetect libahci.ignore_sss=1 loglevel=3 ipv6.disable=1 logo.nologo fastboot init=/usr/sbin/e4rat-preload-lite quiet ro raid=noautodetect libahci.ignore_sss=1 loglevel=3 ipv6.disable=1 logo.nologo fastboot init=/usr/sbin/e4rat-preload-lite
echo 'Caricamento ramdisk iniziale...'
initrd /boot/initramfs-linux-fallback.img
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" --class memtest86 --class gnu --class tool {
insmod part_msdos
insmod ext2
set root='hd0,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos5 --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5 a2f388e5-b566-4eb3-9db8-0d80579dfd15
else
search --no-floppy --fs-uuid --set=root a2f388e5-b566-4eb3-9db8-0d80579dfd15
fi
linux16 ($root)/boot/memtest86+/memtest.bin
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Recovery Environment (loader) (su /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-DAA41C49A41C2B11' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 DAA41C49A41C2B11
else
search --no-floppy --fs-uuid --set=root DAA41C49A41C2B11
fi
drivemap -s (hd0) ${root}
chainloader +1
}
menuentry 'Windows 7 (loader) (su /dev/sda2)' --class windows --class os $menuentry_id_option 'osprober-chain-0010A7B110A7ABDA' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos2'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2 0010A7B110A7ABDA
else
search --no-floppy --fs-uuid --set=root 0010A7B110A7ABDA
fi
chainloader +1
}
menuentry 'Windows 7 (loader) (su /dev/sda3)' --class windows --class os $menuentry_id_option 'osprober-chain-ACB4AEFFB4AECB62' {
insmod part_msdos
insmod ntfs
set root='hd0,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 ACB4AEFFB4AECB62
else
search --no-floppy --fs-uuid --set=root ACB4AEFFB4AECB62
fi
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###Offline
Fallback and Recovery entries are different. Recovery entries remove "quiet" and add "single" to the kernel parameters to boot in single user mode. Fallback entries in Arch are for falback initramfs. Both are not same. This is not a bug. Fallback entries are always created. To change this you may have to modify /etc/grub.d/10_linux file.
Offline
OK, I think I know what's happening. Arch actually creates an initramfs for the fallback. It's not a "recovery mode" the way grub thinks of it -- "recovery mode" to grub means using the same kernel and initramfs as the normal boot, but only booting into single-user mode. Because Arch creates an initramfs for the "fallback" mode, grub creates a menu entry for it, no matter what you set in your grub file.
You could get rid of the fallback menu entries by renaming or moving the fallback initramfs:
cd /boot
sudo mkdir fallback
sudo mv initramfs-linux-fallback.img fallbackand then running mkconfig again. But this might not be a good idea -- you might want those fallback images at some point. And every time you update your kernel, the fallback initramfs will be recreated and the menu entry will show up again.
(edit) ridikulus rat was faster, and has another solution. You could modify the code in /etc/grub.d/10_linux to suppress the fallback entries.
Last edited by 2ManyDogs (2012-08-16 15:24:55)
Offline
Ok, thanks for the clarification!
So, it is not an issue with grub, as i meant.
I do not need to hide them, i only wanted it in order to avoid having too much entries in my menu (2 for each kernel), and when i discovered this behaviour, i thought it was a bug and opened this thread.
Thank you very much!
Offline
Pages: 1