mkdir -p initramfs/{dev,proc,sys,mnt,etc,bin,sbin,run}In root directory create executable init script, check my init.txt.
Copy statically linked busybox to the /bin, you can chroot inside initramfs and call:
busybox --install -s /binYou can compile static busybox with (gentoo):
USE="static" emerge busyboxCopy statically linked lvm and cryptosetup to /sbin and now it should work.
Now call:
find . | cpio -H newc -o > ../initramfs.cpiocat ../initramfs.cpio | gzip > ../initramfs.igzAdd new boot menu entry in /etc/grub.d/40_custom:
menuentry "encrypted" {Cryptsetup didn't work while being statically linked with libgcrypt-1.6.1 (causing segmentation fault).
set root='(hd0,1)'
linux /vmlinuz-3.13.6-gentoo root=/dev/sdb6
initrd /initramfs-3.13.6-gentoo
}
Feel free to leave a comment below!
No comments:
Post a Comment