1

I have Ubuntu installed and running fine on my 500gb SSD and I want to set up my second hard drive. But I don't just want a new location in my file manager (nemo) I want to set the hard drive location to /home/$USER/Videos that way when I go to that location and open it the hard drive with all my media on it opens. the second hard drive is NTFS for the moment but that can change if necessary, it doesn't have to be visible to windows but I would prefer it if possible.

I've looked into several things including Ubuntu tweak but it inst around for 17.10 and also this Change default user folders path?

2 Answers2

1

I mount a 2nd disk with the following line in /etc/fstab: (Note: Your UUID= value Will Be Different - use lsblk --output="NAME,FSTYPE,MOUNTPOINT,LABEL,UUID")

UUID=362254e8-2b99-442d-8ad9-4a348bc08032 /home/w3/mnt/SP ext4 nodev,nosuid,noexec,noauto,user,rw 0 0

I have to use the noauto, and issue mount ~/mnt/SP after login, because I have an encrypted $HOME, and /home/w3/mnt/SP does not exist earlier.

I also don't want the disk mounted at all times. Since you do, you could put this in your ~/.bashrc:

if [[ $(mountpoint -q $HOME/Videos; echo $?) != 0 ]] ; 
then
    mount $HOME/Videos
fi
waltinator
  • 36,399
0

OK guys and gals hear goes. I'm not good at these so bear with.

  • open terminal and enter (thank to waltinator for the command)

    lsblk --output="NAME,FSTYPE,MOUNTPOINT,LABEL,UUID"
    
  • this gave my harddrive id 9A14124414122433

  • run command (just in case)

    sudo cp /etc/fstab /etc/fstab.backup
    
  • edit fstab and add

    UUID=9A14124414122433 /media/Videos ntfs defaults 0 0
    
  • deleted my /home/user/Videos folder and rebooted

  • run command

    rm -rf ~/Videos && ln -s /media/Videos ~/Videos
    
wjandrea
  • 14,236
  • 4
  • 48
  • 98