In this tutorial I want to install Linux on my laptop using a flash drive. with dd command in the linux terminal. Here are the steps:
I. Identify the location of The Flash Drive installed in the linux system
lsblk
The result is:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 111,8G 0 disk
├─sda1 8:1 0 549M 0 part
├─sda2 8:2 0 56,3G 0 part
└─sda3 8:3 0 55G 0 part /
sdd 8:16 1 3,7G 0 disk
└─sdd1 8:17 1 3,7G 0 part /media/helmiz/HELMI <<< My Flash Drive
sr0 11:0 1 1024M 0 rom
II. Unmount The Flash Drive
sudo umount /dev/sdd1
III. Create partition and wipe all The Flash Drive data
Type FDISK:
sudo fdisk /dev/sddType
pfor print information about our flash drive in the screen:Disk /dev/sdd: 3,75 GiB, 4002910208 bytes, 7818184 sectors Disk model: DataTraveler G2 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: 0x15f006ae Device Boot Start End Sectors Size Id Type /dev/sdd1 2048 7818183 7816136 3,7G 7 HPFS/NTFS/exFATType
dfor wipe partitions.Type
ofor create new DOS partition.Type
nfor create new partition.The next thing will show type of partitions Primary or Extended, press enter.
Partition type p primary (0 primary, 0 extended, 4 free) e extended (container for logical partitions) Select (default p):And then we will create number of sector partitions, just press enter for default value:
Using default response p. Partition number (1-4, default 1): First sector (2048-7818183, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-7818183, default 7818183):Default type of partition will created as Linux. Type
lshow all type of partitions.7 HPFS/NTFS/exFATfor NTFS partition andb W95 FAT32for Fat32 partition. Typetfor change the partition type.Type
wfor write the flash driveType
qfor quit.
IV. Format Flashdisk
Format with Fat32:
sudo mkfs.vfat -F32 -n NAME /dev/sdd1Format with NTFS:
sudo mkfs.ntfs -f -L NAMA /dev/sdd1Notes: -
-n NAME: Flash Drive name (capital letters)Format with exFat:
sudo apt install dosfstools exfat-fuse exfat-utils sudo mkfs.exfat -n NAMA /dev/sdd1
V. Flash Drive not detected by Windows
- Go To Partition Manager in Windows.
- Choose and right click in Flash drive which not detected.
- Click Change letter….
- Choose the Letter for our Flash Drive.
VI. Bibliography
Kumar, Rahul. How To Format USB Drive in Linux Command Line (accessed on 1 April 2020).
Saive, Ravi. 2015. 10 fdisk Commands to Manage Linux Disk Partitions (accessed on 26 Mei 2020).
Bunic, Darko. 2020. How to create FAT32 USB drive on Linux (accessed on 26 Mei 2020).
Gary Explains. 2019. How to Partition and Format a Disk in Linux (accessed on 26 Mei 2020).