0

happy new year tp all of you, hope that this new year brings you all joy and happiness and succes, money, women, all that your hearts desire.

Im here on a quest, to seek help:

I have Linux on a dual-boot with windows 7. I have some files (large files to be precise) on the windows partition. Everytime i need to acces them i have to wait a couple of minutes so that Ubuntu mounts the partition, and many times i have to mount using terminal.. he just cant seem to do it on his own sometimes (weird though...)

so the question is, how to make it auto mount a partition (or a HDD for that matter) on startup?

I have checked some answers on this forum before seeking help. If i understood correctly i have to create a mounting point usinfg /mkdir then change something using fstab? But id really like an explanation on how, and why, and what each command does? I mean, to copy paste, i can do that, but id like to undestand what im really doing

the name of this partition (using df in terminal): /dev/sda3.

So thanks all for reading this message, and thank you for those who are going to answer. Saucy

3
  • After you added HDD to fstab you can try adding "mount hdd name" to /etc/local.rc it should work
    – XperianX
    Jan 13, 2015 at 19:22
  • @XperianX /etc/rc2.d might be more usefull, so always if his gui is started it is mounted. if you are using /etc/fstab you do not need to edit the upstart process (or is it init?) Jan 13, 2015 at 19:30
  • duplicate of askubuntu.com/questions/573000/… Jan 13, 2015 at 19:31

1 Answer 1

0

fstab is a file, found in /etc - it belongs to root so you must use sudo to edit it - it controls where all the components of the filesystem go. mkdir is just a command to create a directory.

If you wanted your drive to appear as, say, ~/windows, you would want to create that directory;

cd ~ ; mkdir windows

You then want to find out how the system sees /dev/sda3: sudo blkid /dev/sda3

/dev/sda3: LABEL="Var" UUID="4b0b7c0f-c09e-47a4-a5a6-c9ac3c8184a9" TYPE="ntfs"

This is because if you ever add another drive, the lettering may alter but the UUID won't. You can also see what format it has: ntfs most likely.

Then, you're ready to make the change -

sudo nano /etc/fstab or whatever editor you like.. and add the line

UUID=b0b7c0f-c09e-47a4-a5a6-c9ac3c8184a9 /home/you/windows ntfs defaults,user 0 2

to /etc/fstab - note that the UUID quotes are not used in the fstab. I have used ntfs in the example - use whatever format it gave from blkid! The final 2 numbers are 0 - pretty much always, see man fstab if you really want to know, & 2 - mount this after all the pass 0 & pass 1 drives so as not to delay boot.

Try sudo mount -a to check it actually works.

This doesn't take account of what seems a long delay in mounting at present - it may be a good idea to run a drive check in Windows?

2
  • see askubuntu.com/questions/573000/… Jan 13, 2015 at 19:31
  • hey !! thanks man, now it worked, at first i had a simple issue, did a dumb copy/paste without changing the UUID :S thanksman, really appreciate the help :) (i would have uped the answer... im 4 rep point short :'( sorry )
    – saucy
    Jan 13, 2015 at 20:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .