|
9 years ago 17 |
Why create a separate data partition instead of a separate /home partition?
Notes on the example used for this tutorial:
Use GParted from a live Mint DVD/USB to create the partitions for your installation(s). (You can do it from within the installer also, but GParted is easier.) Or, use it to make changes, additions, etc. to the partitions you have and to create the data partition. Format the data partition according to your needs -- eg. Ext4 if using just Linux OS's; NTFS if sharing data with MS Windows. (Here is a GParted tutorial if you need it: http://www.dedoimedo.com/computers/gparted.html.)
(NOTE: It may be best to copy/paste these commands. On some it is hard to tell that spaces are between some of the characters and that may cause an error if you mis-type them.)
After partitions are created and you've installed Mint (or additional Linux distro's), create a mount point for the data partition:
sudo mkdir /mnt/DATA
Mount the partition:
sudo mount /dev/sda5 /mnt/DATA
Take ownership of the mount point:
sudo chown -R yourusername: /mnt/DATA
Navigate to the new data mount point:
cd /mnt/DATA
Create typical home folders and/or any others you want for the data:
mkdir Documents Downloads Music Pictures Videos
(Note: I didn't bother with "Desktop" because not typically used to store data.)
Find out the UUID# for your data partition:
sudo blkid
Open your fstab file and make an entry to auto-mount the data partition on boot:
gksu gedit /etc/fstab
(Note: you may need to substitute a different text editor if gedit not installed to your version of Mint.)
In gedit, add either of the two examples below (substitute your UUID# for the ones listed here):
For an Ext4 formatted partition, add these two lines to end of fstab file:
# Mount DATA partition under /mnt/DATA
UUID=ceee2524-7df2-4d21-a1f7-9e7e55c722cc /mnt/DATA ext4 defaults 0 2
For an NTFS formatted partition, add these two lines to end of fstab file:
# Mount DATA partition under /mnt/DATA
UUID=747D4C9C1EFAD1F2 /mnt/DATA ntfs-3g defaults,windows_names,locale=en_US.utf8 0 0
Save the changes to fstab and close the text editor.
Now you have a choice to either use "symlinks" between /home and the data partition, or to "bind" each directory in the data partition to the existing directories in /home.
If you use symlinks, delete the existing /home folders that you made duplicates of in the data partition. (You can't create a symlink of the same name as an already existing folder.) Copy off any data you want saved in those folders before deleting them. Then create symlinks for each following this format:
ln -s /mnt/DATA/Documents /home/yourusername
ln -s /mnt/DATA/Downloads /home/yourusername
ln -s /mnt/DATA/Music /home/yourusername
etc., etc....
If you bind the directories to home, keep the existing folders in /home because they will serve as mount points using the bind method. Follow these instructions for binding the data partition folders to your /home folders: http://forums.linuxmint.com/viewtopic.php?f=42&t=74321. (Option #3 is probably best -- "Auto Mount at Boot by creating your own Upstart script".)
That's it.
Nope. Doesn't work. Bricked my Sudo. Reverting.
Thanks Alot
it still works, but i had to change gksu gedit /etc/fstab to
pkexec nano /etc/fstab
linux mint 19.3 xfce
Hi - this is a great tutorial, very useful for nubi to duel boot. However could do with an update
All good as far as:
Open your fstab file and make an entry to auto-mount the data partition on boot:
gksu gedit /etc/fstab
(Note: you may need to substitute a different text editor if gedit not installed to your version of Mint.)
-
Text editor now - xed
also
gksu
command no longer recognised (what should I use in 19.2?)
And finally I don't understand the line
Now you have a choice to either use "symlinks" between /home and the data partition, or to "bind" each directory in the data partition to the existing directories in /home.
and any implications of a choice.
This helps bigly. Thanks much.
Great help to me. Thank you!
Thank you!
could someone help me ?
I'm newbie to this,
I have done this partitioning
5. Gb → Primary → /swap
1.5 Gb → Primary → /boot
50 Gb → Primary → /
100 Gb → Logical → /home
rest Gb → Logical → /Data
but now when I make an Acronis image...it saves double the data, because Data si in / also.
The partitions were made with live CD - XFCE 17, at the beginning of the installation.
Perfect I have been looking for exactly this advice to help me set up the new desktop with multiple Linux OS.
Superb, Just what I was looking for. Many thanks