Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Dracut systemd initramfs verschlüsseltes Root FS
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
forrestfunk81
Guru
Guru


Joined: 07 Feb 2006
Posts: 565
Location: münchen.de

PostPosted: Sat Apr 19, 2014 6:04 pm    Post subject: [Solved] Dracut systemd initramfs verschlüsseltes Root FS Reply with quote

Hallo zusammen,

Seit dem Wechsel zu Systemd letzten August habe ich kein verschlüsseltes Root mehr. Jetzt will ich auf einer Platte eine Kopie meines aktuellen Systems mit verschlüsseltem Root FS anlegen. Partition ist erstellt, cryptluks format und mkbtrfs und Co durchgeführt, System mittels rsync kopiert und nötige Änderungen sind vorgenommen.

Also ran ans initramfs. Da ein selbsterstelltes oldschool initramfs mit init und switch root auf systemd bei den letzten Versuchen immer Probleme machte, habe ich mich jetzt für Systemd auch im initramfs entschieden. Wie ich das initramfs erstelle ist mir eigentlich egal. Ich habs mal mit dracut versucht. Da das neue verschlüsselte Root sda2 nicht bootet ohne initramfs, will ich dieses aus dem alten nicht verschlüsselten Root sdb1 heraus erstellen.

Code:
add_dracutmodules+="crypt systemd btrfs dmraid"


Code:
title Gentoo Linux (sda / current + systemd)
root (hd0,0)
kernel /boot/vmlinuz quiet root=/dev/sda2 video=uvesafb:1280x1024-32,mtrr:3,ywrap console=tty1 init=/usr/lib/systemd/systemd rd.luks=1 rd.lvm=0 rd.md=0 rd.luks.allow-discards rd.luks.uuid=d556c5ff-c2f3-4b28-974b-7d085f75389b KEYMAP=de
initrd /boot/initramfs-3.12.16-gentoo.img


Fehlermeldung beim Booten:
Code:

dracut-initqueue[220]: Failed to start systemd-cryptsetup@luks\x2dd556c5ff\x2dc2f3\blabla\blabla.service: unit systemd-cryptsetup@luks\blablabla\bla.service failed to load: no such file or directory


In der Notfall Shell innerhalb des initramfs ist cryptsetup vorhanden, ich kann sda2 dort entschlüsseln und mounten, aber es kommt keine automatische Passwortabfrage, kein automatisches Mount.

Dracut baut das initramfs wohl so, dass es das aktuelle root booten kann. Was bei mir so nicht gewollt ist. Ich möchte ja aus dem System sdb1 heraus ein initramfs für das verschlüsselte sda2 erstellen. Ich habe auch schon versucht, /etc/fstab/ so zu modifizieren, dass es so aussieht, wie wenn ich das neue root sda2 gebootet hätte und habe dann dracut mit dem Parameter --fstab ausgeführt. Das führt allerdings zum gleichen Fehler.

Hat jemand einen Tipp für mich, wie ich ein funktionierendes initramfs mit systemd für ein verschlüsseltes Root FS erstellen kann? Ob mit Dracut oder was anderem ist mir egal.
_________________
# cd /pub/
# more beer


Last edited by forrestfunk81 on Wed May 14, 2014 5:48 pm; edited 1 time in total
Back to top
View user's profile Send private message
qwob
n00b
n00b


Joined: 29 Apr 2014
Posts: 1

PostPosted: Tue Apr 29, 2014 2:32 pm    Post subject: Reply with quote

Hi forrestfunk81

falls das Problem noch aktuell ist kannst du mal versuchen in /etc/dracut.conf hostonly=no zu setzen. Dann erzeugt
dracut ein generisches initramfs dass laut manpage in der lage sein soll von einer veränderten root partition zu booten.
Back to top
View user's profile Send private message
forrestfunk81
Guru
Guru


Joined: 07 Feb 2006
Posts: 565
Location: münchen.de

PostPosted: Sun May 11, 2014 9:20 am    Post subject: Reply with quote

Hi qwob,

Danke für den Hiweis, es hat aber leider auch nix geholfen. Ich bekomme weiterhin die gleiche Fehlermeldung:
Code:
dracut-initqueue[220]: Failed to start systemd-cryptsetup@luks\x2dd556c5ff\x2dc2f3\blabla\blabla.service: unit systemd-cryptsetup@luks\blablabla\bla.service failed to load: no such file or directory

(ohne 'bla' aber mit kryptischen Zeichenfolgen, auf Bedarf kann ichs auch komplett abtippen)
_________________
# cd /pub/
# more beer
Back to top
View user's profile Send private message
forrestfunk81
Guru
Guru


Joined: 07 Feb 2006
Posts: 565
Location: münchen.de

PostPosted: Wed May 14, 2014 5:48 pm    Post subject: Reply with quote

Mit Dracut und systemd innerhalb des initramfs hab ichs leider nicht hinbekommen. Deshalb genkernel mit generiertem init Skript. Das funktioniert auch wunderbar, bisher traten keine Probleme auf. Wahrscheinlich lagen die Probleme von letztem Jahr an meinem selbsterstelltem initramfs.
--> solved
_________________
# cd /pub/
# more beer
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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