Note that I'M using Mint Linux with Cinnamon. I just got a new 250 Gig SSD and I'd like to have it mounted at /home/garrett. First of all, what's the best way to do this? Should I simply add a mount command to my .profile file? Secondly, I'M assuming that I'll need to move everything that's currently under /home/garrett to that drive before having it mounted, I figured things could get a little screwy if I'M logged in as garrett when this is preformed. So should I fist swith to runlevel 1 (single user no GUI) and log in as root as not to frak up anything when I move my files? Also, what command whould I use to move it all, I don't know if a simple mv would get it or not. I need to make sure I get everything including all the files that begin with '.'. Thanks.
Do all this as root: sudo su -
- Create a partition and file system in that partition on the new disc - use ext3 or ext4 file system types.
- When you create the file system, specify a label such as "garrett": mkfs -t ext4 -L garrett /dev/snX1 where /dev/sdX is the new disc, and 1 is the partition number. The label will allow the system to renumber the device ids and still find the file system to mount at boot time.
- Create a temporary mount point, such as /mnt/newdrive, and mount the new file system there: mount /dev/sdX1 /mnt/newdrive - run df after you do that to make sure you see the new drive.
- Move /home/garrett to /mnt/newdrive.
- Create a new /home/garrett directory with the appropriate ownership and permissions - this will be the new mount point where the system will mount the new disk.
- Assuming you are using ext4 as the file system type, add the entry "LABEL=garrett /home/garrett ext4 defaults 1 2" to /etc/fstab.
- umount /mnt/newdrive
- mount -a
Now, you should see your data in /home/garrett. Log back in as garret, and everything should look like it did before, except that you will now be on a nice clean 250GB file system! The next time you reboot, /home/garrett will be mounted before the system comes up.
Oops. I made a goof in the list above. Here is the correction.
- Move contents of /home/garrett, including hidden files and directories, to /mnt/newdrive.
- Do NOT bother to create a new /home/garrett directory, since this is where the new file system will be mounted.
Everything else will be the same. Sorry. My bad - posted the above late last night after only a couple of hours sleep the night before - brain fuzz. :-)