You are not logged in.

#1 2016-06-16 17:57:51

marius-arc
Member
Registered: 2016-04-17
Posts: 42

ntfs in fstab stops proper boot

I've got dual boot with Windows set up on this machine and every once in a while after I've been in Windows Arch doesn't boot up.
Now, this is not a super important partition to mount so for it to halt the boot process entirely is a bit unnecessary.

After reading quite a bit this appears to be because Windows uses it to make a hibernation file or something, and it can only be mounted in read-only, which is not much help. I've tried adding the option remove_hiberfile, but that doesn't seem to take effect at all.

My fstab looks like this:

UUID=624276C74276A009   /home/marius/jupiter    ntfs-3g defaults        0 0

Now, my question - how can I either make it mount properly when it has hibernated, or at least make it not halt my boot process?

Offline

#2 2016-06-16 18:06:50

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: ntfs in fstab stops proper boot

Your question is not very clear. You have hibernated Archlinux or Windows? What ntfs-3g have to do with your problem? (you mention it in the title and somehow in your question but it is not very clear). Please repost saying exactly what you have done and what you see on the screen (error messages, etc.).

A precision: you should not mount the Windows partition if Windows is hibernated. If you want to mount the Windows partition within Arch you should disable "fastboot" on recent Windows (fastboot is just a kind of hibernation). Windows will not touch the Archlinux partition unless bit is NTFS  or FAT  (or you have installed a driver for a Linux Filesystem like ext2fsd; these drivers are usually safe only in read only mode).

Note that it may be possible that with ntfs-3g in fstab, the system (systemd) try to mount it too early (ntfs-3g relies on things like fuse that may have dependencies not yet started).

Last edited by olive (2016-06-16 18:20:35)

Offline

#3 2016-06-16 18:22:14

marius-arc
Member
Registered: 2016-04-17
Posts: 42

Re: ntfs in fstab stops proper boot

Sorry if I was a bit unclear.

3 partitions:
- Windows has it's own partition.
- Arch has it's own partition.
- Fun disk with stuff I want accessible from both Windows and Arch; pictures, music, etc

Sometimes when Windows shuts down it hibernates in order to boot faster (I do not click hibernate).
This creates trouble when Arch boots up and tries to mount it from fstab (even though my fun disk is not where Windows is installed).

It can't mount the ntfs disk because windows has written something to it. This halts Arch booting up, which is what I would like to fix.
I guess I could go and disable "fastboot" as you call it, but I would like to fix it from Arch.

So what I am looking for is either:
a) Is there for instance an option I can put in fstab to make Arch ignore the entry if it can't mount it, so that the system boots anyway?
b) A way to actually fix it, like the option "remove_hiberfile" which I read is old and doesn't work anymore

Offline

#4 2016-06-16 18:31:37

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,845
Website

Re: ntfs in fstab stops proper boot


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2016-06-16 18:34:26

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: ntfs in fstab stops proper boot

The "remove_hiberfile" seems to be the option you want. Note however that your are basically asking how to corrupt your disk. You should not mount your disk if Windows is hibernated (including fast boot). In the case of a removable disk, you can click the option in Windows to "safely remove it" which correspond to unmounting it. Note that I am curious as why this option was not working for you, what happen if you try to mount the disk by hand? (but better experiment with a test disk).

I am unaware of an option that let the normal boot process continues forgetting the mount after an error like this (normally you will be dropped in a rescue mode after a timeout). You could write a systemd service independent from the fstab to do it.

Offline

#6 2016-06-16 18:40:00

marius-arc
Member
Registered: 2016-04-17
Posts: 42

Re: ntfs in fstab stops proper boot

I believe I read that remove_hiberfile was removed. Probably has to do with This.

I guess if I had a lot of stuff open with unsaved changes, shut down Windows and then removed the hiberfile.sys something could go missing, but other than that surely Windows would boot properly. It doesn't tell you that it is doing it's hibernation and if someone were to change out a disk it would still have to boot.

Anyway, I guess I'll have to admit defeat and just disable fastboot.

Thanks for your time, fellas.

Offline

#7 2016-06-16 18:50:38

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: ntfs in fstab stops proper boot

Systemd is very nasty about failure. If you mount something from fstab and that does not work, it won't boot normally. I remember booting from a rescue disk because of a problem with the swap partition (which is not essential). If you absolutely want to mount your disk at boot tolerating failure, you can write a custom systemd service. I have done it to mount a Virtulabox sharing folder for other reasons. Basically it looks like this (/etc/systemd/system/mountvboxsf.service).

[Unit]
ConditionVirtualization=true
Description=Mount the shared folders in Windows
After=vboxservice.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/mount.vboxsf -o uid=1000,gid=1000,fmask=0117,dmode=0770 WINDOWS /mnt/windows
ExecStop=/usr/bin/umount /mnt/windows

[Install]
WantedBy=multi-user.target

I can't give you a systemd course in this post, but you can adapt my example or ask specific questions about it if it is unclear.

Last edited by olive (2016-06-16 18:52:14)

Offline

#8 2016-06-16 22:06:13

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: ntfs in fstab stops proper boot

nofail

Offline

#9 2016-06-17 06:38:01

marius-arc
Member
Registered: 2016-04-17
Posts: 42

Re: ntfs in fstab stops proper boot

nofail do not report errors for this device if it does not exist.

Hmm, probably won't work since the device exists, but I can give it a go.

Just an idea, would x-systemd.automount work perhaps?

Offline

#10 2016-06-17 19:36:20

Soukyuu
Member
Registered: 2014-04-08
Posts: 854

Re: ntfs in fstab stops proper boot

nofail works just fine. I use it for my only remaining windows partition.

Also automount won't work because of the same problem - linux will not mount an NTFS disk that is not marked as clean (hibernation counts as not being clean).

Last edited by Soukyuu (2016-06-17 19:37:23)


[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]

Offline

Board footer

Powered by FluxBB