practice / blog

For personal blogging
1 stars 0 forks source link

Linux partition using parted #49

Open practice opened 6 years ago

practice commented 6 years ago

https://askubuntu.com/a/811954

sudo lshw -C disk                # Checking the location of the new drive. It is /dev/sdb.     
sudo parted /dev/sdb mklabel gpt # Creating the GUID Partition Table (GPT)
sudo parted /dev/sdb print       # Checking that the GPT has been created
sudo parted /dev/sdb print unit MB print free # see 6001175MB size
sudo parted --align optimal /dev/sdb mkpart primary ext4 0% 6001175MB # Creating partition label
sudo mkfs.ext4 /dev/sdb1         # Creating the partition
sudo nano /etc/fstab             # Add line `/dev/sdb1 /crimea ext4 defaults 0 0`
sudo mount -a # Remount /etc/fstab without rebooting