* [gentoo-user] difficulties with lvm2+systemd+grub2
@ 2014-11-11 20:56 99% Michael Mair-Keimberger
0 siblings, 0 replies; 1+ results
From: Michael Mair-Keimberger @ 2014-11-11 20:56 UTC (permalink / raw
To: gentoo user mailing list
[-- Attachment #1.1: Type: text/plain, Size: 3100 bytes --]
Hi List,
Today I've started to play around with systemd but so far I couldn't get
it to boot. I've followed the how to from the gentoo wiki [1], but I
stuck somehow.
My configuration:
rootfs is on lvm2 (no encryption or raid). I just use it for being able
creating snapshot/backups of the running system.
Grub is on /dev/sda2 which is a simple ext2 partition with a custom
grub.cfg. A Grub entry looks like that:
###
menuentry 'gentoo amd64 gnome' {
linux /gentoo-3.16.5-n lvm=gentoo_amd64_gnome
initrd /initrd.cpio.gz
}
###
Don't get confused about the "lvm" flag. This just get passed to my very
simple custom initramfs which looks like this:
###
#!/bin/busybox sh
cmdline() {
local value
value=" $(cat /proc/cmdline) "
value="${value##* $1=}"
value="${value%% *}"
[ "$value" != "" ] && echo "$value"
}
# Mount the /proc and /sys filesystems.
mount -t proc none /proc
mount -t sysfs none /sys
mount -t devtmpfs none /dev
lvm vgscan
lvm vgchange -ay vg0
lvm vgscan --mknodes
# Mount the root filesystem.
mount -o ro /dev/mapper/vg0-$(cmdline lvm) /mnt/root
# Clean up.
umount /proc
umount /sys
umount /dev
# Boot the real thing.
exec switch_root /mnt/root /sbin/init
###
So far this works great for me. However, with systemd I had some
difficulties how to correctly configure the system and grub2 in order to
boot with systemd.
This is what i did so far:
For systemd i've created a new initramfs with genkernel and changed the
grub config like the following entry:
###
menuentry 'gentoo amd64 gnome systemd' {
linux /gentoo-3.16.5-n root=UUID=1eb94a2b-40d7-4556-9102-0320efd04adc init=/usr/lib/systemd/systemd
initrd /initramfs-genkernel-x86_64-3.16.5-gentoo
}
###
Systemd installation went without problems (it's a base system without
any wm's installed atm), but even though the grub2 changes were quite
easy and I've used the genkernel initramfs instead of mine I still get a
kernel panic on boot (have a look at the attached picture).
I've also checked the kernel config for having the required systemd
configurations enabled.
Anyone has some ideas what might be wrong?
Furthermore I've also have some questions about lvm2+systemd. Hope
someone can give me some answers :)
First of all, with systemd installed I can't install lvm2 with the
static use flag anymore, which is mandatory for being able using it for
a initramfs. Why isn't that possible? How can I use the lvm binaries for
my initramfs?
This lead me to my second question. At the wiki, the only way to create
an initramfs for systemd was with genkernel (genkernel --udev --lvm).
While the command itself is pretty useless (it's `genkernel --udev --lvm
initramfs` if you want to create the initramfs -> is this a bug??) i
also would like to use my own initramfs.
What changes do i have to make in my own initramfs for being able
booting systemd from it?
Thx :)
[1] http://wiki.gentoo.org/wiki/Systemd
--
greetings
Michael Mair-Keimberger
[-- Attachment #1.2: systemd.jpg --]
[-- Type: image/jpeg, Size: 581501 bytes --]
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [relevance 99%]
Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-11-11 20:56 99% [gentoo-user] difficulties with lvm2+systemd+grub2 Michael Mair-Keimberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox