Results 1 to 7 of 7

Thread: Auto-mounting hard drive with /etc/fstab

  1. #1
    Join Date
    Dec 2010
    Location
    Texas
    Beans
    49
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Auto-mounting hard drive with /etc/fstab

    I've been trying to auto mount my hard drive from the Window's partition so that it would be mounted every time I start Ubuntu, and everything I've seen says use the /etc/fstab file, but mine looks nothing like they show in these tutorials. Can anyone point me in the right direction on how to do this?

    Heres what my /etc/fstab looks like.


    # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' 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>
    proc /proc proc nodev,noexec,nosuid 0 0
    # / was on /dev/sda5 during installation
    UUID=ae6e05b2-bfaf-41ac-9ca0-a3cc7138df3a / ext4 errors=remount-ro 0 1
    # swap was on /dev/sda6 during installation
    UUID=d6bf38b2-d806-4226-b53d-f6969c5e7ece none swap sw 0 0
    /dev/sdb1 /media/sdb1 vfat defaults 0 0

  2. #2
    Join Date
    Aug 2009
    Location
    India
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Auto-mounting hard drive with /etc/fstab

    Can you post the following outputs

    Code:
    sudo fdisk -l
    Code:
    sudo blkid
    Code:
    df

  3. #3
    Join Date
    Dec 2010
    Location
    Texas
    Beans
    49
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Auto-mounting hard drive with /etc/fstab

    Code:
    sudo fdisk - l
    
    Usage:
     fdisk [options] <disk>    change partition table
     fdisk [options] -l <disk> list partition table(s)
     fdisk -s <partition>      give partition size(s) in blocks
    
    Options:
     -b <size>                 sector size (512, 1024, 2048 or 4096)
     -c                        switch off DOS-compatible mode
     -h                        print help
     -u <size>                 give sizes in sectors instead of cylinders
     -v                        print version
     -C <number>               specify the number of cylinders
     -H <number>               specify the number of heads
     -S <number>               specify the number of sectors per track
    Code:
    sudo blkid
    
    /dev/sda1: UUID="482ACC132ACBFC46" TYPE="ntfs" 
    /dev/sda6: UUID="d6bf38b2-d806-4226-b53d-f6969c5e7ece" TYPE="swap" 
    /dev/sda5: UUID="ae6e05b2-bfaf-41ac-9ca0-a3cc7138df3a" TYPE="ext4"
    Code:
    df
    
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /dev/sda5            131002916  10076508 114271792   9% /
    none                   1802112       316   1801796   1% /dev
    none                   1806332      1784   1804548   1% /dev/shm
    none                   1806332       196   1806136   1% /var/run
    none                   1806332         0   1806332   0% /var/lock
    none                   1806332         0   1806332   0% /lib/init/rw

  4. #4
    Join Date
    Aug 2009
    Location
    India
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Auto-mounting hard drive with /etc/fstab

    If you are a beginner i will recommend you to use ntfs-config so that you can easily automount your drives in a click.

    Code:
    sudo apt-get install ntfs-config
    After installation it will be found under System>>Administration>>NTFS Configuration Tool



    Check your drives to automount and enable write support.

  5. #5
    Join Date
    Aug 2009
    Location
    India
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Auto-mounting hard drive with /etc/fstab

    @laus_deo there should be no space..It's sudo fdisk -l

  6. #6
    Join Date
    Dec 2010
    Location
    Texas
    Beans
    49
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Auto-mounting hard drive with /etc/fstab

    @laus_deo there should be no space..It's sudo fdisk -l
    oops, here that is just if you want to see it.

    Code:
    sudo fdisk -l
    
    Disk /dev/sda: 320.1 GB, 320072933376 bytes
    255 heads, 63 sectors/track, 38913 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x6e24561b
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1       21638   173798400    7  HPFS/NTFS
    /dev/sda2           21638       38914   138770433    5  Extended
    /dev/sda5           21638       38207   133092352   83  Linux
    /dev/sda6           38207       38914     5677056   82  Linux swap / Solaris
    
    Disk /dev/sdb: 3963 MB, 3963617280 bytes
    128 heads, 63 sectors/track, 960 cylinders
    Units = cylinders of 8064 * 512 = 4128768 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               2         960     3866624    b  W95 FAT32
    but the method you suggested worked perfectly. Thanks!!

  7. #7
    Join Date
    Aug 2009
    Location
    India
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: Auto-mounting hard drive with /etc/fstab

    You are welcome and JFI in your case if you want to add manually,you should add the following line in your fstab file.
    UUID=482ACC132ACBFC46 /dev/sda1 ntfs-3g defaults,locale=en_IN 0 0
    Mark this thread as solved.

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
  •