You are not logged in.
Pages: 1
Hi all,
I am having trouble getting my NTFS drive to mount as 'rw' at boot.
Can you please help a newb out?
Here is what the entry on my fstab file looks like:
# /dev/sdc1
UUID=28AC9E82AC9E49E8 /run/media/myusername/Files ntfs-3g rw,uid=myusername,gid=users,umask=0022 0 0Last edited by knewyousir (2018-05-03 02:28:22)
Offline
What is the issue exactly?
Offline
I'm trying to run a qemu VM from this drive but it can't open the hda.img as the drive is a "read-only file system"
: Could not open '/run/media/knewyousir/Files/archFiles/virtualMachines/winServer2016Test01/hda.img': Read-only file systembasically, i've set what i think should be the correct entry in fstab, but the drive is nevertheless being mounted as read-only.
not really sure where to go with this.
Last edited by knewyousir (2018-05-03 00:21:59)
Offline
What is the output of
findmnt /run/media/myusername/Files
mountPlease also post the command you are using that produced the output in post #3 and its full output.
Edit:
Is it /run/media/knewyousir/Files or /run/media/myusername/Files ? Is one entry obfuscated without you mentioning it?
Last edited by loqs (2018-05-03 00:35:17)
Offline
,uid=myusername,gid=users,umask=0022
Remove this. It is unnecessary and potentially misleading.
Please also share output of the following:
ls -ld /run/media/myusername/FilesOffline
What is the output of
findmnt /run/media/myusername/Files mount
output:
TARGET SOURCE FSTYPE OPTIONS
/run/media/knewyousir/Files /dev/sdd1 fuseblk ro,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096Please also post the command you are using that produced the output in post #3 and its full output.
Edit:
Is it /run/media/knewyousir/Files or /run/media/myusername/Files ? Is one entry obfuscated without you mentioning it?
i replaced my username with 'knewyousir'/'myusername' to hide my username, which is my real name
command that produced the output:
[knewyousir@myserv winServer2016Test01]$ ./launchVM.sh
qemu-system-x86_64: -drive file=/run/media/knewyousir/Files/archFiles/virtualMachines/winServer2016Test01/hda.img,index=1,media=disk,format=raw: Could not open '/run/media/knewyousir/Files/archFiles/virtualMachines/winServer2016Test01/hda.img': Read-only file system
./launchVM.sh: line 8: -machine: command not foundmy script, launchVM.sh:
qemu-system-x86_64 \
-drive file=/run/media/knewyousir/Files/archFiles/virtualMachines/winServer2016Test01/hda.img,index=1,media=disk,format=raw \
-drive media=cdrom,index=2,file=/run/media/knewyousir/Files/archFiles/virtualMachines/isos/14393.0.161119-1705.RS1_REFRESH_SERVER_EVAL_X64FRE_EN-US.iso \
-enable-kvm \
-cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \
-m 4G \
# -smp ,sockets=1,cores=1,threads=1 \
-machine usb=on \
-device usb-mouse \
-device usb-kbd \
-boot menu=on \
-rtc base=localtime,clock=host \
-parallel none \
-serial none \
-show-cursor \
-name "ServTest" \
-no-acpi \
-no-hpet \
-no-reboot \
# -device amd-iommu \
# -machine accel=kvm \this script has worked just fine in the past (when the drive was manually mounted as root), even if the 'usb=on' line is throwing that error message...
-a kind thank you for your help with this-
Last edited by knewyousir (2018-05-03 01:57:28)
Offline
knewyousir wrote:,uid=myusername,gid=users,umask=0022Remove this. It is unnecessary and potentially misleading.
Please also share output of the following:
ls -ld /run/media/myusername/Files
output:
[knewyousir@myserv winServer2016Test01]$ ls -ld /run/media/knewyousir/Files
drwxr-xr-x 1 knewyousir users 4096 Apr 22 03:32 /run/media/knewyousir/Files-many thanks for your help with this-
Last edited by knewyousir (2018-05-03 01:52:26)
Offline
you do have the ntfs-3g package installed, right?
Offline
you do have the ntfs-3g package installed, right?
yes, definitely is installed
Offline
Alright, had to check. Unmount it and mount it again manually, does it work or does it throw an error?
Offline
Alright, had to check. Unmount it and mount it again manually, does it work or does it throw an error?
so I ran 'mount' alone and see this towards the bottom of the output:
/dev/sdd1 on /run/media/knewyousir/Files type fuseblk (ro,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other,blksize=4096) it looks like its being mounted as /dev/sdd1 instead of what i specified? I see 'ro' as well...
when i try to umount this target i get:
[knewyousir@myserv ~]$ sudo umount /dev/sdd1
umount: /run/media/knewyousir/Files: target is busy.Offline
ok- maybe this is the breakthrough.
closed another terminal window i had open- it was reading a directory on the external which is why i couldn't umount.
umount'ed successfully
mount produced this now:
[knewyousir@myserv ~]$ sudo mount /dev/sdd1 /run/media/
The disk contains an unclean file system (0, 0).
Metadata kept in Windows cache, refused to mount.
Falling back to read-only mount because the NTFS partition is in an
unsafe state. Please resume and shutdown Windows fully (no hibernation
or fast restarting.)weird because i did do a full shutdown (windows mounts this as well and stores files on this drive from time to time- i have a dual boot setup- windows OS and linux OS are on separate HDDs; /dev/sdd1 is a third external HDD for bulk file storage duties)
i thought there was a way to clear this and force the mount... but not remembering atm...
also, how can I perhaps force that to be done/scripted on boot, or am I approaching this incorrectly?
Last edited by knewyousir (2018-05-03 02:16:53)
Offline
ok solved-
ran this command on the external drive
sudo ntfsfix /dev/sdd1rebooted and the drive was mounted as rw successfully!
drive still mounting as sdd1 and not as sdc1 as specified in fstab though...
Offline
You can use UUID's instead of direct device paths for a more consistant approach. https://wiki.archlinux.org/index.php/Fs … stem_UUIDs
Sometimes the /dev device path can change when booting your system, but UUID's never change, so if you use them in fstab instead of /dev/ devices, you will not have the trouble of them changing names.
Offline
You can use UUID's instead of direct device paths for a more consistant approach. https://wiki.archlinux.org/index.php/Fs … stem_UUIDs
Sometimes the /dev device path can change when booting your system, but UUID's never change, so if you use them in fstab instead of /dev/ devices, you will not have the trouble of them changing names.
ah thank you- i see- i think i am doing that already.
upon closer inspection, my fstab file does not specify the name (sdc1) anywhere, only in commented text.
is there anyway to force it to be mounted with that particular name (/sdc1) in fstab?
Offline
I think you missed the point, that name is unreliable. sdc can be come sdd on the next boot totally at random.
Offline
I think you missed the point, that name is unreliable. sdc can be come sdd on the next boot totally at random.
I see now- they are talking about specifying by UUID rather than path.
I was mostly concerned with how to call this drive consistently in scripts and such.
I will take a look at the link and figure out how to make adjustments as needed...
Many thanks to you all!
Last edited by knewyousir (2018-05-03 04:09:33)
Offline
Pages: 1