Sat Aug 24, 2013 8:10 pm
cryptsetup luksOpen /dev/sdb2 sdb2_crypt
Sun Aug 25, 2013 9:07 pm
Mon Aug 26, 2013 3:24 am
# add entry for root filesystem
if [[ $use_uuid = yes ]]; then
install_part="$(blkid -s UUID $install_dev | awk '{ print $2 }' | sed 's/\"//g')"
elif [[ $use_labels = yes ]]; then
rootfslabel=$(yad --entry --title="Filesystem Label" --text="Enter a disk label for $install_dev")
e2label $install_dev $rootfslabel
install_part="LABEL=$rootfslabel"
else
install_part="$install_dev"
fi
# add entry for root filesystem
if ! [[ $encrypt_os = "yes" ]]; then
if [[ $use_uuid = yes ]]; then
install_part="$(blkid -s UUID $install_dev | awk '{ print $2 }' | sed 's/\"//g')"
elif [[ $use_labels = yes ]]; then
rootfslabel=$(yad --entry --title="Filesystem Label" --text="Enter a disk label for $install_dev")
e2label $install_dev $rootfslabel
install_part="LABEL=$rootfslabel"
else
install_part="$install_dev"
fi
fi
mount /dev/sdb1 /boot
update-initramfs -u
# add entry for /home to fstab if needed
if ! [[ -z $home_dev ]] ; then
if ! [[ $encrypt_home = "yes" ]] then
if [[ $use_uuid = yes ]]; then
home_part="$(blkid -s UUID $home_dev | awk '{ print $2 }' | sed 's/\"//g')"
elif [[ $use_labels = yes ]]; then
homefslabel=$(yad --entry --title="Filesystem Label" --text="Enter a disk label for $home_dev")
e2label $home_dev $homefslabel
home_part="LABEL=$homefslabel"
else
home_part="$home_dev"
fi
fi
Mon Aug 26, 2013 6:07 pm
I: update-initramfs is disabled (live system is running on read-only media).
Tue Aug 27, 2013 1:54 pm
# Run update-initramfs to include dm-mod if using encryption
if [[ $encrypt_os = yes ]] || [[ $encrypt_home = yes ]] ; then
# chroot /target update-initramfs -u >> "$error_log"
chroot /target /usr/sbin/update-initramfs.orig.initramfs-tools -u >> "$error_log"
fi
# Open and mount the encrypted root partition:
cryptsetup luksOpen /dev/sdXn some-label
mount /dev/sdXn /mnt
# Mount the /boot partition
mount /dev/sdXy /mnt/boot
# Edit /etc/fstab and /etc/crypttab as shown in one of the posts above
# Mount other stuff so the following commands work correctly in chroot
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
# Run the original update-initramfs
chroot /mnt /usr/sbin/update-initramfs.orig.initramfs-tools
# Update the boot menu
chroot /mnt update-grub