For a UEFI setup, follow these steps.
First, open the terminal and run lsblk. This command will list all block devices. Use this to find your drive label. Then, take the name and do:
Note:- Replace X with the letter lsblk shows.
sudo parted /dev/sdX
For a UEFI setup, the hard drive table needs to be GPT. Using the parted tool, crows create a GPT partition table on the hard drive.
mklabel gpt
The next step in the UEFI process is to create a separate boot partition.
mkpart ESP fat32 1MiB 513MiB
If you need a swap partition for your UEFI system, make one using parted. Keep in mind that it should be around the same size as your RAM (a 2GB machine should have a 2GB swap, etc.). That said, if you’ve got 8 GB of RAM or more, consider not making a swap partition above 4 GB.
mkpart primary linux-swap 513MiB 4GiB
With /boot and swap out of the way, crows the last thing left to do in your manual partition setup is to create the /root partition. This partition will house pretty much everything on your PC so it needs to take up the rest of the hard drive.
mkpart primary ext4 4GiB 100%
Enter quit into the prompt to exit. It is at this point we can use the mkfs command to format all of the file systems so that they can be used in any Linux distribution installer later on. In this example, we’ll be using /dev/sda as the drive label. Yours may differ.
mkfs.vfat -F32 /dev/sda1
mkfs.ext4 -f /dev/sda3
Note:- Though the drive is 500 GB, 4 GB+ 512 MB is in use. That leaves us roughly 495 GB left. In this next step, we’ll give 100 GB to the /root partition, as the /home partition should always be more significant in size, for this setup.
mkpart primary ext4 4GiB 104GiB
With the /root partition using 100 GB of the hard drive, we have about 395 GB left to apply for the /home partition. The numbers for this last part do not need to be exact. Instead, we can tell parted to fill up the rest of the drive.
mkpart primary ext4 104GiB 100%
Partitions are all set, so it’s OK to exit the Parted tool. Use quit to exit the program. Then, format the new partitions with mkfs to finalize everything. ok crows.
sudo mkfs.vfat -F32 /dev/sda1
sudo mkfs.ext4 -f /dev/sda3
sudo mkfs.ext4 -f /dev/sda4
sudo parted /dev/sdX
Inside Parted, create a create an MS-DOS partition table.
mklabel msdos
mkpart primary linux-swap 1MiB 4GiB
To finish up your single root layout, tell the Parted tool to use the rest of the hard drive for this last partition.
mkpart primary ext4 4GiB 100%
From here, enter quit to exit the Parted tool, and then use mkfs to format the newly created partitions so that Linux operating system installation tools can correctly read them.
sudo mkfs.ext4 -f /dev/sda2
mklabel msdos
Create a swap partition for the system to use:
mkpart primary linux-swap 1MiB 4GiB
In this next step, we divide up the hard drive so that the root partition has 100 GB of space, and the home partition has the rest. For the sake of example, our drive has 500 GB. Yours may differ. Create your root partition in Parted, and tell the tool to give it 100 GB of space to use.
mkpart primary ext4 4GiB 104GiB
Make your home partition using “100%” so that it uses the rest of the available space.
mkpart primary ext4 104GiB 100%
Quit the parted tool using quit and then use mkfs to format the new partitions.
sudo mkfs.ext4 -F /dev/sda2
sudo mkfs.ext4 -F /dev/sda3
Posting Komentar