Live boot 3

MintPup edited this page Jan 7, 2016 · 5 revisions

DebianDog live-boot-3:

Encrypted save file or save partition supported.

Never use the same live folder name for more DebianDog frugal install on different partitions. Use different folder name for more DebianDog frugal install. You will find information and example boot code at the end of this post.

If you are not familiar with Debian live-boot-v3 (Debian Wheezy, Jessie Live CD) do not use this method. It seems more complicated that the other 2 methods but it also has advantages like persistence for only one or more folders instead full persistence.

Boot with initrd.img created with initramfs-tools-v3.×.
Or Debian-Live-Wheezy(Jessie) boot and save file options.

To save changes you need to create save file with name persistence (or ext partition with label persistence) + creating persistence.conf file inside this save file or save partition.

The easiest way to test this save file option is to download this archive with 1Gb persistence save file example with persistence.conf file for full persistence included. Just extract it on top of a partition:

Add persistence in kernel boot line otherwise no save file will be used.

Example boot code after extracting /live folder from the iso on top of sda1.

title DebianDog Wheezy live-boot-3x (sda1)
root (hd0,0) 
kernel /live/vmlinuz1 boot=live config persistence swapon rw-basemount quickreboot noeject
initrd /live/initrd.img

Read more about live-boot-3x code options here.

Thanks to dzz from Refracta forum and his initrd patch we can use encrypted save file or partition even on the same partition where /live folder is located (boot partition). The patch triggers boot code parameter rw-basemount. The standard boot script live is replaced with a patched version from /opt/bin/special/patch-live-initrd/files/scripts (included in DebianDog-Jwm version iso).
The patch also fixes the swapon (or swap) boot parameter for live-boot-3 and swapon on boot works.
The patch is added only in DebianDog-Squeeze and Wheezy. In DebianDog-Jessie and SID this patch is not included since the problem is fixed and adding rw-basemount is not needed (it is not a problem to add rw-basemount booting DebianDog-Jessie and SID but it does nothing).

Example boot code for (sda1) using encrypted save file inside /live folder:

title DebianDog Wheezy live-boot-3 Persistence Encrypted 
root (hd0,0)
kernel /live/vmlinuz1 boot=live config swapon noeject quickreboot rw-basemount persistence persistence-path=/live/ persistence-encryption=none,luks 
initrd /live/initrd.img

rw-basemount (or basemountmode=rw,noatime) mounts the boot partition read and write.
persistence-path=/live/ – the path where persistence save file is located (/live/persistence in this example)
persistence-encryption=none,luks – the system will search fo Luks encrypted or no-encrypted save file or save partition (or save file located inside encrypted partition).

Creating save file from command line:

dd if=/dev/null of=/path-to/persistence bs=1M seek=2000 # for 2GB save file
mkfs.ext3 -F /path-to/persistence

But you need to create persistence.conf file with this content for full peristence. Note file persistence.conf needs to end with a new empty line or persistence won’t work (thanks for the tip, Step):

/ union

Then copy the persistence.conf file inside persistence save file:

mkdir /mntpt
mount -o loop /path-to/persistence /mntpt
cp /path-to/persistence.conf /mntpt
umount /mntpt
rmdir /mntpt

More information about the content options in persistence.conf file here.

You can setup more than one live-boot-3 DebianDog frugal install in different folder names the same way as in live-boot-2

/etc/fstab – if you like to edit this file manually adding mount points remove [b]swapon[/b] option from boot code. Otherwise it will create new empty /etc/fstab on boot or only with swap partition line if swap partition is available. If you do it you can still swapon partition on boot by creating symlink /opt/bin/mount-swap in /root/Startup:

ln -sf /opt/bin/mount-swap /root/Startup

More information about this you can read here and here.


Examples for several DebianDog frugal install on different partitions and different save files (using live-media-path= and persistence-path=):

title DebianDog live-boot-3 Persistence from /DD-1 folder on sda1
root (hd0,0)
kernel /DD-1/vmlinuz1 boot=live config swapon noeject quickreboot rw-basemount live-media-path=DD-1/ persistence persistence-path=DD-1/
initrd /DD-1/initrd.img
title DebianDog live-boot-3 Persistence from /DD-2 folder on sda2
root (hd0,1)
kernel /DD-2/vmlinuz1 boot=live config swapon noeject quickreboot rw-basemount live-media-path=DD-2/ persistence persistence-path=DD-2/
initrd /DD-2/initrd.img
title DebianDog live-boot-3 Persistence from /DD-3 folder on sda3
root (hd0,2)
kernel /DD-3/vmlinuz1 boot=live config swapon noeject quickreboot rw-basemount live-media-path=DD-3/ persistence persistence-path=DD-3/
initrd /DD-3/initrd.img
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.