Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Mounting an extra partition

Options
  • 14-05-2014 7:56pm
    #1
    Moderators, Computer Games Moderators, Technology & Internet Moderators Posts: 19,240 Mod ✭✭✭✭


    I'm currently using Linux Mint and I have an extra partition on my system with a few hundred extra gigs of space. I've been trying to mount the partition, but to no avail yet. Any ideas?


Comments

  • Closed Accounts Posts: 824 ✭✭✭Kinet1c


    Are you looking to mount it permanently or temporarily?


  • Moderators, Computer Games Moderators, Technology & Internet Moderators Posts: 19,240 Mod ✭✭✭✭L.Jenkins


    It would be handy to know how to mount a partition permanently. Went the awkward way about it. Did a back up, reinstall and resize of partitions.


  • Registered Users Posts: 5,245 ✭✭✭PropJoe10


    If you want to mount it permanently in a location of your choosing you'll need to edit the /etc/fstab file using a text editor. You will need to format the free space first (assuming you havent done that already) - the fdisk utility is quite easy to use for this. There's lots of tutorials online which will help you to do this. Linux is different to Windows, as all devices and partitions are mounted under the root (/) directory tree, whereas Windows picks up a new drive/partition and assigns it a drive letter.


  • Registered Users Posts: 1,089 ✭✭✭KAGY


    Itzy wrote: »
    It would be handy to know how to mount a partition permanently. Went the awkward way about it. Did a back up, reinstall and resize of partitions.

    To add to Joes post.
    A lot of file managers should spot your partition and have a link to in in the side bar. You should just be able to click on it to access it (assuming there's a filesystem on it, if not use gparted to format it (ext4 if used only for linux, ntfs if going to be shared with windows))
    To mount termorarrilly, you need to have a directory folder made. I think that the " official" place is /media for removable drives and /mnt for more permanent disks, but you can mount them anywhere, even on to a folder in your home directory. If the partition you are talking about already has data on it you don't need to format it. However, you will need to know the device number ..see the example
    So very quickly:
    Find device number
    Make a directory
    Mount your partition
    Link it to somewhere more accessible if you want
    sudo fdisk -l  (look for the device that represents your drive and partition e.g. /dev/sdc2)
     sudo mkdir /mnt/itzysfiles
    sudo mount /dev/sdc2 /mnt/itzysfiles
    cd     (changes to your home directory)
    ln -s /mnt/itzysfiles  (created a link in your home folder)
    

    To mount permenantly the steps are similar, but you put a line like
    /dev/sdc2 /mnt/itzysfiles ext4 defaults 0 0
    Into the file /etc/fstab
    Note that ext4 will need to be replaced with whatever file system you have on the partition.


  • Registered Users Posts: 558 ✭✭✭wobbles-grogan


    To add to the above, if it is an NTFS drive, and as you are mounting it as root, your user most likely wont be able to interact with any of the files in it. This is because of file permisisons (the drive was mounted as root, so only root has rwx permissions on the drive.

    I generally have my fstab entry like (to continue KAGY's example)
    /dev/sdc2 /mnt/itzysfiles ntfs umask=003 0 0

    That mounts /dev/sdc2 to /mnt/itzysfiles and sets all files to read/write/executable permission for all users. Basically allowing everyone to see and use the files there.

    If its an ext4 drive I dont think you need to worry about that.


  • Advertisement
Advertisement