Results 1 to 5 of 5

Thread: Accessing a partitioned Hard Drive

  1. #1
    Join Date
    Feb 2013

    Accessing a partitioned Hard Drive

    I just installed ubuntu 12.10 on a computer already running Windows 7. I needed the original operating system to run certain programs, but before dual-booting with ubuntu I partitioned the harddrive and named it "Shared". I can access it from either OS, but how do I access it from command line (ubuntu)?

    i.e, "cd ~/Shared" doesn't seem to work, as it would with a simple directory.

    Much appreciated!

  2. #2
    Join Date
    Jul 2010
    ozarks, Arkansas, USA
    Xubuntu 16.04 Xenial Xerus

    Re: Accessing a partitioned Hard Drive

    nbrown104; Hi ! Welcome to the forum.

    In order to access that partition from the command line one has to mount it to the file system. Try this:
    sudo fdisk -l # to identify the partition
     sudo mkdir /mnt/Shared #make a mount point -note that linux is case sensitive "S" does not = "s"
    sudo mount /dev/sda5 /mnt/Shared # attach to the file system - change "sda5" to "fdisk's" identification
    ls -la /mnt/Shared/<directory>/<file> # to list contents
    The partition must be cleanly (un)mounted prior to shutting the system down:
    sudo umount /mnt/Shared
    advise results

  3. #3
    Join Date
    Feb 2013

    Re: Accessing a partitioned Hard Drive

    Thanks! That worked fine! Will this have to be done each time I start up the computer?

  4. #4
    Join Date
    Aug 2011
    51.8° N 5.8° E
    Xubuntu 17.10 Artful Aardvark

    Re: Accessing a partitioned Hard Drive

    No, you can put it in /etc/fstab. It will be mounted and unmounted automatically at boot/shutdown. Add the line
    /dev/sdaX /mnt/Shared ntfs <options> 0 0

  5. #5
    Join Date
    Jun 2009
    SW Forida
    Ubuntu 16.04 Xenial Xerus

    Re: Accessing a partitioned Hard Drive
    Mount & edit fstab from Morbius1 - suggest using templates instead. Post #6
    For ntfs UUID shown is example only see below:
    UUID=DA9056C19056A3B3 /media/WinD ntfs defaults,nls=utf8,umask=000,uid=1000,windows_names 0 0
    Window_names prevents the use of invalid windows characters:
    (which are the nine characters ” * / : < > ? \ | and those whose code is less than 0×20)
    uid=1000 should fix the trash problems as well:

    ** To find the correct UUID for your partitions:
    sudo blkid -c /dev/null -o list
    ** You will have to create the mount point yourself, for example:
    sudo mkdir /media/WinD
    sudo mkdir /media/Data
    ** Then add the template with the correct UUID and mount point to fstab:
    sudo cp /etc/fstab /etc/fstab.backup
    gksu gedit /etc/fstab

    ** And when you are done editing fstab and saving it run the following command to test for errors and mount the partitions without requiring a reboot. You will know before you reboot if something is amiss. Make sure you have partition unmounted if prevously mounted:
    sudo mount -a

    Above example is mounting to /media. If you mount to /media or /home directly it will also show in left panel of Nautilus. If you mount in /mnt it will not be in Nautilus but you have to drill down to find it. But Then you can link folders from the shared into your /home. I actually have all the standard data folders like Music Documents etc in shared partitions, one NTFS and the other Linux formats and link folders into /home.

    Splitting home directory discussion and details:

    Shared /data (NTFS)-see post #3 oldfred
    For more info on UEFI boot install & repair - Regularly Updated :
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts