encrypted rootfs on Slackware 12.0
encrypted rootfs on Slackware 12.0
**WARNING:** The procedure outlined below will destroy all data that is currently stored on the first IDE device /dev/hda. This is not some kind of documentation for dm-crypt on Slackware Linux 12.0, but a real world example. You can read this in addition to README_CRYPT.TXT (http://ftp.gwdg.de/pub/linux/slackwa...ADME_CRYPT.TXT) on your Slackware 12.0 disks (You should also read http://alien.slackbook.org/dokuwiki for latest hints and tips). First copy/rsync your data to a safe place ... I booted my Thinkpad X30 with a USBinstaller (http://www.slackware.com/~alien/tools/usbinstall/12.0/) that worked for me (I failed on booting with the official usbboot method - http://ftp.gwdg.de/pub/linux/slackwa...README_USB.TXT). Than cleaned my harddisc over night with dd after logging in as root (just before setup). Code:
# dd if=/dev/urandom of=/dev/hda Code:
# cfdisk Code:
# fdisk -l /dev/hda Code:
# cryptsetup -s 256 -y luksFormat /dev/hda3 Code:
# cryptsetup -s 256 -y luksFormat /dev/hda4 Code:
# cryptsetup luksOpen /dev/hda3 cryptroot Code:
# cryptsetup luksOpen /dev/hda4 crypthome During setup make sure to install to /dev/mapper/cryptroot rather then to /dev/hda3 (also /dev/mapper/crypthome for /home), but select /dev/hda2 as swap. Don't reboot after setup, but chroot into your new system and edit /etc/fstab and /etc/crypttab accordingly. Code:
# mount -o bind /proc /mnt/proc Code:
# cat /etc/fstab Code:
# cat /etc/crypttab In the README_CRYPT.TXT they say run Code:
# mkinitrd -c -k 2.6.21.5-smp -m ext3 -f ext3 -r cryptroot -C /dev/sda1 -L Code:
# ls -l /boot/vmlinuz Code:
# mkinitrd -c -k 2.6.21.5-smp -m ext3 -f ext3 -r cryptroot -C /dev/hda3 Code:
# cat /etc/lilo.conf Code:
# lilo Code:
# shutdown -r now You get a kernel panic and it seems like you will not be able to boot into your system? With your installation media you will be able to boot the installer and than log in as root. Than do: Code:
# cryptsetup luksOpen /dev/hda3 cryptroot |
Thank you, /y0shi!
|
Quote:
|
All times are GMT -5. The time now is 10:26 PM. |