Re: grub menu

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

 



On Mon, Nov 12, 2018 at 3:05 PM Tom Horsley <horsley1953@xxxxxxxxx> wrote:
>
> If I edit the grub.cfg file and replace this absurd
> chunk of gibberish:
>
> if [ x$feature_timeout_style = xy ] ; then
>   if [ "${menu_show_once}" ]; then
>     unset menu_show_once
>     save_env menu_show_once
>     set timeout_style=menu
>     set timeout=60
>   elif [ "${menu_auto_hide}" -a "${last_boot_ok}" = "1" ]; then
>     set orig_timeout_style=${timeout_style}
>     set orig_timeout=${timeout}
>     if [ "${fastboot}" = "1" ]; then
>       # timeout_style=menu + timeout=0 avoids the countdown code keypress check
>       set timeout_style=menu
>       set timeout=0
>     else
>       set timeout_style=hidden
>       set timeout=1
>     fi
>   fi
> fi
>
> with just
>
> set timeout=5
>
> will I get my grub menu back so I can do things
> like choose previous kernels?
>
> Or should I just delete the entire chunk of code
> between the 01_menu_auto_hide comments?
>
> And why isn't there a way to disable the whole
> auto hide nonsense? The only thing it appears to be
> checking is a serial console, no define you can provide
> to just say "Dammit! Don't hide my menu!"


I ignore the boilerplate and I run "chmod -x /etc/grub.d/*", copy one
of the two below into "/etc/grub.d/*", "chmod +x" it, and run
grub-mkconfig:


localhost ~ # cat 90-grub-console
#!/bin/sh

cat <<EOF
# menu
set default=0
set timeout=2

# kernel
insmod gzio

# disk/partition
insmod part_gpt

# filesystem
insmod ext2

# /boot
search --no-floppy --fs-uuid --set=root 2ffc4e71-31ca-4816-b969-2862937ee395

# video
terminal_input console
terminal_output console

menuentry 'multi' {
linux /boot/kernel root=UUID=2653b879-3c02-4d05-a678-315259e0e11f ro
initrd /boot/ramfs
}

menuentry 'single' {
linux /boot/kernel root=UUID=2653b879-3c02-4d05-a678-315259e0e11f ro single
initrd /boot/ramfs
}

menuentry 'emergency' {
linux /boot/kernel root=UUID=2653b879-3c02-4d05-a678-315259e0e11f ro emergency
initrd /boot/ramfs
}

menuentry 'multi (old)' {
linux /boot/kernel-old root=UUID=2653b879-3c02-4d05-a678-315259e0e11f ro
initrd /boot/ramfs-old
}

menuentry 'single (old)' {
linux /boot/kernel-old root=UUID=2653b879-3c02-4d05-a678-315259e0e11f ro single
initrd /boot/ramfs-old
}

menuentry 'emergency (old)' {
linux /boot/kernel-old root=UUID=2653b879-3c02-4d05-a678-315259e0e11f
ro emergency
initrd /boot/ramfs-old
}
EOF


localhost ~ # cat 90-grub-gfxterm
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.
# Type the menu entries you want to add after this comment.
# Be careful not to change the 'exec tail' line above.
# menu
set default=0
set timeout=2

# kernel
insmod gzio

# disk/partition
insmod part_gpt

# filesystem
insmod ext2

# /boot
search --no-floppy --fs-uuid --set=root 2ffc4e71-31ca-4816-b969-2862937ee395

# video
insmod all_video
insmod gettext
insmod gfxterm
loadfont $prefix/unicode.pf2
set gfxmode=auto
set lang=en_US
set locale_dir=$prefix/locale
terminal_input gfxterm
terminal_output gfxterm

menuentry 'multi' {
linux /boot/kernel root=UUID=2653b879-3c02-4d05-a678-315259e0e11f ro
initrd /boot/ramfs
}

menuentry 'single' {
linux /boot/kernel root=UUID=2653b879-3c02-4d05-a678-315259e0e11f ro single
initrd /boot/ramfs
}

menuentry 'emergency' {
linux /boot/kernel root=UUID=2653b879-3c02-4d05-a678-315259e0e11f ro emergency
initrd /boot/ramfs
}

menuentry 'multi (old)' {
linux /boot/kernel-old root=UUID=2653b879-3c02-4d05-a678-315259e0e11f ro
initrd /boot/ramfs-old
}

menuentry 'single (old)' {
linux /boot/kernel-old root=UUID=2653b879-3c02-4d05-a678-315259e0e11f ro single
initrd /boot/ramfs-old
}

menuentry 'emergency (old)' {
linux /boot/kernel-old root=UUID=2653b879-3c02-4d05-a678-315259e0e11f
ro emergency
initrd /boot/ramfs-old
}
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux