Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

Update init for systemd

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
cmdic
n00b
n00b
Posts: 27
Joined: Fri Apr 06, 2012 8:19 pm

Update init for systemd

  • Quote

Post by cmdic » Sat Aug 24, 2013 7:13 pm

Hello,

I am trying to install systemd, but I don't know how to exactly change my init script.

I am currently using:

Code: Select all

#!/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
Top
cmdic
n00b
n00b
Posts: 27
Joined: Fri Apr 06, 2012 8:19 pm

  • Quote

Post by cmdic » Thu Aug 29, 2013 10:43 pm

the solution was:

changing this line:

Code: Select all

exec /bin/busybox switch_root /newroot /sbin/init ${CMDLINE} 
to this:

Code: Select all

exec switch_root /newroot /bin/systemd
Top
Post Reply

2 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic