Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Help mounting ntfs partition automatically. Fstab file type confusion.

  1. #1
    Join Date
    Oct 2012
    Location
    Hampshire UK
    Beans
    91
    Distro
    Lubuntu 16.04 Xenial Xerus

    Help mounting ntfs partition automatically. Fstab file type confusion.

    I have a dual boot XP installation with a shared ntfs partition.
    My old system was 12.04 and I have done a fresh install to 14.04 with manually created partitions.
    I am sure that both times I let the installation program create the shared partition as FAT and later I reformatted it to NTFS in the disk utility,( although I have just noticed that this now doesn't seem to present a list of file types.)

    As with the first 12.04 installation I have had problems with automatic mounting of the ntfs partition.
    As before I am trying to fix it using fstab, but am finding it more difficult this time for some reason.


    In terminal:


    fdisk -l sees /dev/sda7 as “HPFS/NTFS/exFAT”


    blkid sees it as UUID="421C9FB21C9FA009" TYPE="ntfs"


    fstab sees it as # /media/sda7 was on /dev/sda7 during installation
    UUID=9685-328A /media/sda7 vfat utf8,umask=007,gid=46 0 1
    (even when not mounted)


    finally, disk utility sees /dev/sda7 as


    NTFS — Mounted at /media/ben/421C9FB21C9FA009


    or

    Partition type HPFS/NTFS
    Contents NTFS — Not Mounted


    Why does each method show a different file type? Can anyone see what I have done wrong and recommend the best fix, using fstab?


    Why does fstab say “# /media/sda7 was on /dev/sda7 during installation “ ?


    I didn't see this message when I edited fstab the previous time. What does it mean? Is this a new phrase introduced between 12.04 and 14.04?

  2. #2
    Join Date
    Feb 2008
    Location
    Oblivion
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Help mounting ntfs partition automatically. Fstab file type confusion.

    Install ntfs-3g and ntfs-config. Run 'NTFS configuration tool' and set mount permission for sda7. That will rewrite your fstab. Reboot and see if it mounts ok.

    fstab is not dynamic. It doesn't change unless you change it. Makes no difference whether partitions are mounted or not. It is a set of static instructions.

  3. #3
    Join Date
    Jun 2006
    Location
    California
    Beans
    638

    Re: Help mounting ntfs partition automatically. Fstab file type confusion.

    Create a mount point for your NTFS partition. This is an example, you can name it what you want:

    sudo mkdir /mnt/Windows

    Then edit your fstab:

    sudo nano /etc/fstab

    Using the example:

    /dev/sdb7 /mnt/Windows ntfs-3g defaults 0 0

    Test to see if it mounts:

    sudo mount -a

  4. #4
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    3,723
    Distro
    Xubuntu 17.10 Artful Aardvark

    Re: Help mounting ntfs partition automatically. Fstab file type confusion.

    Your FAT partitions had UUID (=some kind of ID that stays fixed even when drives are swapped or partitions moved) 9685-328A. That is the UUID the installer put in fstab. After reformatting to NTFS the UUID changed to 421C9FB21C9FA009. This is the UUID that you have to put in fstab. I assume ntfs-config can do it for you, although it isn't very hard to do it manually.

    Also make sure you have a sensible mountpoint. Any empty directory will do, as long as it exists, but names like /media/ben/421C9FB21C9FA009 or /media/sda7 are not very practical.

  5. #5
    Join Date
    Feb 2008
    Location
    Oblivion
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Help mounting ntfs partition automatically. Fstab file type confusion.

    Quote Originally Posted by Impavidus View Post
    I assume ntfs-config can do it for you, although it isn't very hard to do it manually.
    Although it may be for some with no instructions how. Example of what Impavidus is referring to:

    Code:
    sudo blkid
    This will give you all the details you need for the fstab entry. Open another terminal and:

    Code:
    sudo nano /etc/fstab
    ... to open the fstab file.

    Copy and paste the correct UUID numbers from the 'sudo blkid' terminal into the appropriate places in the '/etc/fstab' terminal. Reboot.

    But if you don't fancy the terminal, yes, the ntfs-3g route will do it for you.

  6. #6
    Join Date
    Oct 2012
    Location
    Hampshire UK
    Beans
    91
    Distro
    Lubuntu 16.04 Xenial Xerus

    Re: Help mounting ntfs partition automatically. Fstab file type confusion.

    Thank you for this, people, not sorted yet though.

    OK, I did what Bucky Ball said first. I didn't instasll ntfs-3g, just ntfs-config. Is that OK?

    Not sure if I did it right. First time I ran ntfs-config with the drive already mounted. The drive was pre selected, so I just clicked to do it. Then I read on another thread that I should do it with the drive unmounted so I unmounted it and ran again, this time I just got the write support window showing everything mounted. BTW the partition I am concerned with is just the ntfs shared data partition, not the Windows one.
    Now from desktop disk utility shows it as already mounted before I open it in nautilus file manager, which it didn't do before.

    Problem is on boot I was still presented with the message:
    The disk drive for /dev/sda7 is not ready yet or not present. Click S to skip.

    Mooreted. I don't understand why I should have to create a mount point, wasn't there a (complicated) one already there at
    NTFS — Mounted at /media/ben/421C9FB21C9FA009
    ?
    Impavidus, I don't understand this bit:
    “Any empty directory will do, as long as it exists” How do I choose a practical name, and how do I find an empty directory that exists?

    Also now fdisk -l does/shows nothing, is that because I installed ntfs-config?

    Bucky I am happy to work in terminal and to try to crack fstab. Like I said, I cracked it last time by research and didn't have to post on the forum. At least I don't think I did, I can't find any old posts!

    Here are the previous and present fstab files:
    Previous:

    # /etc/fstab: static file system information.
    #
    # Use 'blkid' to print the universally unique identifier for a
    # device; this may be used with UUID= as a more robust way to name devices
    # that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point> <type> <options> <dump> <pass>
    # / was on /dev/sda6 during installation
    UUID=f85564b7-39f9-4942-9540-17dc58eabd01 / ext4 errors=remount-ro 0 1
    # /media/sda7 was on /dev/sda7 during installation
    UUID=9685-328A /media/sda7 vfat utf8,umask=007,gid=46 0 1
    # swap was on /dev/sda5 during installation
    UUID=58071999-d824-4e9b-a226-d519ed882674 none swap sw 0 0
    /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0


    After ntfs-config:

    # /etc/fstab: static file system information.
    #
    # <file system> <mount point> <type> <options> <dump> <pass>

    #Entry for /dev/sda6 :
    UUID=f85564b7-39f9-4942-9540-17dc58eabd01 / ext4 errors=remount-ro 0 1
    #Entry for /dev/sda7 :
    UUID=421C9FB21C9FA009 /media/ben/421C9FB21C9FA009 ntfs-3g defaults,nosuid,nodev,locale=en_GB.UTF-8 0 0
    #Entry for /dev/sda1 :
    UUID=8410C40010C3F768 /media/sda1 ntfs-3g defaults,locale=en_GB.UTF-8 0 0
    UUID=9685-328A /media/sda7 vfat utf8,umask=007,gid=46 0 1
    #Entry for /dev/sda5 :
    UUID=58071999-d824-4e9b-a226-d519ed882674 none swap sw 0 0
    /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

  7. #7
    Join Date
    Feb 2008
    Location
    Oblivion
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Help mounting ntfs partition automatically. Fstab file type confusion.

    Could you perhaps shutdown the machine and reboot. Still get that message? Your fstab is looking fine to me.

    Think what we are trying to collectively say, is that you should create another mountpoint (directory), say /media/sda7, and mount the partition there. Make the directory, for instance:
    Code:
    sudo mkdir /media/sda7
    ... and change the line for sda7 to:

    Code:
    #Entry for /dev/sda7 :
    UUID=421C9FB21C9FA009 /media/sda7 ntfs-3g defaults,nosuid,nodev,locale=en_GB.UTF-8 0 0
    Take note: You could change the mountpoint name /media/sda7 to /media/fruitcake; whatever you fancy, doesn't matter, just as long as the fstab matches it. Not sure why you would want to mount the partition in /media/ben/***. The partitions should be mounted directly in the /media partition (media/***).

    PS: Looks like you marked you Win partition, sda1, to be mounted at boot also.
    Last edited by Bucky Ball; July 8th, 2014 at 05:28 PM.

  8. #8
    Join Date
    Oct 2012
    Location
    Hampshire UK
    Beans
    91
    Distro
    Lubuntu 16.04 Xenial Xerus

    Re: Help mounting ntfs partition automatically. Fstab file type confusion.

    I did try a reboot, no joy.

    Then following your instructions I got this in terminal:

    ben@ben-MS-7253:~$ sudo mkdir /media/sda7
    [sudo] password for ben:
    mkdir: cannot create directory ‘/media/sda7’: File exists
    ben@ben-MS-7253:~$

    BUT by the way, I incorrectly quoted the boot message. It actually says /media/sda7 is not ready yet, not /dev/sda7.

    The complicated mount point was some kind of default that the machine came up with.

    Presumably I don't need the windows to mount at boot but I can't change anything in the ntfs window now, sda1 and sda7 are checked in the advanced configuration list and I can't uncheck either. There is only an undo button greyed out and a "close" button.

  9. #9
    Join Date
    Feb 2008
    Location
    Oblivion
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Help mounting ntfs partition automatically. Fstab file type confusion.

    Open /etc/fstab and put a hash (#) in front of the Win partition boot line (comment it out):

    Code:
    #Entry for /dev/sda1 :
    # UUID=8410C40010C3F768 /media/sda1 ntfs-3g defaults,locale=en_GB.UTF-8 0 0

    I have just noticed something.

    Code:
    #Entry for /dev/sda7 :
    UUID=421C9FB21C9FA009 /media/ben/421C9FB21C9FA009 ntfs-3g defaults,nosuid,nodev,locale=en_GB.UTF-8 0 0
    #Entry for /dev/sda1 :
    UUID=8410C40010C3F768 /media/sda1 ntfs-3g defaults,locale=en_GB.UTF-8 0 0
    UUID=9685-328A /media/sda7 vfat utf8,umask=007,gid=46 0 1 
    I'm confused so possibly the system is at boot also. You best check your UUIDs again with 'sudo blkid' and fix up the fstab by deleting the entry that is incorrect. You still have your old boot line in there as well which is trying to mount at /media/sda7. So you have applied the ntfs-3g to the obscure system created line, but the last line here is still vfat.

    Perhaps make it look like this, at a guess:

    Code:
    #Entry for /dev/sda7 :
    UUID=421C9FB21C9FA009 /media/sda7 ntfs-3g defaults,nosuid,nodev,locale=en_GB.UTF-8 0 0
    #Entry for /dev/sda1 :
    # UUID=8410C40010C3F768 /media/sda1 ntfs-3g defaults,locale=en_GB.UTF-8 0 0
    ... if that is the correct UUID for /dev/sda7.
    Last edited by Bucky Ball; July 8th, 2014 at 06:00 PM.

  10. #10
    Join Date
    Oct 2012
    Location
    Hampshire UK
    Beans
    91
    Distro
    Lubuntu 16.04 Xenial Xerus

    Re: Help mounting ntfs partition automatically. Fstab file type confusion.

    That was the fix I needed, you have solved the problem for me, thanks.
    Why does there have to be a hash at beginning of both lines for the windows fstab entry?
    What narks me is that I have done two dual boot installs in the same pattern now, both involved manual partitioning and a shared ntfs partition, and both threw up the same or similar problem, and I don't know why.
    It must have been something I did wrong from the time I reformatted the fat to ntfs. That was when the mount point was changed to that long one. I originally had it as /media/sda7.
    There must be something I have done wrong from the start.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •