Created
April 25, 2021 18:09
-
-
Save Jip-Hop/75787e22aa35c3ca6674783adfb39b33 to your computer and use it in GitHub Desktop.
Booting from Custom Tiny Core Linux for Read Only Filesystem (SED PBA) Notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# references | |
# https://fabianstumpf.de/articles/tinycore_images.htm | |
# https://gist.github.com/dankrause/2a9ed5ed30fa7f9aaaa2 | |
# https://github.com/Drive-Trust-Alliance/sedutil/wiki/Encrypting-your-drive | |
# follow these steps on Ubuntu | |
sudo su | |
qemu-img create core-image.img 120M -f raw | |
modprobe nbd max_part=8 && sleep 2 && qemu-nbd -c /dev/nbd0 core-image.img -f raw | |
fdisk /dev/nbd0 | |
# delete all partitions with d | |
# hit n and Enter to create a new partition on the disk | |
# choose p for a primary partition and 1 for the partition number | |
# accept the default for the last sector of the partition to have it span the rest of the disk | |
# make the new partition bootable by hitting a and Enter | |
# hit w and Enter to write the changes to the block device | |
mkfs.fat /dev/nbd0p1 -n COREGRUB | |
# mount /dev/nbd0p1 at /media/username/COREGRUB, from Ubuntu Disks GUI | |
sudo grub-install --boot-directory=/media/username/COREGRUB/boot /dev/nbd0 | |
nano /media/username/COREGRUB/boot/grub/grub.cfg | |
# paste grub config: | |
set timeout=1 | |
set default=0 | |
menuentry "Tinycore ISO" { | |
loopback loop /tinycore.iso | |
linux (loop)/boot/vmlinuz tinycore cde iso=LABEL="COREGRUB" libata.allow_tpm=1 loglevel=3 -- | |
initrd (loop)/boot/core.gz | |
} | |
# save grub config contents and close nano | |
# copy a custom tinycore.iso to /media/username/COREGRUB | |
umount /dev/nbd0p1 | |
qemu-nbd -d /dev/nbd0 | |
# test | |
qemu-system-i386 core-image.img | |
# if it works then flash it to the Shadow MBR from sedutil rescue image: https://github.com/Drive-Trust-Alliance/sedutil/wiki/Executable-Distributions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment