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

Thread: [SOLVED] mounting partion on local drive

  1. #1
    Join Date
    Aug 2008
    Beans
    62

    [SOLVED] mounting partion on local drive

    Hi I am a complete newbie to Ubuntu.
    I have installed ubuntu on a Lenovo 3000 N200
    It has a 160 Gb disc.
    I have set up some partitions on this drive

    Entered this in terminal:
    Code:
    fdisk -l
    Result in terminal:
    Code:
    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x433f8b71
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        2550    20482843+  83  Linux
    /dev/sda2           19081       19457     3028252+   5  Extended
    /dev/sda3            2551       15302   102430440   83  Linux
    /dev/sda4           15303       19080    30346785   83  Linux
    /dev/sda5           19081       19457     3028221   82  Linux swap / Solaris
    
    Partition table entries are not in disk order
    The 2 partitions in red which I want Ubuntu to mount on every startup
    Both partitions are ext3


    I have from scouring various forums, learnt that a file called fstab located at /etc/fstab that is the key to this.
    I have even gone here and tried to meddle with the code but to no avail so far.
    This is the content of the fstab as it stands at the moment:

    Code:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    # /dev/sda1
    UUID=32cd1a76-a146-4f6a-af1c-f29d4c99b85e /               ext3    relatime,errors=remount-ro 0       1
    # /dev/sda5
    UUID=90757b6e-79c4-410d-b439-1e3cb23f083e none            swap    sw              0       0
    /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
    /dev/sda3 /media/disk-2/ ext3 defaults 0 0
    You can see in the last line my final attempt before this post.

    Can someone please help me to mount these partitions?

  2. #2
    Join Date
    May 2007
    Location
    The New Forest
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: mounting partion on local drive

    You need to make folders for them to mount into, so for the one who have done you need to

    Code:
    sudo mkdir /media/disk-2
    not sure if the trailing / would cause a problem

    /dev/sda3 /media/disk-2 ext3 defaults 0 0
    make a folder for second drive and repeat in fstab, check if they have mounted with

    Code:
    sudo mount -a

  3. #3
    Join Date
    Dec 2007
    Location
    Tampa, FL
    Beans
    1,087
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: mounting partion on local drive

    Check out the link on my signature on how to automount...
    "There are 10 types of people: Those who read binary and those who don't"
    >>>"who is general failure and why is he reading my files"<<<
    The Ubuntu Counter Project - user number # 22367
    Howto automount NTFS - My wallpaper

  4. #4
    Join Date
    Aug 2008
    Beans
    62

    Re: mounting partion on local drive

    Just tried it and got this:

    HTML Code:
    mkdir: cannot create directory `/media/disk-2': File exists

    I have done this step before from some other post.
    The question I have is: How do I know that this new directory is on the partition I want?

  5. #5
    Join Date
    May 2007
    Location
    The New Forest
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: mounting partion on local drive

    If you've done it already that is fine, make a folder for the second partition, if you haven't already done so, add it to fstab, save and then run the mount -a command I gave.

    The question I have is: How do I know that this new directory is on the partition I want?
    Not quite sure what you mean but, fstab will mount the partition (dev/sda3) in the folder you specify /media/disk-2.

  6. #6
    Join Date
    Oct 2007
    Location
    ISS
    Beans
    1,429

    Re: mounting partion on local drive

    Here's my guide:

    1) Find uuids of sda3 and sda4 using the command

    Code:
    ls /dev/disk/* -lah
    2) Create you mountpoints, say

    Code:
    sudo mkdir /mnt/disk1
    sudo mkdir /mnt/disk2
    3) Press Alt+F2 and start

    Code:
    gksudo gedit /etc/fstab
    Add the following lines to fstab and save:

    Code:
    UUID=????? /mnt/disk1  ext3    relatime      0       2
    UUID=????? /mnt/disk2  ext3    relatime      0       2
    In place of the question marks write the uuids you found in part 1. Restart.

    4) You may need to change the ownership of the mountpoints if you cannot use them:

    Code:
    sudo chown -R <username>:<username> /mnt/disk1
    sudo chown -R <username>:<username> /mnt/disk2
    Put your username in place of <username>.

    Notes:

    a) You can put symlinks of the mountpoints to where ever you want. Also you can add it to places menu by opening a nautilus window and dragging the folder icon to the places pane on the left.

    b) Use /mnt/mountpoint, NOT /media/mountpoint. This is how it's supposed to be in linux.

    c) Good fstab reference:

    http://ubuntuforums.org/showthread.php?&t=283131
    Last edited by Vivaldi Gloria; August 12th, 2008 at 07:48 AM. Reason: typo

  7. #7
    Join Date
    Aug 2008
    Beans
    62

    Re: mounting partion on local drive

    Hi Vivaldi,
    I tried your method gut no cigar!

    I assume that you made a small error in step 3 where you should have disk2 in the second line. (I hope my assumption is right)

    After restarting it seemed that I had taken a step backwards.
    Before I could at least see these partitions in the file manager even though I could not write to them.
    Now I do not even see them after the reboot.

    I then tried to do the last step (4) in the hope that this would be it, but no.

    This is what my fstab now looks like:

    Code:
     /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    # /dev/sda1
    UUID=32cd1a76-a146-4f6a-af1c-f29d4c99b85e /               ext3    relatime,errors=remount-ro 0       1
    # /dev/sda5
    UUID=90757b6e-79c4-410d-b439-1e3cb23f083e none            swap    sw              0       0
    /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
    UUID=2b63b6fb-c4d1-41a0-a3ca-da869a845c06 /mnt/disk1  ext3    relatime      0       2
    UUID=4ab5846c-fb01-47b5-99f5-608835af5178 /mnt/disk2  ext3    relatime      0       2
    I am sorry if the soultion is right under my nose, but I cannot see it
    I am pretty much a bravado novice to this kind of computing, but I am willing to give it a go.

    I am getting quite desperate though, because I need to start "using" my computer.

  8. #8
    Join Date
    Oct 2007
    Location
    ISS
    Beans
    1,429

    Re: mounting partion on local drive

    I assume that you made a small error in step 3 where you should have disk2 in the second line.
    Yes. you're right. I'll edit it.

    Before I could at least see these partitions in the file manager even though I could not write to them.
    Open file manager (nautilus). Please click filesystem and check the folders /mnt/disk1, /mnt/disk2. Aren't your disks mounted there?

    Let me know so that I can tell you what to do next.

    I am getting quite desperate though, because I need to start "using" my computer.
    No need to get desperate. This is easy to fix. In the mean time enjoy the experience, you are learning linux.

  9. #9
    Join Date
    Aug 2008
    Beans
    62

    Re: mounting partion on local drive

    Hi,
    Sorry but what is Nautilus?
    I just click on 'Places' in the top right and then click on a location there and a file browser opens. Is this Nautilus?

    If so I cannot find this location where I can 'check the folders'

  10. #10
    Join Date
    Oct 2007
    Location
    ISS
    Beans
    1,429

    Re: mounting partion on local drive

    I just click on 'Places' in the top right and then click on a location there and a file browser opens. Is this Nautilus?
    Yes, the file manager is called nautilus in ubuntu.

    If so I cannot find this location where I can 'check the folders'
    Three ways to do it:

    1) Press Alt + F2 and start

    Code:
    nautilus /mnt
    2) Open your home folder. On the left pane click on file sytem. Now you can see the filesystem on the right. Double click on mnt.

    3) From places menu choose Computer. Then double click on file system. Then double click on mnt.

    Check inside the disk1, disk2 folders in mnt to see if your drives are mounted there.

Page 1 of 2 12 LastLast

Tags for this Thread

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
  •