Kali linux revealed 1st edition

Page 271

fi cat >>isolinux/live.cfg <<END label live-demo menu label ^Live USB with Demo Data linux /live/vmlinuz initrd /live/initrd.img append boot=live username=root hostname=kali persistence-label=demo persistence label live-work menu label ^Live USB with Work Data linux /live/vmlinuz initrd /live/initrd.img append boot=live username=root hostname=kali persistence-label=work persistence➥ encryption=luks persistence END

Next, we will build our custom ISO and copy it to the USB key. Then we will create and initialize the two partitions and files ystems that will be used for persistence. The first partition is unencrypted (labeled “demo”), and the second is encrypted (labeled “work”). Assuming /dev/sdb is our USB key and the size of our custom ISO image is 3000 MB, it would look like this: # parted /dev/sdb mkpart primary 3000 MB 55% # parted /dev/sdb mkpart primary 55% 100% # mkfs.ext4 -L demo /dev/sdb3 [...] # mount /dev/sdb3 /mnt # echo ”/ union” >/mnt/persistence.conf # umount /mnt # cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb4 [...] # cryptsetup luksOpen /dev/sdb4 kali_persistence [...] # mkfs.ext4 -L work /dev/mapper/kali_persistence [...] # mount /dev/mapper/kali_persistence /mnt # echo ”/ union” >/mnt/persistence.conf # umount /mnt # cryptsetup luksClose /dev/mapper/kali_persistence

And that’s all. You can now boot the USB key and select from the new boot menu entries as needed!

,BMJ -JOVY 3FWFBMFE


Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.