crypssetup und initramfs
Wichtig ist das bootkeyscript
http://www.glasdemokratie.com/feed-archiv/?bdprsslist=3&bdprssarchivedate=2008-02-21 http://www.debian-administration.org/articles/428 http://ubuntuforums.org/showpost.php?p=4365587&postcount=138 http://www.debian-administration.org/articles/428 http://www.debian-administration.org/articles/428 http://www.c3l.de/linux/howto-completly-encrypted-harddisk-including-suspend-to-encrypted-disk-with-ubuntu-6.10-edgy-eft.html http://lists.alioth.debian.org/pipermail/pkg-cryptsetup-devel/2006-March/000260.html http://petaramesh.org/public/arc/projects/cryptsetup/bootkeyscript
https://help.ubuntu.com/community/FeistyEncryptedRootWithInstaller
During the installation I chose the following partitioning scheme:
/boot /dev/hda1 (will not be encrypted) / /dev/hda5 (will be encrypted) /home /dev/hda6 (will be encrypted) swap /dev/hda7 (will be encrypted)
!!! bloederweise cryptroot in vible umbenannt !!!! CRYPTOPTS="target=vible,source=/dev/sda5" # /etc/initramfs-tools/conf.d/cryptroot
Formatting '/root/dumx', fmt=qcow2, size=1024000 kB /usr/bin/qemu -kernel '/mnt/sda5/boot/vmlinuz-2.6.24.3' -append 'init=/bin/sh root=/dev/sda5' -initrd '/mnt/sda5/boot/initrd.img-2.6.24.3' -boot c -snapshot -m 128 -hda '/root/dumx' -cdrom '/dev/cdrom' -net nic,vlan=0 -net user,vlan=0 -localtime & Could not open '/dev/kqemu' - QEMU acceleration layer not activated: No such file or directory qemu: loading initrd (0x36305c bytes) at 0x7c8c000 # Testing external initramfs using the initrd loading mechanism.
qemu -kernel /boot/vmlinuz -initrd test.cpio.gz /dev/zero
When debugging a normal root filesystem, it's nice to be able to boot with "init=/bin/sh". The initramfs equivalent is "rdinit=/bin/sh", and it's just as useful.
http://www.linuxfromscratch.org/lfs/view/stable/
/etc/lvm/lvm.conf
proc /proc proc defaults 0 0 /dev/mapper/vible-root / ext3 defaults,errors=remount-ro 0 1 /dev/sda1 /boot ext3 defaults 0 2 /dev/mapper/vible-home /home ext3 defaults 0 2 /dev/mapper/vible-tmp /tmp ext3 defaults 0 2 /dev/mapper/vible-usr /usr ext3 defaults 0 2 /dev/mapper/vible-var /var ext3 defaults 0 2 /dev/mapper/vible-swap_1 none swap sw 0 0 /dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0 /dev/fd0 /media/floppy0 auto rw,user,noauto 0 0 ~
http://www.mjmwired.net/kernel/Documentation/filesystems/ramfs-rootfs-initramfs.txt
- When switching another root device, initrd would pivot_root and then umount the ramdisk. But initramfs is rootfs: you can neither pivot_root rootfs, nor unmount it. Instead delete everything out of rootfs to free up the space (find -xdev / -exec rm '{}' ';'), overmount rootfs with the new root (cd /newmount; mount --move . /; chroot .), attach stdin/stdout/stderr to the new /dev/console, and exec the new init.
- cpio -i -d -H newc -F initramfs_data.cpio --no-absolute-filenames
The following shell script can create a prebuilt cpio archive you can use in place of the above config file:
#!/bin/sh
# Copyright 2006 Rob Landley <rob@landley.net> and TimeSys Corporation.
# Licensed under GPL version 2
if [ $# -ne 2 ]
then
echo "usage: mkinitramfs directory imagename.cpio.gz"
exit 1
fi
if [ -d "$1" ]
then
echo "creating $2 from $1"
(cd "$1"; find . | cpio -o -H newc | gzip) > "$2"
else
echo "First argument must be a directory"
exit 1
fi
cpio -i -d -H newc -F initramfs_data.cpio --no-absolute-filenames
The following shell script can create a prebuilt cpio archive you can use in place of the above config file:
-- DetlevLengsfeld 2007-09-03 06:15:17
| /Konfiguration mit crypssetup und initramfs /lvmreduce |
Linux/Dateisysteme/Alles über LVM2/Konfiguration mit crypssetup und initramfs (last edited 2009-06-05 18:51:59 by DetlevLengsfeld)