Quick
index
main
eev
eepitch
maths
angg
blogme
dednat6
littlelangs
PURO
(C2,C3,C4,
 λ,ES,
 GA,MD,
 Caepro,
 textos,
 Chapa 1)

emacs
lua
(la)tex
maxima
 qdraw
git
lean4
agda
forth
squeak
icon
tcl
tikz
fvwm
debian
irc
contact

Building live USBs with live-build on Debian

This is my main script for building (two) pen drive images, one without xfce4/lxde and one with:

# From: (find-es "live" "live-build-chrome")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# sudo rm -Rfv /home/live/
mkdire /home/live/
cd     /home/live/

# sudo lb clean --binary
sudo lb clean
sudo lb config \
  --debian-installer-distribution        stretch \
  --distribution                         stretch \
  --parent-distribution                  stretch \
  --parent-debian-installer-distribution stretch

cat > /tmp/my.list.chroot <<'%%%'
emacs24 emacs24-el zsh lua5.1 git make lua-lpeg expect xpdf recode figlet
xinit fvwm
%%%
sudo cp -v /tmp/my.list.chroot \
  /home/live/config/package-lists/my.list.chroot

cd /tmp/
wget -nc https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo cp -v google-chrome*.deb /home/live/config/packages.chroot/

cd     /home/live/
sudo lb build   |& tee build1.log

# (find-fline "/home/live/")
# (find-fline "/home/live/" "live-image-amd64.hybrid.iso")
# (find-fline "/home/live-images/")

laf -h /home/live/
laf -h /home/live-images/
laf -h /home/live/live-image-amd64.hybrid.iso
cp -v  /home/live/live-image-amd64.hybrid.iso \
       /home/live-images/emacs-fvwm-chrome.hybrid.iso



# Make an image adding xfce4 and lxde
#
cat > /tmp/my.list.chroot <<'%%%'
emacs24 emacs24-el zsh lua5.1 git make lua-lpeg expect xpdf recode figlet
xinit fvwm
xfce4 lxde
%%%
sudo cp -v /tmp/my.list.chroot \
   /home/live/config/package-lists/my.list.chroot

cd /home/live/
sudo lb clean
sudo lb build   |& tee build2.log

# (find-fline "/home/live/")
# (find-fline "/home/live/" "live-image-amd64.hybrid.iso")
# (find-fline "/home/live-images/")

laf -h /home/live/
laf -h /home/live-images/
laf -h /home/live/live-image-amd64.hybrid.iso
cp -v  /home/live/live-image-amd64.hybrid.iso \
       /home/live-images/emacs-fvwm-xfce4-lxdm-chrome.hybrid.iso
laf -h /home/live-images/



# Copy the image into the pen drive
# (find-fline "/dev/disk/by-id/")
#
sudo time \
  dd if=/home/live-images/emacs-fvwm-xfce4-lxdm-chrome.hybrid.iso of=/dev/sdb
sync

To make it work I had to install a version of live-build from Sid. See:

# (find-es "live" "live-build-Contents-bug")
# (find-es "live" "live-build-versions")

The pen drive works fine in my neighbor's computer, but I can't boot it in my machine yet - I have a LibreBoot X200 than has LibreBoot instead of a BIOS, and I haven't yet found a way to make its Grub boot a pen drive... my notes about that are here.


A question (that I asked on the #syslinux IRC channel at freenode):

I'm trying to modify a live pen drive with Debian built by live-build to add a third partition to it, but the obvious way - to run fdisk or something similar to it, add another partition, format it, and so on - doesn't work, because fdisk (and gparted, which I also tested) give lots of warnings about the GPT partition table being sort of broken, and if I tell them to go ahead and make the third partition anyway the rest gets corrupted - and when I boot the pen drive I get this: http://angg.twu.net/tmp/live-build-partition-3-bug-2018may29.jpg...

Anyway: I decided to take a blank pen drive, partition it with gparted - with a third partition -, and copy the files from the image produced by live-build to it, and now I have pen drive that has all the files that isohybrid would use... is it possible to run isohybrid on that, make it locate the files that it needs - that are all already on partition 1 - and make isohybrid only write the boot record things?