How to get to rescue mode when GRUB timeout is 0?
Hey!
I seriously messed up my grub.cfg
at /boot/efi/EFI/fedora/grub.cfg
and my GRUB timeout is 0 in /etc/default/grub
. I have to edit the file, but I do not have any way of accessing the disk. The only ways I can think of that are relevent (I have too many random thoughts :P):
- Reinstalling (worst idea)
- LiveUSB (meh, could do that)
- Rescue mode (easiest) So, any way of a rescue mode.
James
Here is my /etc/grub/default:
GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="vconsole.font=latarcyrheb-sun16 $([ -x /usr/sbin/rhcrashkernel-param ] && /usr/sbin/rhcrashkernel-param || :) rhgb quiet libahci.ignore_sss=1 raid=noautodetect" GRUB_DISABLE_RECOVERY="true"and my grub.cfg (relevent bits):
menuentry 'Fedora, with Linux 3.15.10-200.fc20.x86_64' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.15.10-200.fc20.x86_64-advanced-6b266543-a497-44de-981f-ee460b85590a' { load_video set gfxpayload=keep insmod gzio insmod part_gpt insmod ext2 set root='hd0,gpt9' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt9 --hint-efi=hd0,gpt9 --hint-baremetal=ahci0,gpt9 48ce0f9f-eee1-4f72-b90e-1a28e6a83c8e else search --no-floppy --fs-uuid --set=root 48ce0f9f-eee1-4f72-b90e-1a28e6a83c8e fi linuxefi /vmlinuz-3.15.10-200.fc20.x86_64 root=UUID=6b266543-a497-44de-981f-ee460b85590a rw vconsole.font=latarcyrheb-sun16 rhgb quiet libahci.ignore_sss=1 raid=noautodetect # initrdefi /initramfs-3.15.10-200.fc20.x86_64.img }
Now, that I think about it, I have to set root=/dev/sda10
instead of root=UUID=6b266543-a497-44de-981f-ee460b85590a
. Any ways to get to a command line (or however else I can fix it)?
Update: I have fixed the issue, but I still want to know a workaround to this in case it happens again. I won't test any of the answers (don't want to mess it up again).
Would I have to use a LiveUSB? :/
I used a LiveUSB and fixed it :). BTW, for those who are on UEFI, use the tool
Rufus
on Windows to burn your iso. It sent me to a dracut, but hey, it works! After you're in:BTW, for people who want to know what happened, I took out the initramfs line from grub.cfg :P.
Late to the party, and totally untested (woohoo).
:)
I heard about an urban legend of holding theShift
key at a certain point to dismiss thetimeout
setting. Not like an undocumented feature (actually the GRUB documentation clearly says that this statement is false); but there's an interesting way to write a fallback mode usingkeystatus
, so GRUB might change its timeout setting on runtime if any combination ofCtrl
,Alt
orShift
is pressed while the little rascal is being invoked.:)
My
keystatus
mention was actually hyperlinked, but due to the monospaced font, it doesn't appear like an hyperlink, so here's the corresponding documentation.:)