Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
initrd [2011/06/05 17:06] admin |
initrd [2012/06/12 10:49] admin |
||
---|---|---|---|
Zeile 14: | Zeile 14: | ||
gzip new-initrd.cpio | gzip new-initrd.cpio | ||
mv new-initrd.cpio.gz new-initrd.img | mv new-initrd.cpio.gz new-initrd.img | ||
+ | </code> | ||
+ | |||
+ | |||
+ | <code bash> | ||
+ | INITRD=boot/i386/loader/initrd | ||
+ | echo "modifiziere initrd" | ||
+ | echo "auspacken..." | ||
+ | gunzip <$INITRD >$INITRD.uncomp | ||
+ | echo "initall.key aus initrd raus....." | ||
+ | cpio -i -F $INITRD.uncomp installkey.gpg | ||
+ | echo "Schlüssel exportieren" | ||
+ | gpg --export -u $KEY_ID > gpg-$KEY_ID.gpg | ||
+ | gpg --export -a -u $KEY_ID > gpg-pubkey-$KEY_ID.asc | ||
+ | echo "Schlüssel in initrd" | ||
+ | echo "gpg-$KEY_ID.gpg" | cpio -o -H newc -A -F $INITRD.uncomp | ||
+ | echo "install.key erweitern" | ||
+ | gpg -u ds@marco.de --export >> install.key | ||
+ | echo "install.key wieder in initrd" | ||
+ | echo "installkey.gpg" | cpio -o -H newc -A -F $INITRD.uncomp | ||
+ | echo "komprimieren" | ||
+ | gzip --best <$INITRD.uncomp >$INITRD | ||
+ | echo "Rest löschen" | ||
+ | rm $INITRD.uncomp gpg-$KEY_ID.gpg installkey.gpg | ||
+ | </code> | ||
+ | |||
+ | |||
+ | <code bash> | ||
+ | > INITRD_MODULES | ||
+ | > MODULES_LOADED_ON_BOOT | ||
+ | > | ||
+ | > /etc/sysconfig/kernel | ||
+ | > | ||
+ | > Und das ganze booted man dann mit tftp/ftp. | ||
+ | |||
+ | Bin nach /usr/src/linux/Documentation/filesystems/nfs/nfsroot.txt | ||
+ | vorgegangen..... | ||
+ | |||
+ | Hab aber dann im vdr-portal noch ein Thema gefunden. | ||
+ | Da geht (fast) alles über die Initrd. | ||
+ | |||
+ | Also passende initrd bauen mit | ||
+ | /sbin/mkinitrd -D eth0 -f nfs -d nfsserver:/tftpboot/rootdir -B | ||
+ | |||
+ | 11.4 hat hier einen Bug, die initrd muss von Hand angepasst werden: | ||
+ | mkdir /tmp/initrd-new | ||
+ | zcat /boot/initrd... |cpio -iv | ||
+ | cd /tmp/initrd-new | ||
+ | cp /etc/protocols etc/ | ||
+ | cp /etc/netconfig etc/ | ||
+ | find | cpio -o -H newc | gzip > ../initrd.new | ||
+ | |||
+ | Diese zusammen mit dem Kernel per pxe booten: | ||
+ | label rescue2 | ||
+ | kernel nfsroot_boot/linux | ||
+ | append initrd=nfsroot_boot/initrd.new ramdisk_size=65536 | ||
+ | splash=silent showopts | ||
</code> | </code> |