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

Thread: Trying to do that thing with the fstab.

  1. #1
    Join Date
    Jun 2007
    Location
    Germany
    Beans
    104
    Distro
    Ubuntu 10.04 Lucid Lynx

    Trying to do that thing with the fstab.

    My laptop boots to my sdcard (sdb) I'd like it to mount the hard drive (sda) on start up but i cant get the wording queit right.
    Here's my fstab file the bit at the bottom is the drive sda

    Thanks.

    # /etc/fstab: static file system information.
    #
    # Use 'blkid' 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/sdb1 during installation
    UUID=87b1444b-c3d4-4ab2-87ae-1c003a19fe7a / ext4 errors=remount-ro 0 1
    # swap was on /dev/sdb5 during installation
    UUID=63101164-be2e-413b-94ea-ba43f599dd23 none swap sw 0 0
    #The next line is the problem, I'm mounting the sda for more space but it just isn't working.
    UUID="22f9a2fc-30e7-4bd7-87d1-e8e46b3687ee sda1 ext3 0 2

  2. #2
    Join Date
    Jul 2007
    Location
    Magic City of the Plains
    Beans
    Hidden!
    Distro
    Xubuntu 15.04 Vivid Vervet

    Re: Trying to do that thing with the fstab.

    Quote Originally Posted by jonpon View Post
    UUID="22f9a2fc-30e7-4bd7-87d1-e8e46b3687ee sda1 ext3 0 2
    Remove the quote marks. You need a mount point for /dev/sda1, not just sda1. Maybe /media/sda1 ?
    Code:
    sudo mkdir -p /media/sda1
    so your line in /etc/fstab would look like
    Code:
    UUID=22f9a2fc-30e7-4bd7-87d1-e8e46b3687ee /media/sda1   ext3     0   2

  3. #3
    Join Date
    Apr 2011
    Location
    Maryland
    Beans
    1,461
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Trying to do that thing with the fstab.

    You've not listed a mount point for the drive to mount to. You need something like this:

    Code:
    # Change 'mount_point' to match an actual directory
    UUID=22f9a2fc-30e7-4bd7-87d1-e8e46b3687ee     /media/mount_point      ext3     0     2
    If you're using the UUID for the drive, you don't need to list the partition name too. So, you have to remove the 'sda1' part. Instead of that, you list the actual place you want to mount the drive, which is commonly in /media. So, make a directory in /media (you'll need elevated privileges to make the directory):

    Code:
    sudo mkdir /media/mount_point  #call the mount point whatever you like
    Then, change the ownership of the mount point so that you can rw to it:

    Code:
    sudo chown $USER:$USER /media/mount_point
    Then, you should be all set.

  4. #4
    Join Date
    Jun 2007
    Location
    Germany
    Beans
    104
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Trying to do that thing with the fstab.

    Thanks for your help guys,
    but I'm still having problems...

    this is how it looks now but something is still wrong
    Code:
    UUID=22f9a2fc-30e7-4bd7-87d1-e8e46b3687ee /media/sda1   ext3     0   2

  5. #5
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    5,278
    Distro
    Ubuntu

    Re: Trying to do that thing with the fstab.

    Quote Originally Posted by jonpon View Post
    Thanks for your help guys,
    but I'm still having problems...

    this is how it looks now but something is still wrong
    Code:
    UUID=22f9a2fc-30e7-4bd7-87d1-e8e46b3687ee /media/sda1   ext3     0   2
    What exactly is wrong?
    If you open up the file manager and navigate to media, and open it, is sda1 listed?
    And when you open that are the files that where in that partition there?
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  6. #6
    Join Date
    Aug 2011
    Location
    52° N 6° E
    Beans
    2,869
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: Trying to do that thing with the fstab.

    Does the mountpoint exist? You need an empty directory named /media/sda1. You can use any name, as long as the empty directory has the path mentioned in your fstab. A somewhat more descriptive name may be easier. Also, the new fstab will take effect after rebooting (or after you call mountall).

  7. #7
    Join Date
    Jun 2007
    Location
    Germany
    Beans
    104
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Trying to do that thing with the fstab.

    On startup I get an error that it can't mount. When I navigate to the file /media/sda1 it's there but empty. If I try to open the drive from the menu it says I dont have permission.

  8. #8
    Join Date
    Apr 2011
    Location
    Maryland
    Beans
    1,461
    Distro
    Kubuntu 12.04 Precise Pangolin

    Re: Trying to do that thing with the fstab.

    Two things:

    Double check the UUID of that drive. You can run this to get the UUID of your drive:

    Code:
    sudo blkid
    Second, see my post above about permissions. Since /media is owned by root, you need elevated perms to create the directory, which will then cause it be owned by root, and you won't have permissions on it. So, you then need to change the ownership of with with the 'chown' command as I show you above.

    Edit:
    Just thought of something else, double check that the filesystem type you're requesting is correct. What is the result of:

    Code:
    mount
    Last edited by drmrgd; November 2nd, 2013 at 05:55 PM.

  9. #9
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    5,278
    Distro
    Ubuntu

    Re: Trying to do that thing with the fstab.

    Post the output of
    Code:
    sudo blkid
    to verify that the UUID and file system type are correct.

    Edit: Me be ninja'd
    Last edited by deadflowr; November 2nd, 2013 at 05:56 PM. Reason: me ninja'd
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  10. #10
    Join Date
    Jun 2007
    Location
    Germany
    Beans
    104
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Trying to do that thing with the fstab.

    Here are the results from blkid and mount

    Code:
    jonpon@E1222 ~ $ sudo blkid
    [sudo] password for jonpon: 
    /dev/sda1: LABEL="Android-x86" UUID="22f9a2fc-30e7-4bd7-87d1-e8e46b3687ee" SEC_TYPE="ext2" TYPE="ext3" 
    /dev/sda5: UUID="bd461586-441f-4e02-a397-2b5558b4a8b2" TYPE="swap" 
    /dev/sda6: UUID="4fe32ffa-ff41-4268-bdf5-01a86992b0db" TYPE="ext4" 
    /dev/sdb1: UUID="87b1444b-c3d4-4ab2-87ae-1c003a19fe7a" TYPE="ext4" 
    /dev/sdb5: UUID="63101164-be2e-413b-94ea-ba43f599dd23" TYPE="swap"
    Code:
    jonpon@E1222 ~ $ mount
    /dev/sdb1 on / type ext4 (rw,errors=remount-ro)
    proc on /proc type proc (rw,noexec,nosuid,nodev)
    sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
    none on /sys/fs/fuse/connections type fusectl (rw)
    none on /sys/kernel/debug type debugfs (rw)
    none on /sys/kernel/security type securityfs (rw)
    udev on /dev type devtmpfs (rw,mode=0755)
    devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
    tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
    none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
    none on /run/shm type tmpfs (rw,nosuid,nodev)
    binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
    gvfs-fuse-daemon on /home/jonpon/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=jonpon)
    jonpon@E1222 ~ $

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
  •