NTFS: Difference between revisions
→Troubleshooting: adds section on dirty flag |
m style improvements |
||
| Line 6: | Line 6: | ||
1. Run {{ic|lsblk}} to list device names. | 1. Run {{ic|lsblk}} to list device names. | ||
<syntaxhighlight lang=console> | |||
sd... | sd... | ||
└─sdX | └─sdX | ||
</syntaxhighlight> | |||
2. Mount the device using [https://man7.org/linux/man-pages/man8/mount.8.html {{ic|mount}}], where {{ic|/dev/sdX}} replaced with your device name and {{ic|/mnt/sdX}} replaced with an existing folder path to mount your drive. | 2. Mount the device using [https://man7.org/linux/man-pages/man8/mount.8.html {{ic|mount}}], where {{ic|/dev/sdX}} replaced with your device name and {{ic|/mnt/sdX}} replaced with an existing folder path to mount your drive. | ||
<syntaxhighlight lang=console> | |||
$ mount /dev/sdX /mnt/sdX -t ntfs3 -o uid=$UID | |||
</syntaxhighlight> | |||
3. Run {{ic|nixos-generate-config --dir .}} to generate hardware configuration. This will <strong>automatically</strong> add all currently mounted devices to {{ic|hardware-configuration.nix}}. | 3. Run {{ic|nixos-generate-config --dir .}} to generate hardware configuration. This will <strong>automatically</strong> add all currently mounted devices to {{ic|hardware-configuration.nix}}. | ||
{{file|/etc/nixos/hardware-configuration.nix|diff|3= | {{file|/etc/nixos/hardware-configuration.nix|diff|3= | ||
| Line 48: | Line 50: | ||
To verify: | To verify: | ||
< | <syntaxhighlight lang=console> | ||
journalctl -b0 | grep -i "The disk contains an unclean file system" | $ journalctl -b0 | grep -i "The disk contains an unclean file system" | ||
</ | </syntaxhighlight> | ||
It should return a similar message to what follows: | It should return a similar message to what follows: | ||
< | <syntaxhighlight lang=console> | ||
The disk contains an unclean file system (0,0). Metadata | The disk contains an unclean file system (0,0). Metadata | ||
kept in Windows cache, refused to mount. Falling back to | kept in Windows cache, refused to mount. Falling back to | ||
| Line 60: | Line 62: | ||
state. Please resume and shutdown Windows fully (no | state. Please resume and shutdown Windows fully (no | ||
hibernation or fast restarting.) | hibernation or fast restarting.) | ||
</ | </syntaxhighlight> | ||
If you have shutdown Windows fully, and not used hibernation, it may be caused by the <em>fast startup</em> or <em>fast boot</em> feature of Windows. It has been reported that major Windows updates may reset this setting to <strong>on</strong>. | If you have shutdown Windows fully, and not used hibernation, it may be caused by the <em>fast startup</em> or <em>fast boot</em> feature of Windows. It has been reported that major Windows updates may reset this setting to <strong>on</strong>. | ||