Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have Linux mint 13 maya installed on USB Pendrive (my portable linux). I run it on different computers. Is there a way to set the fstab to auto mount the hard drive from X computer at boot?

So far i have this fstab

proc    /proc   proc    nodev,noexec,nosuid 0   0
tmpfs                  /tmp          tmpfs     nodev,nosuid          0      0
UUID="3f4f873f-3429-49ec-aa92-c0b32f22b057" none    swap    sw  0   0
/dev/sdb1   /   ext4    noatime,relatime,errors=remount-ro  0   1
#/dev/sda2  /media/win7 defaults,nofail,user,noauto 0   0

I would like Mint would be able to mount partition /dev/sda2 on my laptop. When the partition doesn't exist at boot the system prompts what to do. I would like the system to ignore the mount when the partition is not present.

Is there some way to archieve it?

share|improve this question

1 Answer 1

You have an error on your mount line.

/dev/sda2 /media/win7 defaults,nofail,user,noauto 0 0

You're missing the filesystem type. It should read:

/dev/sda2 /media/win7 ntfs-3g defaults,nofail,user,noauto 0 0

Assuming you have the ntfs-3g software installed on your pendrive.

If you haven't got ntfs-3g install it with:

sudo apt-get install ntfs-3g

You may want to also look through this link from the ubuntu forums on safe read/write for ntfs volumes.

http://ubuntuforums.org/showthread.php?t=217009

Mind you, this also assumes that the drive will always be at /dev/sda2 and that the drive is formatted as ntfs. It may not be. But at least this should work for your laptop and a some computers. If I'm not mistaken win7 also has a tiny partition at the beginning of the drive used for the boot loader so the C drive may even be at /dev/sda5.

share|improve this answer
    
Write access to NTFS via Linux is still considered a bad idea. NTFS is closed source and I have known it to corrupt more than one NTFS partition. Beware –  steve Jun 20 '12 at 3:28
    
is it possible to use UUID to mount the ntfs partition? –  chepe263 Jun 20 '12 at 18:16

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.