You are not logged in.

#1 2012-08-22 08:58:24

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

[SOLVED] systemd boot fails - Removable on fstab

Just converted to the dark (systemd) side.
Very straight forward, simple and easy enough.


I have one problem with boot process.
I have three usb devices that i use frequently, below is my fstab

# Removable Media
UUID=6e4bc1aa-3414-48b9-9598-5eedfaadbe2b 	/media/FreeAgent1	ext4	defaults,user	0	0
UUID=14219291-0703-45b6-95db-976c5b7c3b7b	        /media/FreeAgent2	ext4	defaults,user	0	0
UUID=0590bbe0-d098-4f81-a9c7-c72654aa54a5 	/media/Sandisk	ext4	defaults,user	0	0

USB devices at the moment arent on the pc.

With init process, everything was fine.
Boot process gave me prompt.


With systemd, my archlinux box doesnt boot (at all)

http://ebalaskas.gr/img/systemd_removeable.png

Reading https://bbs.archlinux.org/viewtopic.php?id=146982 & http://lists.freedesktop.org/archives/s … 06292.html
i get the feeling that perhaps is a bug.

But i am not sure.

The emergency mode (^D) doesnt work either - keyboard seemed dead.

Used old transitional init=/bin/sh to comment out the removable devices from my fstab



-- mod edit: read the Forum Etiquette and only post thumbnails http://wiki.archlinux.org/index.php/For … s_and_Code [jwr] --

Last edited by ebal (2012-08-24 06:43:52)


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#2 2012-08-22 09:17:26

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: [SOLVED] systemd boot fails - Removable on fstab

Nope.

I used to mount these usb sticks from cli


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#3 2012-08-22 09:19:06

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] systemd boot fails - Removable on fstab

To quick for me: I misread your post...

Try commenting them out; they should be managed when you plug them in.


#edit: or you can write a .mount file to manage them with the various options you have listed currently in fstab.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#4 2012-08-22 10:22:32

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: [SOLVED] systemd boot fails - Removable on fstab

I have already commented out the removable media from my fstab.
I know and understand how to mount them, so there is no problem there.

My question is, why systemd fails to boot and not timeout when trying to mount them.
They arent on the pc at the moment, so systemd should timeout and continue to boot.

Can be a bug on systemd or something like that ?


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#5 2012-08-22 11:12:28

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] systemd boot fails - Removable on fstab

The emergency mode probably doesn't work because of https://bugs.archlinux.org/task/28550

add "noauto" to your fstab options. "x-systemd.automount" may also make sense in your usecase (see wiki).

Offline

#6 2012-08-22 11:37:12

thisoldman
Member
From: Pittsburgh
Registered: 2009-04-25
Posts: 1,172

Re: [SOLVED] systemd boot fails - Removable on fstab

The other mount option to use for fstab is 'nofail'.

'noauto' means the drive must be mounted explicitly by user or root.  The command 'mount -a' won't mount the drive and it won't be mounted at boot.

'nofail' means no errors will be reported if mounting fails.  'mount -a' will mount the drive (and 'noauto is not used) if the drive is connected and powered but won't complain if the drive is absent.  The same holds for mounting at boot – the boot sequence won't stall because the drive isn't there.

Offline

#7 2012-08-22 11:44:03

agapito
Member
From: Who cares.
Registered: 2008-11-13
Posts: 678

Re: [SOLVED] systemd boot fails - Removable on fstab

I had a similar problem last week.

https://bbs.archlinux.org/viewtopic.php?id=147266

I guess my solution was not the best...


Excuse my poor English.

Offline

#8 2012-08-22 14:10:18

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: [SOLVED] systemd boot fails - Removable on fstab

Just duplicated to another PC

@agapito
same problem dude


an archlinux developer should check this and perhaps open a bug report to systemd.

IF UUID entries exist in /etc/fstab and there are not present, archlinux boot process stop.


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#9 2012-08-22 23:06:30

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [SOLVED] systemd boot fails - Removable on fstab

'nofail' and 'noauto' needed if you want systemd to ignore these. /etc/fstab is not the place to add removable media.

Last edited by falconindy (2012-08-22 23:06:45)

Offline

#10 2012-08-23 05:02:01

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: [SOLVED] systemd boot fails - Removable on fstab

Nothing is needed to be done to fstab file !

it shouldnt
it mustnt

with the heck i must edit my fstab cause systemd doesnt have a proper function to timeout when there are devices that are not present at boot time !!!

That dont even make sense.

Thank you all for your answers but PLZ ... try to focus on the actual problem that systemd is failing to boot and not to fstab !

btw from my first post i 've already mentioned that i commented out these entries just to boot with systemd.


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#11 2012-08-23 11:25:56

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] systemd boot fails - Removable on fstab

ebal wrote:

Nothing is needed to be done to fstab file !

it shouldnt
it mustnt

with the heck i must edit my fstab cause systemd doesnt have a proper function to timeout when there are devices that are not present at boot time !!!

That dont even make sense.

Thank you all for your answers but PLZ ... try to focus on the actual problem that systemd is failing to boot and not to fstab !

btw from my first post i 've already mentioned that i commented out these entries just to boot with systemd.

what is the problem with using nofail or noauto,x-systemd.automount? systemd does the right thing here, it tries to mount the device on boot and waits for it - it's just that the timeout is very long (afaik 90 seconds).

the only reason this worked with initscripts is that afaik initscripts just tries to mount the device and won't wait for it if it isn't there, but instead just fails immediately. While this worked, it was still the wrong approach. You should have added noauto or nofail in the first place.

Offline

#12 2012-08-23 11:37:44

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: [SOLVED] systemd boot fails - Removable on fstab

There is no problem at all, adding nofail or noauto on fstab.
There is no problem with a very long timeout also.

The problem is that systemd fails to boot if there are UUIDs in fstab from devices that are not present (without nofail or noauto).
From my point of view, it should failed to mount them (after timeout) and continue to boot properly.

"Dependency failed " isnt the right approach cause none of the system isnt depend on mount points.


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#13 2012-08-23 11:46:27

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] systemd boot fails - Removable on fstab

ebal wrote:

The problem is that systemd fails to boot if there are UUIDs in fstab from devices that are not present (without nofail or noauto).
From my point of view, it should failed to mount them (after timeout) and continue to boot properly.

In general, this is a failed dependency and therefore you are dropped to emergency (which afaik is what is supposed to happen) - the problem is that currently emergency doesn't work because of a missing binary that is soon to be merged into util-linux (sulogin). If you were dropped to emergency, you should be able to fix fstab and boot up.

Timing out and just continue booting would imho be wrong here. Your fstab is broken because you didn't specify noauto/nofail, so you should fix it (in emergency mode).

Offline

#14 2012-08-23 11:52:36

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: [SOLVED] systemd boot fails - Removable on fstab

@65kid

you have a point there ... but that means that boot process depends on every entry of fstab.
It should be a flag (or something) that mount points under /media should be ignored of this dependency

thanks for your replies


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#15 2012-08-23 12:02:13

65kid
Member
From: Germany
Registered: 2011-01-26
Posts: 663

Re: [SOLVED] systemd boot fails - Removable on fstab

ebal wrote:

@65kid

you have a point there ... but that means that boot process depends on every entry of fstab.
It should be a flag (or something) that mount points under /media should be ignored of this dependency

the flag is noauto or nofail big_smile
btw, afaik /media will disappear soon. it was used by udisks, but udisks2 uses /run/media/$user . I think static hard drives should be mounted to /mnt/<whatever>/ now.

Another good reason why not to continue booting is better: imagine you have your system on a small SSD and a big hard drive for your files which is mounted to /mnt/data/. Now you boot and the hard drive failed to mount but you might not even have noticed it. Then you write data to /mnt/data/, thinking you are writing to your big hard drive, while actually filling up your SSD.

Offline

#16 2012-08-23 21:19:13

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,152

Re: [SOLVED] systemd boot fails - Removable on fstab

I hope it doesn't disappear too soon as KDE still requires udisks rather than udisks2...

Question: is either nofail or noauto sufficient to avoid the boot failure? Or are both required? I currently use just nofail which makes init complain but doesn't prevent booting.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#17 2012-08-23 21:47:56

progandy
Member
Registered: 2012-05-17
Posts: 5,268

Re: [SOLVED] systemd boot fails - Removable on fstab

65kid wrote:

In general, this is a failed dependency and therefore you are dropped to emergency (which afaik is what is supposed to happen) - the problem is that currently emergency doesn't work because of a missing binary that is soon to be merged into util-linux (sulogin). If you were dropped to emergency, you should be able to fix fstab and boot up.

There are some init-tools which are missing. They are currently available as systemd-sysvinit in the AUR. For a flawless systemd experience you'll need systemd, systemd-sysvcompat (for user locale and a few symlinks) and systemd-syvinit for some missing tools like sulogin, and pidof. (and the great 'archlinux' manpage)

Last edited by progandy (2012-08-23 21:49:27)


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#18 2012-08-24 06:43:30

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: [SOLVED] systemd boot fails - Removable on fstab

I have to admit that i was wrongly about this.

nofail is the right approach.

thanks 65kid for your posts (and for being patient).


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

#19 2012-10-28 17:56:32

nous
Member
From: Across the Universe
Registered: 2006-08-18
Posts: 323
Website

Re: [SOLVED] systemd boot fails - Removable on fstab

The "correct" approach systemd-wise is to append 'noauto,x-systemd.automount' to your device's mount options. It also works with fixed disks/partitions too: systemd mounts them at first access instead at boot.

Offline

Board footer

Powered by FluxBB