Instructions for creating a master partition in Ubuntu
TipsMake.com - Ubuntu does not use a separate master partition by default, although many Linux users prefer this. Use a separate master partition to allow you to reinstall Ubuntu without losing personal files and settings.
While a master partition is usually selected during installation, you can also move the master partition after installing Ubuntu.
During Ubuntu installation
Creating a home folder (Home Folder) while installing Ubuntu is easy. Choose the option to install 'Something Else' to customize the partition and create multiple partitions. Set the mount point for each partition to '/' to contain the root file system and mount point of another partition as / home. When installing Ubuntu in the future, users can set the old master partition to / home again, but make sure not to tick the Format box or the entire file will be deleted.
After installing Ubuntu
If you did not create a master partition during Ubuntu installation, you do not have to reinstall Ubuntu from the beginning. To move the master partition after installation, we will have to create a new partition, copy the file from the current home directory to this partition and tell Ubuntu to extract the new partition at / home.
Step 1: Create a new partition
If there is an empty storage space, this step is easy. If not, we will have to resize the system partition and create a new partition at the empty storage space. If there is an empty storage space or you do not need to resize the system partition, you only need to install GParted and create a partition without rebooting from the CD. Here we create a partition named ext4.
Step 2: Copy the file in the Home Folder to the new partition
Ubuntu extracts the file to a new partition very easily, just click below the Devices section in the file manager. After that, click on the Go menu and select Location to view the mount point.
Launch the command window and execute the following command to create a copy of the current home directory on the new partition, with / mount / location as the location of the extracted partition:
sudo cp –Rp / home / * / mount / location
We will see an error about a .gvfs folder but it's okay, ignore it.
Users should check the new home directory to confirm that it contains your files. However, we have not deleted the old home directory yet.
Step 3: Locate the UUID for the new partition
The long string of characters is actually the new UUID of the partition and we will need it to add the partition to the fstab file to tell Linux the location of the partitions when it starts. Users can also locate the UUID by entering the following command in the command window:
sudo blkid
Step 4: Edit the fstab file
Before fixing the fstab file, we should create a backup to restore it if something goes wrong:
sudo cp / etc / fstab /fstab.backup
Next, enter the following command to open the fstab file in gedit. You can also use another text editor if you want.
gksu gedit / etc / fstab
Add the following text to the fstab file on a new line, replacing '_____' with the new master UUID from the sudo blkid statement on:
UUID = _____ / home ext4 nodev, nosuid 0 2
Save the file after adding the line.
Step 5: Move the home directory location and reboot
From the command prompt, enter the following command to move the current home directory to a reserved location and create another new, empty home directory for the new partition to populate:
cd / && sudo mv / home / home_old && sudo mkdir / home
Restart the computer after running this command. Can restart with the command:
sudo shutdown -r now
After restarting the computer, you can log in normally. Ubuntu now uses separate master partitions. After making sure everything is fine and you still have all the files in the / home directory, you can remove the / home_old folder to free up memory:
sudo rm -rf / home_old
You should read it
- How to Format a Hard Drive on Ubuntu
- How to delete a partition on Windows hard drive?
- What is the Master Partition Table?
- How to remove the drive partition on macOS
- Beautiful wooden living room partitions help the house more spacious and luxurious
- Restore deleted drive partitions with Active Partition Recovery
- How to access Windows encrypted partitions using Bitlocker from Linux
- 10 free partitioning tools
- 2 ways to hide hard disk partitions on Windows
- How to encrypt partitions on Linux with dm-crypt
- How to encrypt LVM partitions when installing Kali Linux
- Advantages and disadvantages of hard drive partitioning
Maybe you are interested
Instructions on how to fix the error of not being able to delete SSD Partition
How to delete a partition on Windows hard drive?
How to transfer free space from one partition to another in Windows 10
Top 12 free Windows drive partition management software
How to fix 'We Couldn't Create a New Partition' error in Windows 10
GPT partition, What is GUID?, Compare GPT with MBR