Announcement

Collapse
No announcement yet.

Autostart mount problem...

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

    Autostart mount problem...

    I have an entry in my autostart directory (/home/<me>/.kde/Autostart) that has a mount command:

    Code:
    sudo mount /dev/hda2 /home/<me>/Local_Disk1
    It used to work, but then I reinstalled, and it no longer does...not sure why. I tried with and without the sudo command...anyone have any ideas? If it matters, it is a fat32 partition...

    thanks,
    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

    #2
    Re: Autostart mount problem...

    When you reinstalled, did the /etc/fstab entry for /dev/hda2 get changed, perchance?

    Comment


      #3
      Re: Autostart mount problem...

      I'm sure it did...This may be a dumb question, but if I specify a mount point, I didn't think it needed to be in fstab... I'm fairly certain (but not 100%) that it wasn't there before. (I unplug my hard drives when I install, otherwise, Kubuntu won't boot after install...not sure why, I'm guessing it's becasue I install on SATA, but these drives are IDE...)
      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


        #4
        Re: Autostart mount problem...

        Originally posted by muzicman0

        if I specify a mount point, I didn't think it needed to be in fstab...
        au contraire -- ONLY hard drives listed in fstab can be mounted.

        (I unplug my hard drives when I install, otherwise, Kubuntu won't boot after install...not sure why, I'm guessing it's becasue I install on SATA, but these drives are IDE...)


        Yeah, I know a lot of folks do that, and it kinda makes my skin crawl -- you're really setting up the system to break when you install it with hard drives that you plan to use "missing" from the system in the first place. :P

        It would be WAY better if you would install with all the drives that you'll ever want connected, unless it is really and truly impossible. I recall quite a struggle when I first installed Kubuntu, because I have a mix of IDE and SATA drives, and I wanted a combination of Win XP and a Grub location that turned out to be really tough -- probably like you want. An IDE drive with Windows installed on it is a "Grub magnet" in the presence of SATA drives -- you cannot put Grub on a SATA drive under that circumstance. There are ways around the situation, depending on your willingness to reinstall Windows and stuff like that. But disconnecting hard drives and then reconnecting them after your Kubuntu installation is kinda asking for trouble ...

        Comment


          #5
          Re: Autostart mount problem...

          Originally posted by dibl
          Originally posted by muzicman0

          if I specify a mount point, I didn't think it needed to be in fstab...
          au contraire -- ONLY hard drives listed in fstab can be mounted.
          This doesn't appear to be correct (although, please enlighten me!). Below is my current fstab file:

          # /etc/fstab: static file system information.
          #
          # <file system> <mount point> <type> <options> <dump> <pass>
          proc /proc proc defaults 0 0
          # /dev/sda1
          UUID=49800e5d-bf16-47af-a175-f203bd2a713a / ext3 defaults,errors=remount-ro 0 1
          # /dev/sda3
          UUID=1d85bc95-2eea-4ec5-a38e-61d7f51cdb63 /home ext3 defaults 0 2
          # /dev/sda2
          UUID=4ec10870-4023-4975-b260-16dfc5c06759 none swap sw 0 0
          /dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
          /dev/hdd /media/cdrom1 udf,iso9660 user,noauto 0 0
          /dev/fd0 /media/floppy0 auto rw,user,noauto 0 0


          When I enter
          Code:
          sudo mount /dev/hda1 /home/steven/Local_Disk1
          The device mounts just fine...without being in the fstab file!? I just can't get it to work in my autostart options...I'm guessing becasue it requires 'sudo'. I do have smbmount working in my autostart file. I entered:

          Code:
          steven ALL=NOPASSWD:/usr/bin/smbmount
          in my sudoers file, so that is why smbmount doesn't require sudo...but the same doesn't seem to work for the mount command...

          if anyone has a suggestion, I'm all ears (or...I guess technically I'm all 'eyes').

          Thanks,
          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


            #6
            Re: Autostart mount problem...

            If you specify all the needed options in the command line, you don't need to specify an fstab entry.

            However, if you wish to mount the filesystem at boot (when other filesystems are mounted) or to mount is as a non-root user later on, you do need an fstab entry.

            Adding the filesystem in fstab is also a lot better in keeping things organized.
            Here's one possibility of an fstab entry (which you may edit to fit your needs):
            /dev/hda1 /home/steven/Local_Disk1 vfat umask=0077,utf8,uid=1000,gid=1000,auto,rw,nouser 0 0
            This mounts the FAT32 filesystem automatically during boot, ownership set to you and permissions (rwx) for you only.

            If you (for some reason) don't wish to mount it at the same time as the rest of your filesystems, you can put your mount command(s) in, for example, /etc/rc.local -file. This script is run in the end of the boot process. It's also run as root, so you don't need to 'sudo' the mount commands. (Note: because it is run as root, you need to set some mount options to make it accessible for you (or other non-root users), you can do this with the '-o' switch for the mount command, see 'man mount' for details.

            But like I said, fstab is usually 'easier' and 'cleaner'

            Comment

            Working...
            X