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

Thread: [SOLVED] How do I mount a drive automatically at start up?

  1. #1
    Join Date
    Oct 2007
    Beans
    151

    [SOLVED] How do I mount a drive automatically at start up?

    All my partitions appear in Computer but only the external ones mount automatically. I want my internal NFTS partitions to mount automatically like the external ones do (so that the VirtualBox they share with can open).

    I've browsed the topic but a lot of what I found was complicated, and may have been outdated. I figured I might need to add stuff to fstab, but I don't know what to add.

    In case it helps I did fdisk -l and this is the output:

    Code:
    Disk /dev/sda: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xa5b4a5b4
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        4724    37945498+   7  HPFS/NTFS
    /dev/sda2            4725        9729    40202662+   5  Extended
    /dev/sda5            4725        8748    32322748+  83  Linux
    /dev/sda6            9670        9729      481918+   7  HPFS/NTFS
    /dev/sda7            9012        9669     5285353+   7  HPFS/NTFS
    /dev/sda8            8749        9011     2112516   82  Linux swap / Solaris
    
    Partition table entries are not in disk order
    
    Disk /dev/sdb: 120.0 GB, 120060444672 bytes
    255 heads, 63 sectors/track, 14596 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x23961542
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               1        5388    43279078+   7  HPFS/NTFS
    /dev/sdb3           14452       14596     1164712+   5  Extended
    /dev/sdb4            5389       14451    72798547+  83  Linux
    /dev/sdb5           14452       14596     1164681   82  Linux swap / Solaris
    
    Partition table entries are not in disk order
    
    Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00045ade
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1               2      121601   976752000    f  W95 Ext'd (LBA)
    /dev/sdc5               2        1403    11261533+   b  W95 FAT32
    /dev/sdc6            1404       33274   256003776    7  HPFS/NTFS
    /dev/sdc7           33275       56221   184321746    7  HPFS/NTFS
    /dev/sdc8           56222       68969   102398278+  83  Linux
    The drives I would like to mount automatically are in red.

  2. #2
    Join Date
    Jun 2006
    Location
    $ pwd _
    Beans
    3,999
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: How do I mount a drive automatically at start up?


  3. #3
    Join Date
    Jan 2007
    Location
    ~/PA/USA
    Beans
    1,980
    Distro
    Ubuntu

    Re: How do I mount a drive automatically at start up?

    Create a mount point:
    Code:
    sudo mkdir /mnt/sda6 (sda7 or whatever you want to name it).
    This is the way I set mine up within the "/etc/fstab" file. Use "sudo gedit /etc/fstab" to edit yours.

    Code:
    # Entry for /dev/sda6 :
    UUID=C6AAD33AAAD325A9 /mnt/Yourmountpoint ntfs defaults,umask=002,gid=46 0 2
    You can just add three each of the above changing only the device. To find your block id just issue the command (simply) "blkid".

    Hope this helps......
    Last edited by cdtech; August 7th, 2008 at 08:07 AM.

  4. #4
    Join Date
    Jan 2007
    Location
    ~/PA/USA
    Beans
    1,980
    Distro
    Ubuntu

    Re: How do I mount a drive automatically at start up?

    Quote Originally Posted by kpkeerthi View Post
    "ntfs-3g" is not needed with the latest kernels.....

  5. #5
    Join Date
    May 2007
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: How do I mount a drive automatically at start up?

    ntfs-3g is built in nowadays since it is on stable releases. The wiki link posted earlier is a great resource, it forwards to community/MountingWindowsPartitions/ThirdPartyNTFS3G - much of which I wrote myself
    If you need further help getting your fstab setup, we'd be glad to help. Just post the output of these commands
    Code:
    sudo fdisk -l
    cat /etc/fstab
    sudo blkid
    mount

  6. #6
    Join Date
    May 2008
    Beans
    113
    Distro
    Ubuntu

    Re: How do I mount a drive automatically at start up?

    There is a better way go to the file /etc/hal/fdi/policy/prefrences.fdi

    You find the following
    Code:
    <device>
       <match key="storage.hotpluggable" bool="false">
         <match key="storage.removable" bool="false">
           <merge key="storage.automount_enabled_hint" type="bool">false</merge>
         </match>
       </match>
     </device>
    Replace the value "false" of the third tag <merge key="storage.automount_enabled_hint" type="bool">false</merge> to "true".

  7. #7
    Join Date
    Oct 2007
    Beans
    151

    Re: How do I mount a drive automatically at start up?

    Quote Originally Posted by dileepm View Post
    There is a better way go to the file /etc/hal/fdi/policy/prefrences.fdi

    You find the following
    Code:
    <device>
       <match key="storage.hotpluggable" bool="false">
         <match key="storage.removable" bool="false">
           <merge key="storage.automount_enabled_hint" type="bool">false</merge>
         </match>
       </match>
     </device>
    Replace the value "false" of the third tag <merge key="storage.automount_enabled_hint" type="bool">false</merge> to "true".
    Thanks Dileep.

    I knew there had to be some simple fix like this, if the partitions were already appearing and just needed a click. But this is Linux. Why just change a switch if you can write a dozen lines of code instead?
    Last edited by RobHK; August 7th, 2008 at 01:33 PM.

  8. #8
    Join Date
    Jun 2008
    Location
    Shippensburg, Pa, USA
    Beans
    11
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: How do I mount a drive automatically at start up?

    Quote Originally Posted by dileepm View Post
    There is a better way go to the file /etc/hal/fdi/policy/prefrences.fdi

    You find the following
    Code:
    <device>
       <match key="storage.hotpluggable" bool="false">
         <match key="storage.removable" bool="false">
           <merge key="storage.automount_enabled_hint" type="bool">false</merge>
         </match>
       </match>
     </device>
    Replace the value "false" of the third tag <merge key="storage.automount_enabled_hint" type="bool">false</merge> to "true".

    I'd love to do the same thing as mentioned at the top of this thread, but following this advice, which seems simple enough, leads me to a blank file? Should I have data in this location?

    Thanks

  9. #9
    Join Date
    Oct 2007
    Beans
    151

    Re: How do I mount a drive automatically at start up?

    Quote Originally Posted by wadeo View Post
    I'd love to do the same thing as mentioned at the top of this thread, but following this advice, which seems simple enough, leads me to a blank file? Should I have data in this location?

    Thanks
    He mistyped the word "preferences"! Add an "e"

  10. #10
    Join Date
    Dec 2007
    Location
    Boston, MA
    Beans
    49
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: How do I mount a drive automatically at start up?

    Quote Originally Posted by Rocket2DMn View Post
    ntfs-3g is built in nowadays since it is on stable releases. The wiki link posted earlier is a great resource, it forwards to community/MountingWindowsPartitions/ThirdPartyNTFS3G - much of which I wrote myself
    If you need further help getting your fstab setup, we'd be glad to help. Just post the output of these commands
    Code:
    sudo fdisk -l
    cat /etc/fstab
    sudo blkid
    mount
    I am trying to have my XP/Ubuntu shared FAT32 partition mount automatically when I boot up.

    Output for given commands:
    Code:
    drew@ubuntu-3000:~$ sudo fdisk -l
    [sudo] password for drew: 
    
    Disk /dev/sda: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x94e494e4
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        4569    36700461    7  HPFS/NTFS
    /dev/sda2            4570        6651    16723665    5  Extended
    /dev/sda4            6652        9729    24724035    b  W95 FAT32
    /dev/sda5            4570        5806     9936171   83  Linux
    /dev/sda6            5807        6526     5783368+  83  Linux
    /dev/sda7            6527        6651     1004031   82  Linux swap / Solaris
    drew@ubuntu-3000:~$ cat /etc/fstab
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    # /dev/hda5
    UUID=a047225f-c221-4133-942f-75c28faaddfe /               ext3    relatime,errors=remount-ro 0       1
    # /dev/hda6
    UUID=4589f23d-57fb-45ec-85ae-2bd1980c6ba6 /home           ext3    relatime        0       2
    # /dev/hda7
    UUID=2f31f2b0-6ec6-4f4a-b8f0-2bb76ffad631 none            swap    sw              0       0
    /dev/hdc        /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
    
    /dev/sda4	/media/disk	vfat	0	2
    drew@ubuntu-3000:~$ sudo blkid
    /dev/sda1: UUID="62EAFBF16D5E4C87" TYPE="ntfs" 
    /dev/sda4: UUID="FF14-5591" TYPE="vfat" 
    /dev/sda5: UUID="a047225f-c221-4133-942f-75c28faaddfe" TYPE="ext3" 
    /dev/sda6: UUID="4589f23d-57fb-45ec-85ae-2bd1980c6ba6" SEC_TYPE="ext2" TYPE="ext3" 
    /dev/sda7: TYPE="swap" UUID="2f31f2b0-6ec6-4f4a-b8f0-2bb76ffad631" 
    drew@ubuntu-3000:~$ mount
    /dev/sda5 on / type ext3 (rw,relatime,errors=remount-ro)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    /sys on /sys type sysfs (rw,noexec,nosuid,nodev)
    varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
    varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
    udev on /dev type tmpfs (rw,mode=0755)
    devshm on /dev/shm type tmpfs (rw)
    devpts on /dev/pts type devpts (rw,gid=5,mode=620)
    lrm on /lib/modules/2.6.24-19-generic/volatile type tmpfs (rw)
    /dev/sda6 on /home type ext3 (rw,relatime)
    securityfs on /sys/kernel/security type securityfs (rw)
    gvfs-fuse-daemon on /home/drew/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=drew)
    Thanks

Page 1 of 2 12 LastLast

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
  •