Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 34

Thread: Setting up folders on HDD

  1. #11
    Join Date
    Aug 2011
    Location
    51.8° N 5.8° E
    Beans
    5,624
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Setting up folders on HDD

    The mountpoint /media/username/partitionlabel is used for partitions mounted by the file manager. If you mount your partition automatically at boot using /etc/fstab, it's better to mount it somewhere else, or confusing things might happen.

  2. #12
    Join Date
    Oct 2012
    Beans
    80

    Re: Setting up folders on HDD

    I have upgraded to 20.04 seems ok
    ran oldfreds commands up to and including

    sudo mount -a
    ln -s /mnt/data/Music


    I have a folder called Music but it is not accessible see screen shot
    Clicking on the file brings up a error saying the file does not exist

    How do I create the file Music on the HDD? I can't see it under files.


    Attached Images Attached Images

  3. #13
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Setting up folders on HDD

    I am totally confused about where exactly you have got to so far, and I think your problem is a result of your lack of understanding of Linix permissions.
    Does that partition with the Music folder on it belong to you as user, and does it mount at boot, ie, is it included in /etc/fstab file?
    Please show us the output of
    Code:
    cat /etc/fstab
    The link that I presume you have made is broken which usually means that the disk or partition on which the files/folders to which the link points is not mounted or has the wrong permissions.

    I think you need to tell us in detail where the music files actually sit; we can then tell you how to mount that at boot with a line in fstab, how to ensure that you are the owner of that partition, and also what the command is to create a link from the Music folder on that to Music in your home.
    Last edited by ajgreeny; November 21st, 2020 at 08:41 PM.

  4. #14
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Setting up folders on HDD

    From my mount in /mnt/data, showing directory:

    Code:
    fred@z170-focal-k:~$ ll /mnt/data
    total 80
    drwxrwxrwx 17 fred fred  4096 Oct 19  2019 ./
    drwxr-xr-x 14 root root  4096 Nov  4 12:23 ../
    drwxrwxrwx 18 fred fred  4096 Dec 31  2015 Music/
    Then once linked in /home it is seen in /home with l first showing it is linked.

    fred@z170-focal-k:~$ ll *Mus*
    Code:
    lrwxrwxrwx 1 fred fred 15 Oct 14 19:37 Music -> /mnt/data/Music/
    Mount in fstab, now since SSD, I use noatime, when HDD I used relatime.
    Code:
    # Entry for nvme0n1p5 : 
    UUID=1a44f4af-6780-4bbd-ad0b-6385ed30830b /mnt/data ext4 noatime 0 2
    
    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.

  5. #15
    Join Date
    Oct 2012
    Beans
    80

    Re: Setting up folders on HDD

    Output from
    cat /etc/fstab

    # /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>
    # / was on /dev/sda1 during installation
    UUID=a143107f-f4be-478f-be5d-c5b45fd5a132 / ext4 errors=remount-ro 0 1
    # swap was on /dev/sda5 during installation
    UUID=22abfa4b-52bd-4796-90bd-20963137b50d none swap sw 0 0
    UUID=0c12fac5-49c1-443a-abf3-75cc931734d8 /mnt/Data ext4 auto,users,rw,relatime 0 2

  6. #16
    Join Date
    Jul 2005
    Location
    I think I'm here! Maybe?
    Beans
    Hidden!
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Setting up folders on HDD

    Sorry, I forgot to ask also for the output of commands
    Code:
    sudo blkid -c /dev/null
    to check the UUIDs of partitions and then
    Code:
    mount | grep /dev
    to see the mounted partitions status of your currently booted OS.

    To check ownership of your data partition let's also see output from
    Code:
    ls -l /mnt/data/Music
    I have a suspicion it may still be owned by root and if so you may need to run
    Code:
    sudo chown kieran:kieran /mnt/data/Music
    to make you owner of the partition and thus able to write to it.

  7. #17
    Join Date
    Jun 2009
    Location
    SW Forida
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Setting up folders on HDD

    Note that /mnt/Data is not equal to /mnt/data.
    Make sure you adjust other commands to use Data, not data.
    In Linux case is important, so you have to be consistent on what you capitalize.
    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.

  8. #18
    Join Date
    Oct 2012
    Beans
    80

    Re: Setting up folders on HDD

    sudo blkid -c /dev/null
    /dev/sdb1: UUID="0c12fac5-49c1-443a-abf3-75cc931734d8" TYPE="ext4" PARTUUID="cc294478-01"
    /dev/sda1: UUID="a143107f-f4be-478f-be5d-c5b45fd5a132" TYPE="ext4" PARTUUID="e1f2d99c-01"
    /dev/sda5: UUID="22abfa4b-52bd-4796-90bd-20963137b50d" TYPE="swap" PARTUUID="e1f2d99c-05"
    mount | grep /dev
    udev on /dev type devtmpfs (rw,nosuid,noexec,relatime,size=4020304k,nr_inodes =1005076,mode=755)
    devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode =000)
    /dev/sda1 on / type ext4 (rw,relatime,errors=remount-ro)
    tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
    cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
    mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
    hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
    /dev/sdb1 on /mnt/Data type ext4 (rw,nosuid,nodev,noexec,relatime)
    ls -l /mnt/Data/Music
    ls: cannot access '/mnt/Data/Music': No such file or directory
    edit There is a directory in mnt (Computer) called Data but it's empty! mnt and Data ownership is root
    Last edited by KieranFitzgerald; November 22nd, 2020 at 06:24 PM. Reason: More info

  9. #19
    Join Date
    Oct 2012
    Beans
    80

    Re: Setting up folders on HDD

    I just tried this

    ls -l /mnt/Data
    total 16
    drwx------ 2 root root 16384 Nov 21 13:05 lost+found

    sudo chown kieran:kieran /mnt/Data

    ls -l /mnt/Data
    total 16
    drwx------ 2 root root 16384 Nov 21 13:05 lost+found
    Why is the ownership not changing?

  10. #20
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,139
    Distro
    Xubuntu 20.04 Focal Fossa

    Re: Setting up folders on HDD

    Quote Originally Posted by KieranFitzgerald View Post
    Why is the ownership not changing?
    It probably is. You changed the ownership of /mnt/Data, and then listed its contents.
    To view the ownershiip of /mnt/Data itself, you need to tell ls to show the directory rather than to show its contents:
    Code:
    ls -ld /mnt/Data
    But there is no Music folder inside /mnt/Data. You will need to create that. You should be abe to now you own the Data folder.
    Last edited by The Cog; November 22nd, 2020 at 08:04 PM.

Page 2 of 4 FirstFirst 1234 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
  •