Next, let's prepare USB To boot grub with UEFI, you need to install grub on the first partition of MBR and USB. The USB MBR is shown in the above. In this article, I will show you how to create the first partition in USB, and then format it to make Linux recognize the created partition. Enter commands interactively, paying attention to the part supplemented with # below. (... is omitted)
fdisk
$sudo fdisk /dev/sdc
command(Help with m):n #Create a new partition with "n"
Partiton type:
p primary....
e extended
Select (default p):p #Partition with "p"---
Partition number(1-4 default1):1 #Create the first partition with "1"
First sector...: #Enter(Use 2048)
Use the initial value 2048
Last sector....:+3G #Specify the capacity of the partition to be created(3GB)
command(Help with m):p #Display the contents of the USB memory after partition creation
Disk /dev/sdc: 7.7 GB ...
...
Device boot starting point... ...
/dev/sdc1 ... #"Sdc1" is displayed = 1st partition has been created
command(Help with m):w #Save changes with "w"
The partition table has changed!
Enter commands interactively, paying attention to the part supplemented with # above. This will create a partition with the name sdc1.
Next, let's "unmount" the created partition and then "format" it.
If you compare the current stage to a pool such as a school When the carpenters created a pool on the designated site (/ dev / sdc1) on the school grounds (/ dev / sdc), the carpenters are wandering around in the pool. For the time being, the carpenter is in the way, so let's get out. This is "unmount". And the work of filling the empty pool with water is "formatting". By doing this, the pool (/ dev / sdc1) is actually ready for use.
mkfs
$sudo umount /dev/sdc1 (1)
$sudo mkdosfs -F32 -nGRUB /dev/sdc1 (2)
It is unmounted in (1). Formatted (FAT32) in (2). By the way, you can name the created partition area by changing the GRUB part of -nGRUB. Please attach it as you like.
At this point, USB preparation is complete. Finally, Next article will move you to the installation of Grub.
Recommended Posts