Score:0

I want to give my other disk read/write permission all the time

ca flag

I recently moved from windows to Ubuntu, I used one of my 2 drives to install Ubuntu and all my data in the other drives with the old windows partitions.

Now I need to mount partitions of my old drive to keep my new data, and I find it so hard to all the time mount and change the permissions of the needed partitions to be write/read each time I need to download or change something.

I need a way to mount partitions and give write permissions all each time I boot. enter image description here

I used # blkid to get the UUID of partitions needed to be mounted. enter image description here

/dev/sdb1: BLOCK_SIZE="512" UUID="F8FE844CFE84055A" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="053727a6-5dba-4888-93c6-da2a466a8e4d"
/dev/sdb2: UUID="5E75-8826" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="0d13c77a-a67f-4971-a2ec-547af6019abf"
/dev/sdb3: PARTLABEL="Microsoft reserved partition" PARTUUID="61c05d96-6a41-4e3c-9ec8-cad4c4076419"
/dev/sdb4: LABEL="A" BLOCK_SIZE="512" UUID="244457294456FCCC" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="2f42d340-e6b0-4d24-8964-5c2117acff34"
/dev/sdb5: LABEL="B" BLOCK_SIZE="512" UUID="B270646A7064376F" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="5c1e2d61-5025-46ea-b1bb-3dc0573507ba"
/dev/sdb6: LABEL="D" BLOCK_SIZE="512" UUID="0220616220615E23" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="18822c48-5ff7-4daf-a595-63eda7eb76df"
/dev/sdb7: LABEL="20h2" BLOCK_SIZE="512" UUID="14206D4A206D33C0" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="6d6f76b9-8d4f-4cec-90a7-a7539b5b3a68"
/dev/sdb8: BLOCK_SIZE="512" UUID="F8047DF7047DB8E8" TYPE="ntfs" PARTUUID="bf7c341a-dd3f-4bc5-8e73-bac8234f7b9b"

And the fstab file shown, but not really sure how to add it. enter image description here

# /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/sda2 during installation
UUID=53541401-02f6-44e7-a272-d08775f93209 /               ext4    errors=remoun>
# /boot/efi was on /dev/sda1 during installation
UUID=DF3D-1B7E  /boot/efi       vfat    umask=0077      0       1
/swapfile                                 none            swap    sw           >

I edited fstab file by adding

/dev/disk/by-uuid/244457294456FCCC              /mnt/A          ntfs-3g users,uid=1000,dmask=027,fmask=137,rw,x-gvfs-show,utf8 0 0

The partition mounts each time I boot, but still I need it to be accessed in read/write mode the rw in the line I added it, and it did not work.

PonJar avatar
in flag
You need to research the configuration options of your fstab file which resides in the /etc folder. In there you will find the configuration that specifies what and how to mount a list of partitions. You probably need 4 additional entries. We would need to know what filesystem exists on each partition to give a more detailed answer. This might give you the information you need https://www.howtogeek.com/howto/38125/htg-explains-what-is-the-linux-fstab-and-how-does-it-work/
Michael George avatar
ca flag
I read the article and got the UUID of the partitions as show. But I'm not exactly sure how to add it to stab. (I will add the images to the original post).
cn flag
Please change them to TEXT by copy/pasting the text into the question. You can't search for images and it will be helpful to anyone who needs to copy/paste parts of your text into answers.
Michael George avatar
ca flag
I added it, I'm sorry, I'm not used to do this.
PonJar avatar
in flag
I’m busy this morning but if you follow the principles shown in my answer here https://askubuntu.com/questions/1235979/creating-trash-for-shared-ntfs-partition/1237000#1237000 you should be able to sort it. Let us know how you get on. I can work out the lines you need to add later if you still have problems
Michael George avatar
ca flag
Thanks to @PonJar now the partitions always mount when I boot, but still I need to change the mode to read/write.
PonJar avatar
in flag
I suggest you add “defaults,” (not the quotes) at the beginning of your options section for each partition. That includes the “rw,” option which allows reading and writing. Not sure why that was not part of the example but the focus of that answer was on trash handling
PonJar avatar
in flag
You may need “gid=1000,” too. Also check your user and group ids with id -u and id-g If you don’t get 1000 for both use the numbers you get instead
Michael George avatar
ca flag
I solved it thanks @PonJar, if you added the last two comments as answer i will verify it maybe it will be helpful.
PonJar avatar
in flag
Thanks for the suggestion but only you know exactly what gave you success. You can answer your own question and list the fstab entries that worked. 24 hours later you can accept it so it will stand out for anyone searching for an answer to a similar issue
Michael George avatar
ca flag
Thanks for your help anyway.
Score:1
ca flag
  1. Check all available partitions using:

    sudo blkid
    

    The output for each partition is something like this:

    /dev/sdb8: BLOCK_SIZE="512" UUID="**F8047DF7047DC8E8**" TYPE="*ntfs*" PARTUUID="bf7c341a-dd3f-4bc5-8e73-bac8232f7b9b"
    
  2. With this information, a new terminal window should be opened from the user and the fstab file should be edited using:

    sudo nano /etc/fstab
    
  3. At the bottom of the file, add the UUID, mount point and label, partition type, defaults and 0 0, all separated by tabs:

    UUID=F8047DF7047DC8E8   /media/Label        ntfs    defaults        0       0
    
  4. To make sure that there is nothing wrong, use:

    mount -a
    
  5. If the partition has a Windows cache and error appearing, the ntfsfix command can be used:

    sudo ntfsfix /dev/sdb8
    
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.