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

Thread: Permission to use spare internal hard drive

  1. #1
    Join Date
    Feb 2011
    Beans
    43

    Permission to use spare internal hard drive

    I put a hard drive into my computer, formatted to ext4 but now I can't use it. It says I need "root". I searched on this but most people have data on their drive and formatted different so the information is confusing to me.
    What do I need to do to use this spare drive? Thank you!

  2. #2
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Permission to use spare internal hard drive

    Is this an internal drive? If so you may want to add it to fstab to permanently mount it.

    But generally you have to have root (yourself) give yourself permission and ownership of the files in the new partition(s) on the new drive. Use chown and chmod commands. $USER is an internal variable for you, or just use your name.

    #if not known to list partitions, change sda5 to your data partition or create multiples with different mount points
    # is comment, do not type
    sudo parted -l
    sudo mkdir /mnt/data
    sudo mount /dev/sda5 /mnt/data
    #where sda5 needs to be your drive, partition
    sudo chmod -R a+rwX,o-w /mnt/data
    # Note that the -R is recursion and everything is changed, do NOT run on any system partitions.
    #All directories will be 775.
    #All files will be 664 except those that were set as executable to begin with.
    sudo chown -R $USER:$USER /mnt/data


    Understanding fstab
    http://www.psychocats.net/ubuntu/mountlinux
    https://help.ubuntu.com/community/Mount/
    https://help.ubuntu.com/community/FilePermissions
    https://help.ubuntu.com/community/Fstab
    https://wiki.archlinux.org/index.php/Fstab


    http://ubuntuforums.org/showthread.php?t=1983336
    Mount & edit fstab from user Morbius1 in Post # 6 - suggest using templates instead.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  3. #3
    Join Date
    Feb 2011
    Location
    Coquitlam, B.C. Canada
    Beans
    2,467
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Permission to use spare internal hard drive

    Quote Originally Posted by troysos View Post
    I put a hard drive into my computer, formatted to ext4 but now I can't use it. It says I need "root".
    What says you need root?

    To use a spare partition on a extra drive on one of my computers, I do this:
    Code:
    sudo mkdir /media/newhd
    sudo mount -t ext4 /dev/sdb3 /media/newhd
    cd /media/newhd
    sudo mkdir bla
    sudo chown doug:doug bla
    and then I have a directory on that drive that I (user doug) own:
    Code:
    doug@s15:/media/newhd$ ls -l -d bla
    drwxr-xr-x 2 doug doug 4096 Apr 22 20:48 bla
    Last edited by Doug S; April 23rd, 2014 at 05:01 AM. Reason: Read oldfred post and realized I had forgotten the "mkdir /media/newhd" step
    Any follow-up information on your issue would be appreciated. Please have the courtesy to report back.

  4. #4
    Join Date
    Feb 2011
    Beans
    43

    Re: Permission to use spare internal hard drive

    Yes it's an internal drive. I would like it to mount automatically because it's a HTPC. I'm going to need to do this to 3 more hard drives later on as well.

  5. #5
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Permission to use spare internal hard drive

    Then you can use the templates suggested by Morbuis1 in above link.
    You copy his example but use your UUID and create your own mount point like /mnt/video1 or /home/video1 or /media/video1 or what every name and mount you prefer. Use names that make sense for you and create each of those mount points first as Morbuis1's link shows you.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  6. #6
    Join Date
    Feb 2011
    Beans
    43

    Re: Permission to use spare internal hard drive

    Thanks for everyone helping me but I'm lost here. I'm trying to follow Morbuis1 commands in the terminal but I'm not doing something right.

    After the very first command I get this (
    sudo parted -l)

    (
    Model: ATA Samsung SSD 840 (scsi)Disk /dev/sda: 250GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos


    Number Start End Size Type File system Flags
    1 1049kB 242GB 242GB primary ext4 boot
    2 242GB 250GB 8237MB extended
    5 242GB 250GB 8237MB logical linux-swap(v1)

    Then in the next step all I get is command not found or drive not found. This is what my the path for my drive looks like and what I'm adding to Morbuis1 commands.

    /dev/sda1/media/htpc/b860011b-6656-4f12-959e-d639cc692d221

    I know this should be easy but it's all very new to me. Thank you.

  7. #7
    Join Date
    Feb 2011
    Beans
    43

    Re: Permission to use spare internal hard drive

    I just found something else in the General Help area. Is it fine if I just "sudo nautilus" go to that drive and change permissions or ownership of that drive? Is that secure?

  8. #8
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Permission to use spare internal hard drive

    You are just showing one drive sda. Where is sdb?

    Post this and we can give detailed instructions.

    sudo parted -l
    sudo blkid -c /dev/null -o list
    sudo cat /etc/fstab

    What name do you want for partition.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

  9. #9
    Join Date
    Feb 2011
    Beans
    43

    Re: Permission to use spare internal hard drive

    Only one drive for sda my boot up drive.
    That name I would like for this drive is "downloaddrive" I just renamed it that through gparted. That's what it's showing up as now.

    /dev/sda1 ext4 / 50c1e868-0682-470e-8694-ade915b92c15
    /dev/sda5 swap <swap> 95507f7a-a1d1-4730-8d7a-34b612f2f035
    /dev/sdb1 ext4 downloaddrive /media/htpc/downloaddrive b860011b-6656-4f12-959e-d639cc692d22

  10. #10
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Permission to use spare internal hard drive

    Post the commands requested in #8 and I can create the exact line to copy and paste into fstab.
    For more info on UEFI boot install & repair - Regularly Updated :
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to change to [Solved] when/if answered completely.

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
  •