Score:0

how to auto-mount ntfs via /etc/fstab

cn flag

I have been trying to automount via fstab an external hdd formatted as ntfs. When it tries to boot it goes into emergency mode or it wont give me permission to do anything but read files. I tried whats on #113733 and it still didn't work on ls -l

drwxrwxr-x 2 ~user~ 4096 Sep 4 19:10 download
drwxrwxrwx 1 root root 4096 Oct 23 18:54 hdd
drwxr-xr-x 2 ~user~ ~user~ 4096 Oct 23 15:30 hdd2
drwxrwxr-x 8 ~user~ ~user~ 4096 Apr 8 2022 plex
drwx------ 3 ~user~ ~user~ 4096 Apr 8 2022 snap

and in fstab I have

UUID=18F7-2D4F /home/~user~/hdd2 ntfs-3g defaults,nls=utf8,umask=000,dmask=027,fmask=137,uid=1000,gid=1000,windows_names 0 0

Any help is welcome, I am on Ubuntu server 22.04 Kernel: 5.15.0-52-generic

oldfred avatar
cn flag
For external devices, may also want to add the nofail option, so boot continues even when that device isn't available. The nofail option is best combined with the x-systemd.device-timeout option. Was this drive mounted with Windows? If so, Windows probably left its fast startup/hibernation flag on, preventing the Linux NTFS driver from fully mounting. https://askubuntu.com/questions/843153/unable-to-mount-windows-10-partition-it-is-in-an-unsafe-state & https://askubuntu.com/questions/145902/unable-to-mount-windows-ntfs-filesystem-due-to-hibernation
SuaMae avatar
cn flag
hey, i'm sorry for the delay, work has been crazy, i've tried the fast startup option on 843153, and it still gives me the same permission error, i'll be trying 145902 today
SuaMae avatar
cn flag
ok, i've tried a few other things beside whats on both questions right now i get this when i try to mount: >sudo mount -t ntfs-3g -o remove_hiberfile /dev/sdb1 /home/~user~/hdd2
SuaMae avatar
cn flag
ntfs_mst_post_read_fixup_warn: magic: 0xe4964e42 size: 1024 usa_ofs: 11065 usa_count: 35289: Invalid argument Record 0 has no FILE magic (0xe4964e42) Failed to load $MFT: Input/output error Failed to mount '/dev/sdb1': Input/output error
SuaMae avatar
cn flag
NTFS is either inconsistent, or there is a hardware fault, or it's a SoftRAID/FakeRAID hardware. In the first case run chkdsk /f on Windows then reboot into Windows twice. The usage of the /f parameter is very important! If the device is a SoftRAID/FakeRAID then first activate it and mount a different device under the /dev/mapper/ directory, (e.g. /dev/mapper/nvidia_eahaabcc1). Please see the 'dmraid' documentation for more details.
oldfred avatar
cn flag
So have you run chkdsk from Windows as it says in the error message? You can only fix NTFS from Windows. A very few fixs can be done from Linux but normally better to use Windows tools on Windows systems and Linux tools on Linux systems.
I sit in a Tesla and translated this thread with Ai:

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.