Building SmuggleBus - addenial/smugglebus GitHub Wiki
Using premade ISO
The quickest way to start using SmuggleBus is to download the premade ISO from the releases page.
Download:
wget https://github.com/addenial/smugglebus/releases/download/2.0/smugglebus.iso.tar.gz
Extract:
tar -zxvf smugglebus.iso.tar.gz
Image onto your USB drive (lsblk
or fdisk -l
to confirm you got the right drive, in below example USB is /dev/sdb):
dd if=smugglebus.iso of=/dev/sdb bs=1M status=progress
The premade ISO extracts to 1GB, so if you are using a larger flash drive and would like to use all available storage, I suggest using GParted to resize the partition.
Building from source
If you would rather build SmuggleBus from scratch, the easiest method is using the build script https://github.com/addenial/smugglebus/blob/master/build%20source/smugglebus/build_smugglebus.sh . This build script will use a clean tc image from releases (https://github.com/addenial/smugglebus/releases/download/1.5/tc_clean.iso.zip) and make appropriate modifications.
If you are v paranoid and would rather create fresh tiny core iso yourself, I suggest using the tc-install utility on TC CorePlus, and modifying the build script to use that rather than tc_clean.iso in my repository. To create fresh image:
-
Download TC CorePlus (106MB) from http://www.tinycorelinux.net/downloads.html, image it onto your device of choice, then boot into it.
-
Click on tc-install and select your disk:
-
Use Ext2 as the partition (no journaling overhead):
-
Keep this blank, you'll make the "home" and "opt" persistent between reboots by modifying tce/boot/extlinux/extlinux.conf manually via the build script which will use the USB device UUID:
-
Select โCore Only (Text Based Interface)โ for the installation:
-
Proceed :)
-
Success screen:
Build script to convert tinycore to smugglebus:
#!/bin/bash
if [ $EUID -ne 0 ](/addenial/smugglebus/wiki/-$EUID--ne-0-); then
echo "This script must be run as root"
exit 1
fi
echo 'Enter USB device (example "/dev/sdb")'
read usbdev
#make sure drive is unmounted
umount $usbdev"1"
#wget clean tc iso
wget https://github.com/addenial/smugglebus/releases/download/1.5/tc_clean.iso.zip
unzip tc_clean.iso.zip
#image onto the flashdrive
dd if=tc_clean.iso of=$usbdev bs=1M status=progress
sleep 5
#mount the newly imaged iso
mount=/mnt/usbmnt
mkdir $mount
mount $usbdev"1" $mount
#read USB UUID
usbUUID=`blkid $usbdev"1" -sUUID -ovalue`
#download necessary packages
mkdir $mount/tce/optional
wget http://distro.ibiblio.org/tinycorelinux/8.x/x86/tcz/python.tcz -P $mount/tce/optional/
wget http://distro.ibiblio.org/tinycorelinux/8.x/x86/tcz/openssl.tcz -P $mount/tce/optional/
wget http://distro.ibiblio.org/tinycorelinux/8.x/x86/tcz/ntfs-3g.tcz -P $mount/tce/optional/
echo "python.tcz
openssl.tcz
ntfs-3g.tcz" > $mount/tce/onboot.lst
#make home and opt folder persistent between reboots on the USB device
echo "DEFAULT core
LABEL core
KERNEL /tce/boot/vmlinuz
INITRD /tce/boot/core.gz
APPEND quiet waitusb=5:UUID=\"$usbUUID\" tce=UUID=\"$usbUUID\" opt=UUID=\"$usbUUID\" home=UUID=\"$usbUUID\"
" > $mount/tce/boot/extlinux/extlinux.conf
#clone smugglebus github repository, we need to copy the home folder with the code
git clone https://github.com/addenial/smugglebus.git
cp -r smugglebus/home/ $mount
#fix permissions for the tc user
chown -R 1001:staff $mount/home/tc/.
chmod +x $mount/home/tc/startup.sh
#clean up the temp folder and unmount
umount $usbdev"1"
rmdir $mount
echo "DONE!"