Zasifrovani vsech oddilu (krome boot)



https://help.ubuntu.com/community/FeistyEncryptedRootWithInstaller

podle navodu otestovano i v Ubuntu Gutsy, ale je nutne na sifrovanem oddilu rucne vytvorit adresar v /dev:
mkdir /dev/.static/dev/mapper

vypis prikazu pro copy/paste:
/dev/sda5 = swap
/dev/sda6 = boot
/dev/sda7 = root
v priloze skript "tochroot", ktery pripoji zasifrovany oddil pod live CD - az po chroot do zasifrovaneho oddilu
zkontrolovat pred spustenim!

sudo kate /etc/apt/sources.list
sudo su - && apt-get update && apt-get install mc cryptsetup
for mod in dm_crypt sha256 aes_i586; do modprobe $mod; done
cryptsetup luksOpen /dev/sda7 root

mkdir /target && mount /dev/mapper/root /target
mount /dev/sda6 /target/boot
for dir in proc dev sys; do mount --bind /$dir  /target/$dir; done
cd /dev; MAKEDEV generic

chroot /target
apt-get update && apt-get dist-upgrade
apt-get install cryptsetup mc

Set up /etc/crypttab: 
# <target name> <source device>         <key file>      <options>
swap            /dev/sda5               /dev/random     swap
root            /dev/sda7               none            luks

Edit /etc/fstab and change swap to /dev/mapper/swap (from some UUID-line). 
Create /etc/initramfs-tools/conf.d/cryptroot and add: CRYPTOPTS=target=root,source=/dev/sda7 

Copy over the pre-built cryptroot scripts (ignore other HOWTOs that tell you to create these): 
cp /usr/share/initramfs-tools/hooks/cryptroot /etc/initramfs-tools/hooks/cryptroot
cp /usr/share/initramfs-tools/scripts/local-top/cryptroot /etc/initramfs-tools/scripts/local-top/cryptroot

alias aes to speed performance /etc/modprobe.d/aliases: 
alias aes aes_i586

Edit /boot/grub/menu.lst and remove quiet splash from the defoptions-line: 
# defoptions=

update-grub
update-initramfs -u

Exit the chroot
umount /target/proc && umount /target/dev && umount /target/sys && umount /target/boot && umount /target
reboot.
Last update:
2007-10-01 12:17
Author:
Daniel
Revision:
1.36
Average rating:0 (0 Votes)

You cannot comment on this entry

Chuck Norris has counted to infinity. Twice.