aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-07-07 10:10:14 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-07-07 10:10:14 -0300
commit37ef96e91ceca43c8e1a71398534bff89d7fa8c1 (patch)
treec946f1516130d9e5c4ac6d5bfa5c42ca509af6c1
parentbb933f4856a40b3f5e85221032a59699d52a065a (diff)
downloadbootless-37ef96e91ceca43c8e1a71398534bff89d7fa8c1.tar.gz
bootless-37ef96e91ceca43c8e1a71398534bff89d7fa8c1.tar.bz2
Updates tutorial, moving examples to custom.cfg
-rw-r--r--templates/custom.cfg64
-rw-r--r--tutorial.mdwn63
2 files changed, 67 insertions, 60 deletions
diff --git a/templates/custom.cfg b/templates/custom.cfg
index ffb1401..088ac0c 100644
--- a/templates/custom.cfg
+++ b/templates/custom.cfg
@@ -5,9 +5,27 @@ set menu_color_normal=white/blue
set menu_color_highlight=yellow/red
#
-# Example: imagens stored in the USB stick: just put your images under custom/debian/images.
+# Example: Darkstar with preloaded images:
#
-menuentry 'Example: Darkstar' {
+# - Images stored in the USB stick.
+# - Place your images under custom/debian/images.
+#
+menuentry 'Example: Darkstar using preloaded images' {
+ # This loads the kernel and initramfs using images preloaded into the USB stick.
+ echo "Loading ${volume}..."
+ linux /boot/custom/debian/vmlinuz-3.16.0-4-amd64 root=/dev/mapper/root cryptopts=target=root,source=/dev/mapper/darkstar-root ro quiet
+ echo 'Loading initial ramdisk ...'
+ initrd /boot/custom/debian/initrd.img-3.16.0-4-amd64
+}
+
+#
+# Example: Darkstar with preloaded images and bootimg function:
+#
+# - Images stored in the USB stick.
+# - Place your images under custom/debian/images.
+# - Boots using bootimg function.
+#
+menuentry 'Example: Darkstar using preloaded images and bootimg function' {
set volume=/dev/sda5
set version=3.16.0-4-amd64
set target=sda5_crypt
@@ -17,16 +35,47 @@ menuentry 'Example: Darkstar' {
}
#
-# Example: Full Disk Encryption: images are loaded from encrypted partition.
+# Example: Darkstar with Full Disk Encryption:
+#
+# - Images are loaded directly from encrypted partition.
#
-menuentry 'Example: Darkstar FDE' {
+menuentry 'Example: Darkstar usin Full Disk Encryption' {
+ # Loads luks and lvm modules so you can access kernel
+ # and initrd from inside your encrypted OS!
+ insmod luks
+ insmod lvm
+
+ # This opens the encrypted volume /dev/mapper/darkstar-root
+ # and sets it as the root in the grub shell.
+ cryptomount lvm/darkstar-root
+ set root=(crypto0)
+
+ # This loads the kernel and initramfs
+ echo "Loading ${volume}..."
+ linux /boot/vmlinuz-3.16.0-4-amd64 root=/dev/mapper/root cryptopts=target=root,source=/dev/mapper/darkstar-root ro quiet
+ echo 'Loading initial ramdisk ...'
+ initrd /boot/initrd.img-3.16.0-4-amd64
+}
+
+#
+# Example: Darkstar with Full Disk Encryption and bootfde function:
+#
+# - Images are loaded directly from encrypted partition.
+# - Boots using bootfde function.
+#
+menuentry 'Example: Darkstar usin Full Disk Encryption and bootfe function' {
set volume=darkstar
set version=3.16.0-4-amd64
bootfde ${volume} ${version}
}
#
-# Example: Debian Jessie default whole encrypted install with preloaded images.
+# Example: Debian Jessie default whole encrypted install with preloaded images:
+#
+# - Boots a Debian system that was installed using LVM atop LUKS (default crypt install).
+# - Images stored in the USB stick.
+# - Place your images under custom/debian/images.
+# - Boots using bootimg function.
#
menuentry 'Custom: Jessie with pre-loaded images' {
set volume=UUID=00000000-0000-0000-0000-000000000000
@@ -38,7 +87,10 @@ menuentry 'Custom: Jessie with pre-loaded images' {
}
#
-# Example: Debian Jessie default whole encrypted install with Full Disk Encryption.
+# Example: Debian Jessie default whole encrypted install with Full Disk Encryption:
+#
+# - Boots a Debian system that was installed using LVM atop LUKS (default crypt install).
+# - Images are loaded directly from encrypted partition.
#
menuentry 'Custom: Jessie with Full Disk Encryption' {
set volume=00000000000000000000000000000000
diff --git a/tutorial.mdwn b/tutorial.mdwn
index 89a49b3..a504586 100644
--- a/tutorial.mdwn
+++ b/tutorial.mdwn
@@ -9,63 +9,19 @@ Create basic folder structure
wget https://git.fluxo.info/bootless/plain/templates/grub.cfg -O bootless/boot/grub/grub.cfg
wget https://git.fluxo.info/bootless/plain/templates/custom.cfg -O bootless/boot/custom/custom.cfg
-Edit the config files
----------------------
+Customize
+---------
-Please check and customize the downloaded configuration above. The defaults allows you to load into Grub
-and boot your OS using the grub shell.
+Please check and customize the downloaded configuration above. The defaults:
-Example: Full Disk Encryption
------------------------------
-
-Here is an example of a Full Disk Encryption with an entry loaded into `custom.cfg`:
-
- menuentry 'darkstar full disk encryption' {
- # Loads luks and lvm modules so you can access kernel
- # and initrd from inside your encrypted OS!
- insmod luks
- insmod lvm
-
- # This opens the encrypted volume /dev/mapper/darkstar-root
- # and sets it as the root in the grub shell.
- cryptomount lvm/darkstar-root
- set root=(crypto0)
-
- # This loads the kernel and initramfs
- echo "Loading ${volume}..."
- linux /boot/vmlinuz-3.16.0-4-amd64 root=/dev/mapper/root cryptopts=target=root,source=/dev/mapper/darkstar-root ro quiet
- echo 'Loading initial ramdisk ...'
- initrd /boot/initrd.img-3.16.0-4-amd64
- }
-
-Example: boot with images loaded into the USB stick
----------------------------------------------------
+* Have examples to help customizations.
+* Allows you to load into Grub and boot your OS using the grub shell.
+* Provides two functions, `bootfde` and `bootimg` to simplify booting your encrypted system.
You may also place custom images into the USB stick -- with the drawback to have to keep them up-to-date:
cp -r /boot /tmp/bootless/custom/debian
- menuentry 'darkstar: preloaded images' {
- # This loads the kernel and initramfs using images preloaded into the USB stick.
- echo "Loading ${volume}..."
- linux /boot/custom/debian/vmlinuz-3.16.0-4-amd64 root=/dev/mapper/root cryptopts=target=root,source=/dev/mapper/darkstar-root ro quiet
- echo 'Loading initial ramdisk ...'
- initrd /boot/custom/debian/initrd.img-3.16.0-4-amd64
- }
-
-Example: builtin bootless functions
------------------------------------
-
-The supplied configuration provides two functions, `bootfde` and `bootimg` that simplify the two previous examples into:
-
- menuentry 'darkstar: full disk encryption' {
- bootfde darkstar-root
- }
-
- menuentry 'darkstar: preloaded images' {
- bootimg darkstar-root
- }
-
Create a bootable image
-----------------------
@@ -74,9 +30,8 @@ Create a bootable image
Record the image into the USB stick
-----------------------------------
-*WARNING!* This will irrevocably replace the contents of your USB stick.
-
-Pay attention to get the right device. If your USB stick is attached to
-your computer and reachable through `/dev/sdb`, you just have to run
+**WARNING!** This will irrevocably replace the contents of your USB stick. Pay
+attention to get the right device. If your USB stick is attached to your
+computer and reachable through `/dev/sdb`, you just have to run
sudo dd if=bootless.iso of=/dev/sdb