I was playing a game, alt-tabbing froze my system so I waited a bit and then rebooted by using the button on the case, since I couldn’t do differently.
It now throws an error when mounting a drive: error mounting /dev/sdb1 at /media/user/local disk 1: unknown error when mounting (udisks-error-quark, 0)
This drive doesn’t have anything I was using on it, since it’s a media storage drive. I booted up Windows on my second drive and it can see and access this one without problems. How to fix?
Firstly, check the logs directly to get a more concise error that we can analyse.
journalctl
is the standard systemd logging client you can use in the terminal. By specifying the unit (units can be socket files, timers, services) you can get logs specifically for said unit.journalctl -u udisks2.service
You can also specify binary, if said binary logs to journalctl, like so (if the binary path exists):
journalctl /usr/lib/udisks2/udisksd
You can also check kernel messages (dmesg) by using the -k flag, like so:
journalctl -k
You can utelize flags such as
-e
to scroll to the end of a journal,-f
to follow a journal in realtime and utelize the-p
flag to set priorities like error, crit, warning (-o error
) and others to filter away common journal entries so you don’t have to scroll through every line in the log.Secondly, and this is gonna sound weird, but reboot into windows twice. The first time you boot windows run diskchk on the partition(s) in terminal/powershell/command as administrator. If it tells you it needs to do an offline scan, reboot and you’ll see an offline diskchk screen on boot before login. If not, reboot again into windows anyways, and then reboot into Linux.
The reason is that NTFS has a weird failsafe flag that NTFS on Linux considers a no-go, and it’s usually set if the system crashes more than twice, but not always. If Linux NTFS drivers see the flag, it won’t mount as a precaution. The only way to reset the flag is to reboot in windows twice. Not once, not three times, but twice.
This might be outdated info, but that was the fact some years ago. There might be a way to fix it with modern day Linux, but I don’t know, especially when I have no direct and informative errors to go by.
journalctl
is your friend :)What filesystem is on the disk? If it’s NTFS, you’ll need to fix it on Windows (right click, Properties, Tools, Check).
It worked, thanks a lot! What would be the Linux alternative to do that?
ntfsfix but in my experience it doesn’t really work if it can’t mount the drive in the first place.
Guess I’ll need to keep W10 around haha thanks again
If otherwise you don’t plan to use windows on that machine anymore (on bare metal, a virtual machine is not relevant here), it would be better to transfer your data to a Linux native file system. Unless you have a solid preference, ext4 is a good choice.
Basically you just need to copy your files over, but you may need to do it in chunks (and resize the 2 partitions in every round) if you can’t hold the files if the NTFS file system safely while you reformat it.
Also, if you want to keep attributes like file creation time and last modification time, that’ll require a bit more copy parameters, if you want this let me know and I’ll fill you in on the details.
What distro do you use by the way?I’ll keep it in mind, but since I’m getting new, bigger drives I think I’ll just wait for and format them directly in the better filesystem. I tried formatting an external HDD and I think I could only pick FAT or NTSC (I’ll double check), hopefully on the internal drives it will be different!
I’m on Pop!
If you’re using gnome disks, it hides the more Linuxy file systems behind an ‘Other’ option.
Personally, for removable drives I prefer to use
- ext4 for HDDs
- f2fs for SSDs
- exfat for Windows compatibility
If it’s grayed out or you’re getting errors try searching up ‘how to format as [file system] in [Pop OS/Ubuntu/Linux]’, you might need some extra packages.
Yeah, most options were greyed out. I’ll have to visit the wiki of my distro haha thanks for the tips though
edit: actually, just checked, EXT4 isn’t greyed out, but it says “internal disk for use with Linux only” and since it’s an external/portable HDD I didn’t pick that option
There is none. NTFS is a filesystem you should only use if you need Windows compatibility anyways. Eventhough Linux natively supports it these days, it’s still primarily a windows filesystem.
Oh, I see. So you’re saying that, when I have the chance, I should move to a different filesysten and that would avoid me issues as the one in the OP?
If you’re only using this filesystem on Linux anyways, absolutely.