First we need to list devices partitions:
There are multiple ways of list partitions, we can use "$ sudo fdisk -l" and the output will be some thing like this:
Disk model: SSSTC CL1-4D256
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 09917C5B-23DC-4AD9-B75B-3CC8075DD834
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 1085439 1083392 529M Windows recovery environment
/dev/nvme0n1p2 1085440 1290239 204800 100M EFI System
/dev/nvme0n1p3 1290240 1323007 32768 16M Microsoft reserved
/dev/nvme0n1p4 1323008 361323007 360000000 171,7G Microsoft basic data
/dev/nvme0n1p5 496117760 500117503 3999744 1,9G Linux swap
/dev/nvme0n1p6 361324544 496117759 134793216 64,3G Linux filesystem
Partition table entries are not in disk order.
Disk /dev/sda: 7,51 GiB, 8053063680 bytes, 15728640 sectors
Disk model: Flash Disk
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0fd6299c
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 15728639 15726592 7,5G c W95 FAT32 (LBA)
In this example I have /dev/nvme0n1 (6 partitions) and /dev/sda (flash disk one partition)
Another way of list partitions is "$ sudo df -h" and this is an example of output:
udev 3,8G 0 3,8G 0% /dev
tmpfs 782M 2,1M 780M 1% /run
/dev/nvme0n1p6 63G 31G 29G 52% /
tmpfs 3,9G 0 3,9G 0% /dev/shm
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 3,9G 0 3,9G 0% /sys/fs/cgroup
/dev/loop0 237M 237M 0 100% /snap/code/112
/dev/loop1 128K 128K 0 100% /snap/bare/5
/dev/loop3 56M 56M 0 100% /snap/core18/2620
/dev/loop2 115M 115M 0 100% /snap/core/14056
/dev/loop4 237M 237M 0 100% /snap/code/113
/dev/loop5 73M 73M 0 100% /snap/core22/310
/dev/loop6 115M 115M 0 100% /snap/core/13886
/dev/loop7 219M 219M 0 100% /snap/gnome-3-34-1804/72
/dev/loop8 92M 92M 0 100% /snap/gtk-common-themes/1535
/dev/loop10 48M 48M 0 100% /snap/snapd/17336
/dev/loop12 56M 56M 0 100% /snap/core18/2632
/dev/loop13 64M 64M 0 100% /snap/core20/1634
/dev/loop18 66M 66M 0 100% /snap/gtk-common-themes/1515
/dev/loop17 51M 51M 0 100% /snap/snap-store/547
/dev/loop11 46M 46M 0 100% /snap/snap-store/599
/dev/loop15 219M 219M 0 100% /snap/gnome-3-34-1804/77
/dev/loop16 64M 64M 0 100% /snap/core20/1695
/dev/loop14 347M 347M 0 100% /snap/gnome-3-38-2004/119
/dev/loop19 21M 21M 0 100% /snap/terraform/430
/dev/loop9 21M 21M 0 100% /snap/terraform/418
/dev/loop20 50M 50M 0 100% /snap/snapd/17576
/dev/nvme0n1p2 96M 31M 66M 32% /boot/efi
tmpfs 782M 80K 782M 1% /run/user/1000
/dev/sda1 7,5G 6,6G 1004M 87% /media/ramos/ESD-USB
And we can use "$ sudo lsblk" as well and get an out put like this:
loop0 7:0 0 236,5M 1 loop /snap/code/112
loop1 7:1 0 4K 1 loop /snap/bare/5
loop2 7:2 0 114,9M 1 loop /snap/core/14056
loop3 7:3 0 55,6M 1 loop /snap/core18/2620
loop4 7:4 0 236,5M 1 loop /snap/code/113
loop5 7:5 0 72,8M 1 loop /snap/core22/310
loop6 7:6 0 115M 1 loop /snap/core/13886
loop7 7:7 0 219M 1 loop /snap/gnome-3-34-1804/72
loop8 7:8 0 91,7M 1 loop /snap/gtk-common-themes/1535
loop9 7:9 0 20,5M 1 loop /snap/terraform/418
loop10 7:10 0 48M 1 loop /snap/snapd/17336
loop11 7:11 0 45,9M 1 loop /snap/snap-store/599
loop12 7:12 0 55,6M 1 loop /snap/core18/2632
loop13 7:13 0 63,2M 1 loop /snap/core20/1634
loop14 7:14 0 346,3M 1 loop /snap/gnome-3-38-2004/119
loop15 7:15 0 219M 1 loop /snap/gnome-3-34-1804/77
loop16 7:16 0 63,2M 1 loop /snap/core20/1695
loop17 7:17 0 51M 1 loop /snap/snap-store/547
loop18 7:18 0 65,1M 1 loop /snap/gtk-common-themes/1515
loop19 7:19 0 20,5M 1 loop /snap/terraform/430
loop20 7:20 0 49,7M 1 loop /snap/snapd/17576
sda 8:0 1 7,5G 0 disk
└─sda1 8:1 1 7,5G 0 part /media/ramos/ESD-USB
nvme0n1 259:0 0 238,5G 0 disk
├─nvme0n1p1 259:1 0 529M 0 part
├─nvme0n1p2 259:2 0 100M 0 part /boot/efi
├─nvme0n1p3 259:3 0 16M 0 part
├─nvme0n1p4 259:4 0 171,7G 0 part
├─nvme0n1p5 259:5 0 1,9G 0 part [SWAP]
└─nvme0n1p6 259:6 0 64,3G 0 part /
Second, format the partition
In my case would be "$ sudo mkfs -t vfat /dev/sda1"
After, choose your iso to make the bootable usb
Make a bootable pendrive with dd command like this, "$ sudo dd if=/home/ramos/Download/mysystem.iso of=/dev/sda" (wait till finish, can take a couple of minutes).
Finish
Eject your pendrive this way "$ sudo eject /dev/sda1", don't forget to use your partition, ok?
IMPORTANT NOTICE: This amazing icon on the top was Charger icons created by Freepik - Flaticon
One thought to “Bootable USB with linux terminal”
Comments are closed.