This is an old revision of the document!
kernel=/vmlinuz-<version> [...parameters...] init=/bin/bash
DONE! THAT'S ALL FOLKS! After the target machine finishes booting, the kernel will detect the hardware and immediately drop you into a root shell. Since the system initialization script '/etc/rc.d/rc.sysinit' was bypassed and NOT executed, we need to remount the root file system and make some changes to make the system more usable.:
# mount /proc
You will see an error message complaining that it was already mounted. Ignore it.
mount -o remount,rw /
# cat /etc/fstab
Mount any other needed file systems (Like '/home', '/usr', etc.).
passwd root
adduser -D -u 1000 bad-user passwd bad-user
visudo bad-user ALL=(ALL) ALL
kernel=/vmlinuz-version ro root=LABEL=/ [...other-parameters...] S
enforcing=0
su -
and mount the file systems as needed.
# grub-md5-crypt
and follow the directions.
# ... comments above ... default=0 timeout=5 password --md5 5f3782baec534bae412c27fc0850fc6d spashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu ......
# which sulogin
si::sysinit:/etc/rc.d/rc.sysinit
then you have traditional init.
# System initialization si::sysinit:/etc/rc.d/rc.sysinit ss:S:respawn:/sbin/sulogin # added line
SINGLE=/sbin/sushell
to this:
SINGLE=/sbin/sulogin
start on runlevel S stop on runlevel [!S] console owner script if [ -x /usr/share/recovery-mode/recovery-menu ]; then exec /usr/share/recovery-mode/recovery-menu else exec /sbin/sulogin fi end script [...]
Note: /dev/sdb1 will be used as the test partition, 'private' will be its name.
## Create partition cryptsetup -c aes-xts-plain64 \ --key-size 512 --hash sha512 \ --time 5000 --use-urandom /dev/sdb1 ## open volume onto device mapper cryptsetup open /dev/sdb1 private ## create filesystem mkfs.ext4 /dev/mapper/private ## manually mount encrypted partition # open mapped device cryptsetup --type luks open /dev/sdb1 private # mount encrypted partition mount -t ext4 /dev/mapper/encrypted /mnt/private
In performing this project, the following resources were referenced: