Announcement

Collapse
No announcement yet.

Auto mount NTFS drive in Kubuntu 9.04

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Auto mount NTFS drive in Kubuntu 9.04

    Hello all, I've read around 50 how-tos for auto mounting my internal sata ntfs drive and can't seem to get it to work...

    If I open dolphin in the left pane under places it lists...

    Home
    Network
    Root
    Trash
    Volume (ntfs)

    If I click on Volume it asks me for my root password, I enter it, and it mounts. How do I do this automatically at startup

    Here is my fdisk -l:

    zaltman@DESKTOP:~$ sudo fdisk -l

    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xba72ba72

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 18895 151774056 83 Linux
    /dev/sda2 18896 19457 4514265 5 Extended
    /dev/sda5 18896 19457 4514233+ 82 Linux swap / Solaris

    Disk /dev/sdb: 300.0 GB, 300090728448 bytes
    255 heads, 63 sectors/track, 36483 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xcb2a5862

    Device Boot Start End Blocks Id System
    /dev/sdb1 1 36484 293054464 7 HPFS/NTFS

    The /dev/sdb1 is the same as the volume that I'm trying to automount...


    Here is my fstab:

    # /etc/fstab: static file system information.
    #
    # Use 'vol_id --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 defaults 0 0
    # / was on /dev/sda1 during installation
    UUID=771937d7-5301-40b8-9b6d-b50a5e77ac32 / ext3 relatime,errors=remount-ro 0 1
    # swap was on /dev/sda5 during installation
    UUID=07bca3c3-78e5-4eaa-a419-4cba300b79de none swap sw 0 0
    /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
    /dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0


    Also note that I've tried (and I thought succeeded) in editing my fstab, but it would not mount afterwards when just adding /dev/sdb1 to the bottom of the file. Also, I have fstab, fstab~, and fstab~~ now....


    #2
    Re: Auto mount NTFS drive in Kubuntu 9.04

    for an ntfs drive the ezest way (for me) was to just add a script to my ~/.kde/Autostart/ the script was just a mount command for the (in my case) partition i wanted to mount. just be sure to test your mount command out before making the script
    Mark Your Solved Issues [SOLVED]
    (top of thread: thread tools)

    Comment


      #3
      Re: Auto mount NTFS drive in Kubuntu 9.04

      Here's how I have it working:

      first, get the UUID of the drive:

      Code:
      sudo blkid
      The UUID for an ntfs drive looks a little different than an ext3; mine looks like this:

      Code:
      /dev/sdb3: UUID="4010CBBD10CBB864" TYPE="ntfs"
      Now I have the following entry in my /etc/fstab file:

      Code:
      #/dev/sdb3
      UUID=4010CBBD10CBB864              /media/VISTA  ntfs  user,rw,umask=000 0  0
      Mounts fine on bootup. Note that I never write to it -- writing probably works, but I still don't trust it. Instead I have a small vfat partition that I use for transferring data between windows and linux.

      Also be sure that when you edit /etc/fstab you are doing so through sudo (if using vim) or kdesudo (if using a gui editor).

      We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

      Comment


        #4
        Re: Auto mount NTFS drive in Kubuntu 9.04

        I wonder to know if Kubuntu has any GUI for mount settings? If I remember it right, KDE3 had kcontrol where I could (very easy) set auto-mounting (which disk, where to mount e.g) But I can't find it in KDE4.
        I still don't get it, why Ubuntu mounts all my external hard disks automatically after boot and Kubuntu doesn't.
        I don't want to play with fstab or some startup script.
        Thanks for reply.

        Comment


          #5
          Re: Auto mount NTFS drive in Kubuntu 9.04

          I wonder to know if Kubuntu has any GUI for mount settings?

          sudo apt-get install mountmanager

          We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

          Comment


            #6
            Re: Auto mount NTFS drive in Kubuntu 9.04

            Here is How I did it. first I used dolphin to mount it by clicking on drive. then in terminal type in mount.
            My ntfs partition-Drive is labeled Win-Shared mounted on /dev/sda4. Then using dolphin I right click on drive and selected unmount.. then sudo mkdir /media/Win-Shared ( case sensitive). Then sudo
            chmod 666 /media/Win-Shared (666=read write all).
            Added this to my /etc/fstab "/dev/sda4 /media/Win-Shared ntfs-3g,rw,nosuid,nodev,allow_other,blksiz=4096" without Quotes.
            Then sudo mount -a should mount the drive from the fstab file

            Comment


              #7
              Re: Auto mount NTFS drive in Kubuntu 9.04

              Originally posted by doctordruidphd
              I wonder to know if Kubuntu has any GUI for mount settings?

              sudo apt-get install mountmanager

              $ sudo mountmanager
              3 records in /etc/fstab were detected.
              [G] DBus interface was created
              [G] All devices were recieved
              [I] Storage device was detected: "/dev/sda4"
              [I] Storage device was detected: "/dev/sda3"
              [I] Storage device was detected: "/dev/sda2"
              [I] Storage device was detected: "/dev/sda1"
              [I] Storage device was detected: "/dev/sr0"
              [I] Storage device was detected: "/dev/sdb4"
              [I] Storage device was detected: "/dev/sdc1"
              [I] Storage device was detected: "/dev/sdb3"
              [I] Storage device was detected: "/dev/sdb2"
              [I] Storage device was detected: "/dev/sdb1"
              [I] Storage device was detected: "/dev/sda"
              [I] Storage device was detected: "/dev/sdc"
              [I] Storage device was detected: "/dev/sdb"
              [G] Parsing of "/usr/share/mountmanager/options/common.xml" was successful
              [G] Parsing of "/usr/share/mountmanager/options/reiserfs.xml" was successful
              [G] Parsing of "/usr/share/mountmanager/options/ext3.xml" was successful
              [G] Parsing of "/usr/share/mountmanager/options/vfat.xml" was successful
              [G] Parsing of "/usr/share/mountmanager/options/iso9660.xml" was successful
              [G] Parsing of "/usr/share/mountmanager/options/udf.xml" was successful
              [G] Parsing of "/usr/share/mountmanager/options/ntfs-3g.xml" was successful
              Segmentation fault
              $

              Comment


                #8
                Re: Auto mount NTFS drive in Kubuntu 9.04

                mountmanager is segfaulting on ntfs-3g.
                You don't need ntfs-3g to read ntfs partitions with current kernels.
                So, you can remove ntfs-3g if you want to read windows-created partitions.

                HOWEVER--

                If you have created any ntfs partitions with ntfs-3g, you will not be able to read them once you remove ntfs-3g. The reason appears to be that there are differences between windows' and ntfs-3g's versions of ntfs. So, if you have created a partition with ntfs-3g, the only solution I can think of is to copy everything on that partition somewhere else, delete the partition, remove ntfs-3g, then recreate the ntfs partition without ntfs-3g, and copy everything back.

                mountmanager has an option for using ntfs-3g, but the only way I ever got it to work was to remove ntfs-3g. If there is a way for native ntfs and ntfs-3g to co-exist, I don't know what it is.
                We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                Comment


                  #9
                  Re: Auto mount NTFS drive in Kubuntu 9.04

                  Originally posted by doctordruidphd
                  mountmanager is segfaulting on ntfs-3g.
                  You don't need ntfs-3g to read ntfs partitions with current kernels.
                  So, you can remove ntfs-3g if you want to read windows-created partitions.

                  HOWEVER--

                  If you have created any ntfs partitions with ntfs-3g, you will not be able to read them once you remove ntfs-3g. The reason appears to be that there are differences between windows' and ntfs-3g's versions of ntfs. So, if you have created a partition with ntfs-3g, the only solution I can think of is to copy everything on that partition somewhere else, delete the partition, remove ntfs-3g, then recreate the ntfs partition without ntfs-3g, and copy everything back.

                  mountmanager has an option for using ntfs-3g, but the only way I ever got it to work was to remove ntfs-3g. If there is a way for native ntfs and ntfs-3g to co-exist, I don't know what it is.
                  after removing the ntfs-3g I was able to lunch the mountmanager.
                  But this is still just GUI fstab editor. And I think it works really stupid. I set automoint for one disk (where is fat32) and it changed my fstab to:

                  $ cat /etc/fstab
                  UUID=6e506483-56da-4bc8-a16b-2ca770d72f7e / ext4 defaults 0 1
                  /dev/sr0 /media/cdrom0 udf,iso9660 noauto 0 0

                  My previous fstab looked like this:
                  # / was on /dev/sda4 during installation
                  UUID=6e506483-56da-4bc8-a16b-2ca770d72f7e / ext4 relatime,errors=remount-ro 0 1
                  # cdrom - added by me (but didn't help)
                  /dev/sr0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

                  and it didn't create any backup file...

                  My question is:
                  why can Ubuntu mount all my external disks after startup and Kubuntu not?
                  (and Ubuntu doesn't change anything in /etc/fstab)

                  Thanks for reply.

                  Comment


                    #10
                    Re: Auto mount NTFS drive in Kubuntu 9.04

                    copied from a post to my question on the same thing from snowhog (might have to re-install ntfs-3g):
                    Originally posted by Snowhog
                    Open a console. Navigate to the /media directory and then type:
                    Code:
                    sudo mkdir NTFS
                    This is necessary, as we are creating a mount point for the entry we are going to add to your fstab file. While in the console, navigate to /etc and then edit (as root) the fstab file and add the following:
                    /dev/sdb1 /media/NTFS ntfs-3g defaults,locale=en_US.utf8 0 0
                    After the fstab file has been modified, you will need to reboot, or from a console, type:
                    Code:
                    sudo mount -a
                    I have done this many times, with no problems!

                    mm0
                    Dell Inspiron 1720 Laptop<br />Intel T9300 Core2Duo Processor @ 2.5Ghz<br />4 GB Ram | 1920 X 1200 Resolution<br />2 X 160 GB SATA HD Internal<br />Nvidia GeForce 8600M Graphics Adapter<br />Using Kubuntu 9.10

                    Comment


                      #11
                      Re: Auto mount NTFS drive in Kubuntu 9.04

                      thanx for reply mm0
                      but this is not what I'm asking for.
                      I don't have any problems with mounting my disks (partition: ext3, reiserfs, fat and ntfs) but my point is: Why Ubuntu mount all partitions after startup automatically and Kubuntu not?
                      In Kubuntu I have to open Dolphin and mount them manually.
                      Does Ubuntu run any "mounting scripts" during the startup?

                      Comment


                        #12
                        Re: Auto mount NTFS drive in Kubuntu 9.04

                        I don't know why...but what I typed above will make it mount automatically. I'm sure there are many ways to do the same thing, but this one is simple (for me), and works. It will not ask for a password, and auto mounts during boot. I have my wallpaper, and various other things on my ntfs drive, so I needed it to mount during boot...this is my solution.

                        mm0
                        Dell Inspiron 1720 Laptop<br />Intel T9300 Core2Duo Processor @ 2.5Ghz<br />4 GB Ram | 1920 X 1200 Resolution<br />2 X 160 GB SATA HD Internal<br />Nvidia GeForce 8600M Graphics Adapter<br />Using Kubuntu 9.10

                        Comment


                          #13
                          Re: Auto mount NTFS drive in Kubuntu 9.04

                          My question is:
                          why can Ubuntu mount all my external disks after startup and Kubuntu not?
                          (and Ubuntu doesn't change anything in /etc/fstab)
                          Are both systems the same version (meaning "jaunty", or whatever)?

                          If so, please post the fstab files from both systems. The process for mounting file sytems during bootup is, as far as I know, the same no matter what desktop you are using.

                          We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                          Comment


                            #14
                            Re: Auto mount NTFS drive in Kubuntu 9.04

                            Originally posted by doctordruidphd
                            My question is:
                            why can Ubuntu mount all my external disks after startup and Kubuntu not?
                            (and Ubuntu doesn't change anything in /etc/fstab)
                            Are both systems the same version (meaning "jaunty", or whatever)?

                            If so, please post the fstab files from both systems. The process for mounting file sytems during bootup is, as far as I know, the same no matter what desktop you are using.
                            No, other machine is Ubuntu 8.10 32 bit
                            in fstab is just 2 entries (one about partition where the system is installed and second about cdrom)
                            when I plug the external hard disks when system is booting, I can see all partitions mounted in /media/
                            I guess this is some new features of KDE4
                            (maybe - device notifier wiged)

                            Comment


                              #15
                              Re: Auto mount NTFS drive in Kubuntu 9.04

                              OK, sounds like they are mounting, just not displaying. I have never tried plugging things in while booting. Since the device notifier is part of kde, and starting kdm is pretty close to the end of the bootup process, my guess is that they are actually mounted before the device notifier activates, so it "assumes" the external devices are part of the system and doesn't show them.
                              We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

                              Comment

                              Working...
                              X