Install Grub on USB memory (UEFI) ~ Boot Linux from grub on USB memory ~

I installed grub on a USB memory with the above. Finally, let's actually start grub from the USB memory

Restart the PC, and when the power is turned off, start it while pressing and holding the F12 key etc. Most PCs should now be able to choose USB. (I'm sorry if it's different)

Then, I think that it is as follows on a black screen.



It is stopped at such a screen. If this comes out, it is a success. Now let's boot Linux. The following three pieces of information are required to boot Linux.

  1. Partition where Linux is installed
  2. Linux kernel and start path of installation location
  3. The path of the software required to load the processing required for startup into memory

First, check the partition where Linux is installed. This is the most troublesome. First, type the command as follows (... is omitted)


(memdisk) (hd0) (hd1) (hd1,gpt8) (hd1,gpt7) (hd1,gpt6) ...

It should look like this. This shows all the storage areas and their partitions connected to your PC. It was as follows in my environment

hd0=usb hd1 = SSD in PC --gpt1 = 1st partition --gpt2 = 2nd partition .... --gpt8 = 8th partition

It is shown in the form of. This depends on the SSD and HDD environment of each PC. (In fact, my environment has too many hd1 partitions, I wonder if this is the cause of the malfunction ...)

In other words, Linux is included in any of hd1's gpt1 to gpt8. You can find out which partition has Linux in the following way.


grub>ls (hd1,gpt8)/
lost+found/ boot/ hdata/ etc/ media/ var .....

If you see lost + found boot / .... as above, that is the Linux installation location. This time it was in hd1 (PC SSD) gpt8 (8th partition). The important one is (hd1, gpt8).

Next, the rest 2. Linux kernel and start path of installation location 3. The path of the software required to load the processing required for startup into memory Speak about Please note that # (1) in the following commands is described below.


grub>set root=(hd1,gpt8)/
grub>linuxefi /boot/vmlinuz root=/dev/sda8    #(1)
grub>initrdefi /boot/initrd.img

Note "sda8" in root = / dev / sda8 for # (1). This is the first path where Linux is installed. This is different for each person, but it seems that it often works well if you combine the number (8) of "gpt8" of (hd1, gpt8) and "sda8" of root = / dev / sda8 that you entered earlier. Please note that this number is different for each PC. This part is the linux kernel (vmlinuz) and the first path (sda8) of the installation location.

And the last initrdefi is the software path (initrd.img) needed to load the memory for the process needed to start.

Hopefully you can now boot Linux with grub installed on a USB stick 。 Thank you for reading.

Recommended Posts

Install Grub on USB memory (UEFI) ~ Boot Linux from grub on USB memory ~
Install Grub on USB memory (UEFI) ~ grub installation ~
Install Grub on USB memory (UEFI) ~ USB preparation ~
Install Grub on USB memory (UEFI) ~ USB preparation and confirmation ~
Create a permanent write area on Kali Linux with USB memory boot
How to install Linux on a 32bit UEFI PC
Install Minecraft on Arch Linux
Install Linux on your Chromebox
Install the JDK on Linux
Install tomcat 5.5 on Amazon Linux.
Install Homebrew on Amazon Linux 2
Install strongSwan 5.9.1 on Amazon Linux 2
Install Linux (CentOS) on your PC using a USB stick
Install Python Pillow on Amazon Linux
Install oracle java8 on amazon linux2
Install CUDA on Linux Mint Mate 20
Install Arch Linux on DeskMini A300
How to install VMware-Tools on Linux
Install pyenv on EC2 (Amazon Linux)
Make Live USB on Alpine Linux
[Note] Install Imagick on Amazon Linux2
I'll install Ruby on EC2 (Amazon Linux2) 2020
Install scipy on Linux without internet connection
Install wsl2 and master linux on windows
USB boot on Raspberry Pi 4 Model B
Install and launch k3s on Manjaro Linux
Install and Configure TigerVNC server on Linux
How to install packages on Alpine Linux
5 reasons to install Linux on your laptop.
How to install Anisble on Amazon Linux 2
Dockerfile: Install Docker on your Linux server
Install Mecab on Linux (CentOS) with brew
Install ubuntu on 32bit UEFI Ultra Notebook
How to install php7.4 on Linux (Ubuntu)
Arch Linux install to BIOS boot system
Install rJava on Linux in R3.6 environment.
Linux Mint can't boot on ASUS X205TA
Until you install Arch Linux on VMware
Install PostgreSQL from source code on CentOS
Install Python 3.8, Pip 3.8 on EC2 (Amazon Linux 2)
Linux "Install on / dev / sda" error resolution
Until you create an Ubuntu boot USB on your Macbook and install Ubuntu on your Thinkpad
Install debian on linux on Arrows tab Q584 / H
Install Anydesk Linux version on Chromebook [Result NG]
[Note] Install wxPython 3.x on Linux Mint (Ubuntu)
Cross-compile windows version from nim on arch | linux
Easy way to load CPU / memory on Linux
Boot CentOS 8 from Windows 10 with Wake On LAN
Arch Linux install to RAID1 storage (BIOS boot)
How to install Camunda Modeler on Manjaro Linux
Install PHP 7 series on Amazon Linux 2 with Amazon Linux Extras
How to create a USB that Linux and Win10 installer and winpe can boot UEFI