Announcement

Collapse
No announcement yet.

[SOLVED] Mounting external USB drive at boot

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

    [SOLVED] Mounting external USB drive at boot

    Has anyone managed to mount an external USB dirve at boot?

    I'm struggling with this.

    I can mount the drive using the devicenotifier plasmoid and I can mount the drive manually from the CLI.

    Adding an entry into fstab seems like the right approach but this doesn't work, and also means that the you can't then mount it with the devicenotifier plasmoid.

    In Hardy I could do this by putting editing fstab but I can't make it work in Intrepid.

    Has anyone managed to do this?

    ***********SOLVED************
    I solved this by using a different New Device Notifier Plasmoid -

    http://www.kde-look.org/content/show...9446280c6c7c47

    Not sure it mounts at boot, but it mounts automatically which is good enough for my purposes.

    #2
    Re: Mounting external USB drive at boot

    What is the filesystem format on the USB drive?

    Comment


      #3
      Re: Mounting external USB drive at boot

      It's ext3.

      The fstab entry is:

      # /dev/sdb1
      UUID=30910c65-e857-453e-9050-83680a7767e6 /media/backup ext3 rw,auto,user,sync 0 0

      It's the correct UUID too...

      Comment


        #4
        Re: Mounting external USB drive at boot

        The fsck order in that line ( 0 ) should be a 2:
        UUID=30910c65-e857-453e-9050-83680a7767e6 /media/backup ext3 rw,auto,user,sync 0 0
        should be:
        UUID=30910c65-e857-453e-9050-83680a7767e6 /media/backup ext3 rw,auto,user,sync 0 2
        Partitions (as opposed to devices - cdrom, floppy, ...) listed in fstab are checked (fsck) based on the fsck order flag (very last digit). Only the proc entry has a fsck order flag of 0. The root ( / ) partition has a fsck order of 1 and all other listed partitions should have a fsck order flag of 2.
        Windows no longer obstructs my view.
        Using Kubuntu Linux since March 23, 2007.
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: Mounting external USB drive at boot

          Snowhog -

          Thanks for the tip but changing 0 to 2 per your recommendation results in being dumped into cli on reboot. Message is (paraphrasing)...
          unable to resolve UUID 30910c65...(etc) fsck dies with exit status 8

          a log has been generated.... /var/log/fsck/checkfs
          This log says nothing helpful:
          Log of fsck -C4 -R -A -a
          Sun Oct 19 21:18:17 2008

          fsck 1.41.3 (12-Oct-2008)
          /dev/sda1: clean, 38/249368 files, 55251/497983 blocks
          /sbin/fsck.xfs: XFS file system.

          Sun Oct 19 21:18:17 2008
          Note that I *can* get it to mount (even w/ 0 0) from the cli, I just can't get it to mount at boot. I think that HAL or usbdev might be interfering somehow...

          Comment


            #6
            Re: Mounting external USB drive at boot

            Which tells us that forcing a fsck on a USB HD during boot isn't liked (by II ??). Okay, so leaving the fsck order flag at 0 (bypass checking) eliminates the error, so reset it back to 2.

            I have two USB HDs that are attached to my laptops USB ports. Neither are identified in my fstab file, yet both are identified (and available) in K Menu > Computer > Removable Storage and/or in Dolphin.

            Windows no longer obstructs my view.
            Using Kubuntu Linux since March 23, 2007.
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              Re: Mounting external USB drive at boot

              Thanks Snowhog -

              The drive is available and I have no problem accessing it (I can mount it via dolphin, the devicenotifier plasmoid, or manually if I add an entry to fstab) , it's just that I can't figure out how to automatically have the thing mount during boot.

              Context - this is a desktop machine that I want to automatically backup to the external drive using rsync via keep and if the external drive doesn't auto-mount at boot then the backup won't work. I know that I can script this but I'm trying to use OOTB tools to make this happen. It shouldn't be difficult as it's a fairly common task I would have thought...

              Comment


                #8
                Re: Mounting external USB drive at boot

                Change your fstab entry to:
                UUID=30910c65-e857-453e-9050-83680a7767e6 /media/backup ext3 rw,auto,users,sync 0 2
                user
                Allow an ordinary user to mount the file system. The name of the mounting user is written to mtab so that he can unmount the file system again. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line user,exec,dev,suid).

                users
                Allow every user to mount and unmount the file system. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line users,exec,dev,suid).
                Windows no longer obstructs my view.
                Using Kubuntu Linux since March 23, 2007.
                "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                Comment


                  #9
                  Re: Mounting external USB drive at boot

                  Sadly, this doesn't change anything...

                  Comment


                    #10
                    Re: Mounting external USB drive at boot

                    After a reboot?
                    Windows no longer obstructs my view.
                    Using Kubuntu Linux since March 23, 2007.
                    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                    Comment


                      #11
                      Re: Mounting external USB drive at boot

                      Yes, even after a reboot.

                      Comment


                        #12
                        Re: [SOLVED] Mounting external USB drive at boot

                        Per the man page info, re-edit fstab and change:
                        UUID=30910c65-e857-453e-9050-83680a7767e6 /media/backup ext3 rw,auto,users,sync 0 2
                        to
                        UUID=30910c65-e857-453e-9050-83680a7767e6 /media/backup ext3 rw,auto,users,exec,dev,suid,sync 0 2
                        Windows no longer obstructs my view.
                        Using Kubuntu Linux since March 23, 2007.
                        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                        Comment


                          #13
                          Re: [SOLVED] Mounting external USB drive at boot

                          Originally posted by anywebloco
                          ***********SOLVED************
                          I solved this by using a different New Device Notifier Plasmoid -

                          http://www.kde-look.org/content/show...9446280c6c7c47

                          Not sure it mounts at boot, but it mounts automatically which is good enough for my purposes.
                          I first tried to download and build from sources, but then after downloading a ton of -dev packages etc. and still not getting it to build, it dawned on me to look for a PPA. I found one:
                          https://launchpad.net/~samrog131/+archive
                          I've installed it successfully but haven't restarted X & tested yet.
                          Edit: so it seems you don't need to restart X, just use the `New Device Notifier Automount` plasmoid. Works great so far (2 minutes of testing

                          regards
                          marius
                          http://amanica.blogspot.com/2008/11/...-external.html

                          Comment

                          Working...
                          X