0

I have the Raspberry Pi 4 Model B, I've installed Raspbian OS using NOOBS. Everything works fine until I plug in my NTFS HDD via USB, the hard drive is detected and mounted automatically, but with RO permissions. Apparently I can just remount with RW permission sudo mount -o remount,rw /dev/sda2 /media/pi/Media/ so I do that and it works perfectly.. until I reboot, after the reboot the HDD simply disappears. I don't know how to get it back without reinstalling Raspbian. So is there a better way to get RW permissions that doesn't hide the HDD after a reboot or is there a way to get the HDD back after a reboot. Thanks for any help.

Edit: I have just reinstalled Raspbian so the drive is back (RO again)

fstab:

proc            /proc           proc    defaults          0       0

/dev/mmcblk0p6  /boot           vfat    defaults          0       2

/dev/mmcblk0p7  /               ext4    defaults,noatime  0       1

\# a swapfile is not a swap partition, no line here

\#   use  dphys-swapfile swap[on|off]  for that

sudo blkid output:

/dev/mmcblk0p1: LABEL_FATBOOT="RECOVERY" LABEL="RECOVERY" UUID="C5FC-4267" TYPE="vfat" PARTUUID="000626e2-01"

/dev/mmcblk0p5: LABEL="SETTINGS" UUID="7b4bed67-ec0b-4c8e-868c-d285cbd45a43" TYPE="ext4" PARTUUID="000626e2-05"

/dev/mmcblk0p6: LABEL_FATBOOT="boot" LABEL="boot" UUID="EE87-DFD2" TYPE="vfat" PARTUUID="000626e2-06"

/dev/mmcblk0p7: LABEL="root" UUID="cf0274c5-98ea-499d-8f2a-68ec2a3b2543" TYPE="ext4" PARTUUID="000626e2-07"

/dev/sda2: LABEL="Media" UUID="46205A22205A196F" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="d526499e-bf03-44ba-b1d7-65bf0d270241"

/dev/mmcblk0: PTUUID="000626e2" PTTYPE="dos"

/dev/sda1: PARTLABEL="Microsoft reserved partition" PARTUUID="22633a78-bf20-4224-9917-98f0745768bd"

Edit 2:

This is the new output of blkid:

/dev/mmcblk0p1: LABEL_FATBOOT="RECOVERY" LABEL="RECOVERY" UUID="C5FC-4267" TYPE="vfat" PARTUUID="000626e2-01"

/dev/mmcblk0p5: LABEL="SETTINGS" UUID="7b4bed67-ec0b-4c8e-868c-d285cbd45a43" TYPE="ext4" PARTUUID="000626e2-05"

/dev/mmcblk0p6: LABEL_FATBOOT="boot" LABEL="boot" UUID="EE87-DFD2" TYPE="vfat" PARTUUID="000626e2-06"

/dev/mmcblk0p7: LABEL="root" UUID="cf0274c5-98ea-499d-8f2a-68ec2a3b2543" TYPE="ext4" PARTUUID="000626e2-07"

/dev/mmcblk0: PTUUID="000626e2" PTTYPE="dos"

This is the new fstab file:

proc            /proc           proc    defaults          0       0

/dev/mmcblk0p6  /boot           vfat    defaults          0       2

/dev/mmcblk0p7  /               ext4    defaults,noatime  0       1

UUID="46205A22205A196F" /media/pi/Media ntfs-3g auto,nofail,noatime,rw,user 0 0

\# a swapfile is not a swap partition, no line here

\#   use  dphys-swapfile swap[on|off]  for that
2
  • What have you got in /etc/fstab? Can you also edit your post and add the output from a sudo blkid command (with the drive mounted manually).
    – Dougie
    Jun 13 '20 at 18:02
  • @Dougie Done, I haven't been able to mount the HDD manually, either it mounts automatically with RO perm or not at all, the edit is with the drive mounted automatically.
    – AdamWHY2K
    Jun 13 '20 at 18:19
1

Edit /etc/fstab and add

UUID="46205A22205A196F" /media/pi/Media/ ntfs-3g auto,nofail,noatime,rw,user    0   0

and it should mount automatically at bootup. Bootup won't fail if the drive is not plugged in because of the nofail option.

3
  • I did this and it has disappeared again, I'll edit and add the new output of blkid and my new fstab file
    – AdamWHY2K
    Jun 13 '20 at 20:53
  • After power cycling the pi and the hdd its back, but its still read only.
    – AdamWHY2K
    Jun 13 '20 at 21:11
  • Then stick it in a Windows system and check the filesystem.
    – Dougie
    Jun 13 '20 at 22:52
0

I have kinda fixed the problem. Once I shut down I have to unplug both the pi and the hdd's power and remount on startup by adding @reboot sudo mount -o remount,rw /partition/identifier /mount/point to sudo crontab -e. This is obviously not ideal but at this point it's good enough for me. Thanks for all the help.

1
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    Jun 17 '20 at 6:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.