Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
boot failed as systemd's jobs to mount lvm volumes timed out
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
hokiau
n00b
n00b


Joined: 24 Dec 2013
Posts: 18

PostPosted: Thu May 14, 2020 2:00 pm    Post subject: boot failed as systemd's jobs to mount lvm volumes timed out Reply with quote

My gentoo was set up with /, /usr, /var, /home, /opt, /tmp each on a separate LVM volume.
Code:

/dev/sda5      /boot      ext4      noauto,noatime      1 2
/dev/vg/root      /      ext4      defaults      0 1
/dev/vg/usr      /usr      ext4      defaults      0 0
/dev/vg/opt      /opt      ext4      defaults      0 0
/dev/vg/tmp      /tmp      tmpfs      defaults      0 0
/dev/vg/var      /var      ext4      defaults      0 0
/dev/vg/cache      /var/cache   ext4      defaults      0 0
/dev/vg/db      /var/db      ext4      defaults      0 0
/dev/vg/log      /var/log   ext4      defaults      0 0
/dev/vg/vartmp      /var/tmp   tmpfs      defaults      0 0
/dev/vg/home      /home      ext4      defaults      0 2


kernel was
Code:
sys-kernel/gentoo-sources-5.4.38:5.4.38
, compiled with
Code:
sys-kernel/genkernel-4.0.7-r1
. The profile was
Code:
default/linux/amd64/17.1/desktop/gnome/systemd (stable)
. I used
Code:
sys-boot/grub-2.04-r1
to set up booting.

It failed to boot. It tried for 1 min 30s of mounting /var and those directories under /var, /opt, /home, saying "A start job is running for /dev/vg/var".

Code:
journalctl -xb
showed something like this
Code:

-- Subject: A start job for unit dev-vg-var.device has failed
-- Defined-By: systemd
-- Support: https://gentoo.org/support/
--
-- A start job for unit dev-vg-var.device has finished with a failure.
--
-- The job identifier is 21 and the job result is timeout.
May 14 21:53:15 localhost systemd[1]: Dependency failed for /var.
-- Subject: A start job for unit var.mount has failed
-- Defined-By: systemd
-- Support: https://gentoo.org/support/
--
-- A start job for unit var.mount has finished with a failure.
--


Could somebody help?

The strange thing was that if I used genkernel-next to generate the kernel, the system would boot. But the kernel generated by genkernel failed at mounting the lvm volumes.

Thank you for helping!
Back to top
View user's profile Send private message
alamahant
l33t
l33t


Joined: 23 Mar 2019
Posts: 660

PostPosted: Thu May 14, 2020 3:05 pm    Post subject: Reply with quote

Hi,

Do you have an initramfs?
You need an initramfs to boot if your root is on lvm.
Also have you enabled lvm?
Code:

systemctl enable lvm2-monitor.service

:D
Back to top
View user's profile Send private message
hokiau
n00b
n00b


Joined: 24 Dec 2013
Posts: 18

PostPosted: Fri May 15, 2020 2:22 am    Post subject: Reply with quote

Yes,
Code:
lvm2-monitor.service
was enabled.
initramfs was also there. I didn't change anything that genkernel or genkernel-next generated.
Back to top
View user's profile Send private message
AlexJGreen
Tux's lil' helper
Tux's lil' helper


Joined: 19 Sep 2018
Posts: 149

PostPosted: Fri May 15, 2020 12:31 pm    Post subject: Reply with quote

_

Last edited by AlexJGreen on Mon Dec 28, 2020 3:11 am; edited 1 time in total
Back to top
View user's profile Send private message
alamahant
l33t
l33t


Joined: 23 Mar 2019
Posts: 660

PostPosted: Fri May 15, 2020 2:48 pm    Post subject: Reply with quote

Or even better install dracut and use it to create your initramfs
Code:

emerge -av sys-kernel/dracut
dracut /boot/initramfs-<kernel-version>.img <kernel-version>   #### IOR
dracut /boot/initramfs-$(uname -r).img $(uname -r)   #### OR
dracut (--force)
grub-mkconfig -o /boot/grub/grub.cfg


It has been a long time since
Code:

genkernel --lvm --install initramfs

produced a good working initramfs for me(you also need the "dolvm" flag in linux command line in /etc/default/grub).

So i ditched genkernel in favor of dracut instead

:)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum