Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Update init for systemd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
cmdic
n00b
n00b


Joined: 06 Apr 2012
Posts: 27

PostPosted: Sat Aug 24, 2013 7:13 pm    Post subject: Update init for systemd Reply with quote

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
View user's profile Send private message
cmdic
n00b
n00b


Joined: 06 Apr 2012
Posts: 27

PostPosted: Thu Aug 29, 2013 10:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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