Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dracut failed, droped to shell how to finish booting?
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
turtles
Veteran
Veteran


Joined: 31 Dec 2004
Posts: 1681

PostPosted: Sun Oct 27, 2024 6:17 am    Post subject: dracut failed, droped to shell how to finish booting? Reply with quote

Greetings Gentooers
I am setting up a new Gentoo system (on bare metal) and usually make a initrd by hand for encrypted root but its been quite a few years and hand rolling was always tedious compiling stuff with static-libs then recompiling without so figured I'd try out Dracut.
This install has a encrypted root inside an LVM logical volume. I know the volume and encrypted root are good because I can mount them from the live USB. And I do realize this is the reverse of the Gentoo way of putting lvm in the encrypted drive, but this is just a router appliance and I digress.
Things have not gone very smoothly with Dracut, at first I assumed dracut would copy over the needed kernel modules but it does not seem to do that.
Also it throws allot of systemd-cryptsetup not found errors even after I configured it
Code:
hostonly="yes"
# Equivalent to -a "module"
add_dracutmodules+=" lvm crypt " # Note leading and trailing spaces
omit_drivers+=" systemd systemd-cryptsetup bluetooth "

After I reconfigured the kernel like I used to with all the Lvm and Crypt stuff BLK_DEV_CRYPTOLOOP CONFIG_DM_CRYPT ... compiled into the kernel (not as modules but compiled in) Dracut was getting closer telling me my /dev/mapper/gentoo_root does not exist.
After somehow dropping to the Dracut rescue shell (which is apparently not busybox?) I can poke around and see something named my /dev/mappter/gentoo_root something slightly different, it prefixed the logical volume name.
So I was finally able to manually unlock my root partition and mount it under /sysroot
Poking around I could see it mounted and my files were there.
I then tried
Code:
exec switch_root /sysroot /sbin/init
with no dice.
I possibly forgot to unmount proc sys and dev
So my question, how to you , finish booting from a Dracut rescue shell?
Should
Code:
exec switch_root /sysroot /sbin/init
work?
Thanks in advance

Docs I have used now and in the past:
https://wiki.gentoo.org/wiki/Dracut
https://wiki.gentoo.org/wiki/Dm-crypt
https://wiki.gentoo.org/wiki/LVM
https://wiki.gentoo.org/wiki/Custom_Initramfs
_________________
Donate to Gentoo
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