# Trying to manually boot from grub

As title say, i want to manually boot from grub. This is because at school i will need to manually boot Fedora from an USB. From home this works just fine. I don't need to manually boot, i just choose the fedora version i want from grub menu and go using the same USB.

I tried to do the following to manually boot.

1. set the root in my case this is set root=(hd2,msdos4) these values come from the /boot/grub2/grub.cfg
2. set the linux img by typing linux /boot/vmlinuz-5.....
3. set the initrd by typing initrd /boot/initramfs-5....
4. type boot

This does however not work. The process fails to start "switch root" and that's it i can't get passed this stage.

edit retag close merge delete

1

First of all, to perform normal USB boot, you just select your USB as boot device on computer startup. It's much easier than what you want to achieve using grub. Just in case you heven't thought about is yourself.

If you can't do it for some reason, and need to manually boot from grub, then here's some tips.

1. There are some grub commands that can help you probe for devices you need. Read about them, and use help in grub cli. It's quite useful to set pager=1 (or maybe just pager=1) so that you could read long text screen-by-screen.
( 2019-04-16 04:02:28 -0500 )edit
1. You need to set root= on your step 1 to the device you'll be booting from, i.e. to the device where /boot/vmlinuz-... and initramfs is located. Autocompletion works in grub, and you can probe for these files with some of the commands, ls for example.

2. Some of the parameters on the linux ... line in grub.cfg can be necessary to boot successfully. root= is one of them.

3. Do you use Fedora's live USB or Fedora installed on USB. Live USB could be easier to boot with chainloader grub command (haven't tried it myself for usb booting).

( 2019-04-16 04:09:51 -0500 )edit
1. Instead of live USB as such it can be easier to boot from grub Fedora's ISO written to USB. There are quite a few how-tos how to do it, they are quite easy to find.

2. Speaking of how-tos, you can find some about booting manually, here's one. There author tells you need to specify root on linux ... line, maybe that's what you haven't done? Also check his remark about LVM, by default Fedora uses LVM, look at your grub.cfg.

Hope it helps in some way or another. )

( 2019-04-16 04:23:45 -0500 )edit

Sort by » oldest newest most voted

I think you're missing the boot parameter that tells systemd what to mount as the root file system. It doesn't know this automatically, you have to tell it. On a default Fedora installation it's something like root=/dev/mapper/fedora-root but even easier is to just use the grub.cfg that I assume is on this USB stick. At the grub prompt you'd do configfile (hd2,msdos4)/grub2/grub.cfg and now you'll see your normal grub menu and can boot it.

more