View previous topic :: View next topic |
Author |
Message |
cmdic n00b
Joined: 06 Apr 2012 Posts: 27
|
Posted: Sat Aug 24, 2013 7:13 pm Post subject: Update init for systemd |
|
|
Hello,
I am trying to install systemd, but I don't know how to exactly change my init script.
I am currently using:
Code: | #!/bin/sh
mount -t proc none /proc
CMDLINE ='cat /proc/cmdline'
mount -t sysfs none /sys
sleep 3
#rescue function
rescue_shell() {
echo "Something went wrong. Dropping you to a shell."
busybox --install -s
exec /bin/sh
}
#no qwerty
loadkmap < /etc/kmap-de
#dm-crypt
/bin/cryptsetup luksOpen /dev/sda2 vault || rescue_shell
#lvm
/bin/lvm vgchange -ay vg || rescue_shell
#root filesystem
mount -r /dev/mapper/vg-root /newroot || rescue_shell
#swapon /dev/mapper/vg-swap || rescue_shell
#mount -r /dev/sda1 /boot || rescue_shell
#unmount pseudo FS
umount /sys
umount /proc
#root switch
exec /bin/busybox switch_root /newroot /sbin/init ${CMDLINE}
|
How do I have to change the last line in order to work with systemd
I found this on the web:
http://gentoo-en.vfose.ru/wiki/Initramfs#Systemd
But I don't want to do try and error right now :S
Hope someon can help
cmdic |
|
Back to top |
|
|
cmdic n00b
Joined: 06 Apr 2012 Posts: 27
|
Posted: Thu Aug 29, 2013 10:43 pm Post subject: |
|
|
the solution was:
changing this line:
Code: | exec /bin/busybox switch_root /newroot /sbin/init ${CMDLINE} |
to this:
Code: | exec switch_root /newroot /bin/systemd |
|
|
Back to top |
|
|
|