Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (Not For Questions)
FedoraForum Search

Forgot Password? Join Us!

Guides & Solutions (Not For Questions) Post your guides here (No links to Blogs accepted). You can also append your comments/questions to a guide, but don't start a new thread to ask a question. Use another forum for that.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 8th May 2017, 02:02 PM
gordon64
Guest
 
Posts: n/a
linuxfirefox
booting Fedora from grub2 command line

Longer title
You have some kind of error and instead of a grub menu you arrive that a grub prompt
OR
your selection fails to boot

---for non-UEFI (no windows users)

this howto if it fails for you, would also suggest you have some kind of backup

I use a live cd/usb stick with fsarchiver but there a lots of other backups you can do it too.

One day your grub menu drops to a prompt and you don't know what to do next?

step one (Personal opinion)
Get rid of LVM/RAID and have ext4 partition for / and only optional for /boot

reason: Keep it Simple Stupid (KISS)

step two
use gparted or e2label to label your partitions with easy to remember names.

for my internal names I use p1 p2 p4.....p3 is my swap so I don't need to boot it

for other drives including USB bootable drives you must not use the same names but have some easy to remember system.
If you have too many bootable sticks then mark them or label them

eg pur1 pur2 means purple usb stick partition 1 2 respectively

You do not need to remember what your label for any separate boot partition is,
but you need to remember what partition number it is.

You need to remember what your label for / is.

Hint, keep it simple boot is a sub-folder for me.

remember grub2 counts hard drives from zero and partitions from one.

step 3
Read your current /boot/grub/grub.cfg

but bits can be ignored. Where you see linux16 it means the same as linux.

step 4
write notes on the essential comands you can glean from that grub.cfg more below

Pay attention to various video chipsets that might need nomodest, noapic and other strange things

step 5
Be aware that grub2 at command line normally allows autocompletion by pressing the TAB key
and
if there are a range of options for something1 something2 something3......
typing so (and pressing TAB key will offer those options to you)

Depending on what words it finds depends on what options are offered.
If its a unique name like vmlinuz then typing "vm" and pressing TAB key will suffice

image is for initrd but kernel line is same thing


Lets try it

after bios I see a grub menu
press the C key (lower case c will work) to get to command mode

I now type the following commands, shorter than your list,

Code:
set root=hd0,3
linux /boot/vm  (and press the TAB key to see a range of options)
normally you will not choose the rescue kernel but the latest kernel.

so pretend you type 4.10.13 (press the TAB key to auto complete the full kernel name)

Now we need to tell the kernel where is / and here is why LABEL kills UUID users

I type after autocompleting the kernel

Code:
root=LABEL=p3
For those people still using UUID I will drink one beer for your cheerful disposition

I don't worry about extras like ro, nomodeset etc unless you know you need it. I have intel card

next line
#######

Code:
initrd  /boot/initramfs- (and press the TAB key)
options will include rescue initramfs but I will type
4.10.13 (and press TAB key) to auto complet the same kernel number I chose in the linux (kernel) line

If you can not remember that the initrd name is initramfs you must remember the 2 lines are

linux
initrd

and on the initrd and typing initrd /boot/ just press the TAB key to see what options are

next line
########

boot


and cross your fingers it works

image shows no use of TAB key. I made one typo and by pressing the UP key I was able to repeat the command and fix the typo.



Errors

If auto completion is not working it may be because a module has failed to load.

run
Code:
lsmod
minimum needed as below

If lsmod does not show ext2, gzio, part_msdos as loaded then you will need to load them like this



Code:
insmod ext2, gzio, part_msdos
Reply With Quote
Reply

Tags
booting, command, grub2

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
booting to command line kc2dws Using Fedora 5 4th December 2008 02:05 AM
Fedora booting to command line bhakti Using Fedora 4 30th March 2006 03:47 AM
command line for booting ieeestd802 Using Fedora 2 20th October 2004 03:57 AM


Current GMT-time: 18:31 (Saturday, 22-07-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat