Warning: this is an htmlized version!
The original is across this link,
and the conversion rules are here.
#######
#
# E-scripts on making live USBs.
#
# Note 1: use the eev command (defined in eev.el) and the
# ee alias (in my .zshrc) to execute parts of this file.
# Executing this file as a whole makes no sense.
#
# Note 2: be VERY careful and make sure you understand what
# you're doing.
#
# Note 3: If you use a shell other than zsh things like |&
# and the for loops may not work.
#
# Note 4: I always run as root.
#
# Note 5: some parts are too old and don't work anymore. Some
# never worked.
#
# Note 6: the definitions for the find-xxxfile commands are on my
# .emacs.
#
# Note 7: if you see a strange command check my .zshrc -- it may
# be defined there as a function or an alias.
#
# Note 8: the sections without dates are always older than the
# sections with dates.
#
# This file is at <http://angg.twu.net/e/live.e>
#           or at <http://angg.twu.net/e/live.e.html>.
#        See also <http://angg.twu.net/emacs.html>,
#                 <http://angg.twu.net/.emacs[.html]>,
#                 <http://angg.twu.net/.zshrc[.html]>,
#                 <http://angg.twu.net/escripts.html>,
#             and <http://angg.twu.net/>.
#
#######






# «.manpages»			(to "manpages")
# «.irc-channel»		(to "irc-channel")
# «.mailing-list»		(to "mailing-list")
# «.crunchbang»			(to "crunchbang")
# «.persistence-inspect»	(to "persistence-inspect")
# «.unetbootin»			(to "unetbootin")
# «.unetbootin-deb-src»		(to "unetbootin-deb-src")
# «.debian-live-old»		(to "debian-live-old")
# «.debian-live»		(to "debian-live")
# «.live-manual»		(to "live-manual")
# «.live-build-versions»	(to "live-build-versions")
# «.live-build-distro»		(to "live-build-distro")
# «.live-build-my.list.chroot»	(to "live-build-my.list.chroot")
# «.live-build-chrome»		(to "live-build-chrome")
# «.live-build-hdd»		(to "live-build-hdd")
# «.live-build-xorriso»		(to "live-build-xorriso")
# «.live-build»			(to "live-build")
# «.debian-live-chrome»		(to "debian-live-chrome")
# «.debian-live-stretch»	(to "debian-live-stretch")
# «.debian-live-make-ISO»	(to "debian-live-make-ISO")
# «.debian-live-irc»		(to "debian-live-irc")
# «.debian-live-mailing-list»	(to "debian-live-mailing-list")




# (find-es "pendrive")



# (find-fline "~/live/")
# (find-fline "~/live/olb")
# (find-fline "~/live/olb"     "lb chroot_cache restore")
# (find-fline "/usr/lib/live/build/chroot_cache")

# (find-fline "/usr/bin/lb")
# (find-fline "/usr/lib/live/build.sh")
# (find-fline "/usr/share/live/build/functions/")




# (find-status   "live-build")
# (find-vldifile "live-build.list")
# (find-udfile   "live-build/")
# (find-fline "/usr/lib/live/build/")
# (find-fline "/usr/lib/live/build/binary_syslinux")
# (find-fline "/usr/lib/live/build/binary_iso")
# (find-fline "/usr/lib/live/build/binary_package-lists")

# (find-status   "debootstrap")
# (find-vldifile "debootstrap.list")
# (find-udfile   "debootstrap/")

# (find-status   "live-boot-doc")
# (find-vldifile "live-boot-doc.list")
# (find-udfile   "live-boot-doc/")
# (find-man "7 live-boot")
# (find-man "7 live-build")
# (find-man "7 live-tools")
# (find-man "7 live-config")
# (find-man "5 persistence.conf")

# (find-status   "live-config-doc")
# (find-vldifile "live-config-doc.list")
# (find-udfile   "live-config-doc/")
# (find-udfile "live-config/examples/live-config-foobar/")

# (find-status   "live-manual-html")
# (find-vldifile "live-manual-html.list")
# (find-udfile   "live-manual-html/")
# (find-udfile "live-manual/html/")
# file:///usr/share/doc/live-manual/html/live-manual.en.html

# (find-status   "genisoimage")
# (find-vldifile "genisoimage.list")
# (find-udfile   "genisoimage/")

# (find-man "5 genisoimagerc")
# (find-man "1 mkzftree")
# (find-man "1 genisoimage")
# (find-man "1 dirsplit")
# (find-man "1 isoinfo")
# (find-man "1 geteltorito")
# (find-man "1 devdump")
# (find-man "1 isodump")
# (find-man "1 isovfy")




#####
#
# manpages
# 2013oct26
#
#####

# «manpages» (to ".manpages")



#####
#
# IRC channel
# 2013oct26
#
#####

# «irc-channel» (to ".irc-channel")
# file:///usr/share/doc/live-manual/html/live-manual.en.html
# (find-eev "eev-rcirc.el")

(defun find-debianirc (&optional channel &rest pos-spec-list)
  (apply 'find-rcirc-buffer
  	 "irc.debian.org"
	 "#debian-live" "#debian-live" channel pos-spec-list))

(defun find-debianirc-3a (channel)
  (find-3a nil '(find-debianirc) '(find-debianirc channel)))

(find-debianirc-3a "#debian-live")





#####
#
# mailing list
# 2013oct26
#
#####

# «mailing-list» (to ".mailing-list")
# http://lists.debian.org/debian-live/
# http://lists.debian.org/debian-live/2013/08/threads.html



#####
#
# crunchbang
# 2013nov24
#
#####

# «crunchbang» (to ".crunchbang")
# http://crunchbang.org/
# http://en.wikipedia.org/wiki/CrunchBang_Linux
# http://crunchbang.org/forums/viewtopic.php?id=19658 Waldorf LiveUSB
# http://crunchbang.org/forums/viewtopic.php?id=23267 How To prepare an ISO to USB - Linux & Windows Instructions ***
# http://crunchbang.org/forums/viewtopic.php?id=25489 The Correct Way for Persistence on a LiveUSB for WALDORF ***
# http://crunchbang.org/forums/viewtopic.php?id=22031 Waldorf and persistence
# http://crunchbang.org/torrents/crunchbang-11-20130506-i686.iso.torrent
# (find-fline "/sda5/torrents/" "crunchbang-11-20130506-i686.iso")

# (find-sh0 "sudo ls -l /dev/disk/by-id/*usb*")

** First test (without persistence):
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
ISO=/sda5/torrents/crunchbang-11-20130506-i686.iso
laf $ISO
sudo dd if=$ISO of=/dev/sdb bs=4M; sync


** To create a pen drive with persistence we follow the instructions here:
**   http://crunchbang.org/forums/viewtopic.php?id=25489
** 1) Format the pen drive with a single FAT32 partition
**   (find-es "pendrive" "repartition-1")
** 2) Install the ISO into that partition with:
**   (to "unetbootin")
** 3) Shrink that partition with gparted, label it "DEBIAN_LIVE",
**    and create a 2nd partition (ext2), label it "persistence"
** 4) Make the changes below:

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
# (find-tkdiff "~/LIVE/syslinux.cfg.orig" "~/LIVE/syslinux.cfg")

mkdir /tmp/pen/
sudo mount /dev/sdb1 /tmp/pen/
cd /tmp/pen/
sudo cp -iv /tmp/pen/syslinux.cfg /tmp/pen/syslinux.cfg.orig
sudo cp -v    ~/LIVE/syslinux.cfg /tmp/pen/syslinux.cfg
# (find-tkdiff "/tmp/pen/syslinux.cfg.orig" "/tmp/pen/syslinux.cfg")
sudo umount          /tmp/pen/

mkdir                /tmp/persistence/
sudo mount /dev/sdb2 /tmp/persistence/
sudo cp -v    ~/LIVE/live-persistence.conf /tmp/persistence/
sudo umount          /tmp/persistence/



# Old notes:
# (kill-new " persistence")
# (find-asrootfile "/tmp/pen/")
# (find-asrootfile "/tmp/pen/syslinux.cfg")
# (find-fline        "~/LIVE/syslinux.cfg")
# (find-fline "~/LIVE/live-persistence.conf")
# (kill-new "")
# (find-asroot "/tmp/persistence/")
# (find-asroot "/tmp/persistence/live-persistence.conf")





#####
#
# Inspecting how persistence is implemented
# 2013nov25
#
#####

# «persistence-inspect» (to ".persistence-inspect")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mkdir /tmp/debian-live/
mkdir /tmp/persistence/
sudo mount -o ro /dev/sdb1 /tmp/debian-live/
sudo mount -o ro /dev/sdb2 /tmp/persistence/

# (find-fline "/tmp/debian-live/")
# (find-fline "/tmp/debian-live/syslinux.cfg" "persistence")
# (find-fline "/tmp/persistence/")
# (find-fline "/tmp/persistence/home/crunchbang/")
# (find-fline "/tmp/persistence/usr/bin/")

sudo umount /tmp/debian-live/
sudo umount /tmp/persistence/

# (find-man "mount")
# (find-sh "locate union")



#####
#
# unetbootin
# 2013nov24
#
#####

# «unetbootin» (to ".unetbootin")
# (find-status   "unetbootin")
# (find-vldifile "unetbootin.list")
# (find-udfile   "unetbootin/")
# (find-man "1 unetbootin")
# (find-fline "/usr/share/menu/unetbootin")
# (find-fline "/usr/share/menu/unetbootin" "Applications/System/Administration")
# http://unetbootin.sourceforge.net/
# http://sourceforge.net/apps/trac/unetbootin/wiki
# http://sourceforge.net/apps/trac/unetbootin/wiki/guide
# http://unetbootin.sourceforge.net/diskimg/readme.txt
# http://sourceforge.net/apps/trac/unetbootin/wiki/installmodes
# http://sourceforge.net/apps/trac/unetbootin/wiki/commands ***
# http://sourceforge.net/apps/trac/unetbootin/wiki/commands?format=txt
# (find-wget "http://sourceforge.net/apps/trac/unetbootin/wiki/commands?format=txt")






#####
#
# unetbootin (from the debian sources)
# 2013nov28
#
#####

# «unetbootin-deb-src» (to ".unetbootin-deb-src")
# http://ftp.de.debian.org/debian/pool/main/u/unetbootin/
# http://ftp.de.debian.org/debian/pool/main/u/unetbootin/unetbootin_585-2.dsc
# http://ftp.de.debian.org/debian/pool/main/u/unetbootin/unetbootin_585-2.debian.tar.gz
# http://ftp.de.debian.org/debian/pool/main/u/unetbootin/unetbootin_585.orig.tar.gz
#*
rm -Rv ~/usrc/unetbootin/
mkdir  ~/usrc/unetbootin/
cd $S/http/ftp.de.debian.org/debian/pool/main/u/unetbootin/
cp -v unetbootin_585* ~/usrc/unetbootin/
cd     ~/usrc/unetbootin/
dpkg-source -sn -x unetbootin_585-2.dsc
cd     ~/usrc/unetbootin/unetbootin-585/
dpkg-buildpackage -us -uc -b -rfakeroot     |& tee odb

#*
# (find-fline "~/usrc/unetbootin/")
* (eepitch-shell)
cd ~/usrc/unetbootin/
sudo dpkg -i *.deb

#*
# (code-c-d "unetbootin" "~/usrc/unetbootin/unetbootin-585/")
# (find-unetbootinfile "")




#####
#
# Debian Live (old)
# 2014jul06
#
#####

# «debian-live-old» (to ".debian-live-old")
# «debian-live» (to ".debian-live")
# http://live.debian.net/manual/1.x/html/persistence.html
# (find-fline "/sda4/isos/")
# (find-es "live" "crunchbang")

** First test (without persistence):
* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
ISO=/sda4/isos/debian-live-7.5.0-i386-xfce-desktop.iso
laf $ISO
sudo dd if=$ISO of=/dev/sdb bs=4M; sync





#####
#
# live-manual
# 2018mai18
#
#####

# «live-manual» (to ".live-manual")
# http://packages.debian.org/live-manual
# https://packages.debian.org/search?keywords=live-manual
# https://packages.debian.org/sid/live-manual-html
# http://http.debian.net/debian/pool/main/l/live-manual/live-manual_20151217.1_all.deb
# http://http.debian.net/debian/pool/main/l/live-manual/live-manual-html_20151217.1_all.deb
# http://debian-live.alioth.debian.org/live-manual/stable/manual/html/live-manual.en.html
# http://debian-live.alioth.debian.org/ (should transition to:)
# https://salsa.debian.org/public

cd /tmp/
wget http://http.debian.net/debian/pool/main/l/live-manual/live-manual_20151217.1_all.deb
wget http://http.debian.net/debian/pool/main/l/live-manual/live-manual-html_20151217.1_all.deb
  sudo dpkg -i live-manual-html_20151217.1_all.deb
# sudo dpkg -i live-manual_20151217.1_all.deb

# (find-status   "live-manual-html")
# (find-vldifile "live-manual-html.list")
# (find-udfile   "live-manual-html/")
# (find-fline "/usr/share/doc/live-manual/html/live-manual/")
# file:///usr/share/doc/live-manual/html/live-manual/about-manual.en.html#7
# file:///usr/share/doc/live-manual/html/live-manual/examples.en.html
# file:///usr/share/doc/live-manual/html/live-manual/installation.en.html#installing-live-build





#####
#
# live-build: installing a newer version (from sid)
# 2018mai18
#
#####

# «live-build-versions» (to ".live-build-versions")
# http://packages.debian.org/live-build
# https://packages.debian.org/search?keywords=live-build
# http://http.debian.net/debian/pool/main/l/live-build/
# http://http.debian.net/debian/pool/main/l/live-build/live-build_20180411.dsc
# http://http.debian.net/debian/pool/main/l/live-build/live-build_20180411.tar.xz
# http://http.debian.net/debian/pool/main/l/live-boot-doc/
# http://http.debian.net/debian/pool/main/l/live-manual/

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
cd /tmp/
wget http://cdn-fastly.deb.debian.org/debian/pool/main/l/live-build/live-build_20180411_all.deb
wget http://cdn-fastly.deb.debian.org/debian/pool/main/l/live-build/live-build_20170213_all.deb
sudo dpkg -i live-build_20180411_all.deb
apti -f

# (find-status   "live-build")
# (find-vldifile "live-build.list")
# (find-udfile   "live-build/")




#####
#
# live-build: changing the distribution
# 2018mai19
#
#####

# «live-build-distro» (to ".live-build-distro")
# (find-man "1 lb_config")
# (find-man "1 lb_config" "   --debian-installer-distribution")
# (find-fline "/usr/lib/live/build/lb_config")

       --debian-installer-distribution        stretch
       --distribution                         stretch
       --parent-distribution                  stretch
       --parent-debian-installer-distribution stretch




#####
#
# live-build: adding packages using the my.list.chroot file
# 2018mai18
#
#####

# «live-build-my.list.chroot» (to ".live-build-my.list.chroot")

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

cat > /tmp/my.list.chroot <<'%%%'
emacs24 emacs24-el zsh lua5.1 git make lua-lpeg expect xpdf recode figlet
xinit fvwm
%%%

cd /home/live/
sudo lb config \
  --debian-installer-distribution        stretch \
  --distribution                         stretch \
  --parent-distribution                  stretch \
  --parent-debian-installer-distribution stretch

sudo cp -v /tmp/my.list.chroot \
  /home/live/config/package-lists/my.list.chroot

sudo lb build   |& tee build1.log




#####
#
# live-build: adding google-chrome
# 2018mai19
#
#####

# «live-build-chrome» (to ".live-build-chrome")

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

cat > /tmp/my.list.chroot <<'%%%'
emacs24 emacs24-el zsh lua5.1 git make lua-lpeg expect xpdf recode figlet
xinit fvwm
%%%

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

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")

laf -h /home/live/
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




# 4.5.2 Copying an ISO hybrid image to a USB stick:
# file:///usr/share/doc/live-manual/html/live-manual/the-basics.en.html#195
#   cp live-image-i386.hybrid.iso ${USBSTICK}

cd /home/live/
sudo time \
  dd if=live-image-amd64.hybrid.iso of=/dev/sdb
sync

# (find-man "8 fdisk" "  -l")
# (find-sh "sudo fdisk -l /dev/sdb")

sudo fdisk  /dev/sdb
p
n
p
3

+200M
p
m
w
sync

sudo mke2fs /dev/sdb3
sync

# (find-sh "sudo fdisk -l /dev/sdb")

# 4.6.1 Testing an ISO image with QEMU:
# file:///usr/share/doc/live-manual/html/live-manual/the-basics.en.html#218
# (find-es "qemu" "qemu-kvm")
cd /home/live/
qemu-system-x86_64 -cdrom live-image-amd64.hybrid.iso






#####
#
# Building an "hdd" image instead of the default iso-hybrid
# 2018mai19
#
#####

# «live-build-hdd» (to ".live-build-hdd")
# 4.7 Building and using an HDD image:
# file:///usr/share/doc/live-manual/html/live-manual/the-basics.en.html#233

* (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 -b hdd \
  --debian-installer-distribution        stretch \
  --distribution                         stretch \
  --parent-distribution                  stretch \
  --parent-debian-installer-distribution stretch

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 build2.log

# (find-fline "/home/live/build2.log")
# (find-fline "/home/live/")

# [2018-05-19 03:57:04] lb binary_disk 
# P: Begin installing disk information...
# [2018-05-19 03:57:05] lb binary_loadlin 
# [2018-05-19 03:57:05] lb binary_win32-loader 
# [2018-05-19 03:57:05] lb binary_includes 
# P: Begin copying binary includes...
# [2018-05-19 03:57:05] lb binary_hooks 
# P: Begin executing hooks...
# [2018-05-19 03:57:05] lb binary_grub-efi 
# P: Begin preparing Grub based EFI support...
# Reading package lists...
# Building dependency tree...
# Reading state information...
# E: Unable to locate package shim-signed
# E: Unable to locate package grub-efi-amd64-signed
# W: UEFI Secure Boot disabled due to missing signed Grub/Shim.
# W: Bootloader in this image type not yet supported by live-build.
# W: This would produce a not bootable image, aborting (FIXME).
# P: Begin unmounting filesystems...
# P: Saving caches...
# Reading package lists...
# Building dependency tree...
# Reading state information...

# (find-fline "/usr/lib/live/build/binary_grub-efi")
# (find-fline "/usr/lib/live/build/binary_grub-efi" "shim-signed")
# (find-fline "/usr/lib/live/build/binary_grub-efi" "a not bootable image, aborting (FIXME)")




#####
#
# How live-build invokes xorriso
# 2018mai19
#
#####

# «live-build-xorriso» (to ".live-build-xorriso")
# (find-livebuildgrep "grep -niH -e xorriso *")
# (find-fline "/home/live/config/binary" "LB_BOOTLOADERS")
# (find-livebuildfile "binary_iso" "IMAGE=\"${LIVE_IMAGE_NAME}-")
# (find-livebuildfile "binary_iso" "-e binary/boot/grub/efi.img")
# (find-livebuildfile "binary_iso" "xorriso -as mkisofs ${XORRISO_OPTIONS} -o ${IMAGE} binary")

# (find-fline "/home/live/binary/")
# (find-sh "cd /home/live/binary/ && find .* * | sort")
# (find-sh "cd /home/live/binary/ && du -ch")
# (find-fline "/home/live/chroot/")
# (find-sh "cd /home/live/chroot/ && sudo find * | sort")

# (find-sh "cd /home/live/ && find .* * | sort")

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mkdir /tmp/hybridiso/
sudo mount -o loop,ro /home/live/live-image-amd64.hybrid.iso /tmp/hybridiso/
# (find-fline "/tmp/hybridiso/")
# (find-fline "/tmp/hybridiso/.disk/mkisofs")
# (find-fline "/tmp/hybridiso/.disk/mkisofs" "xorriso -as mkisofs")
# (find-sh "cd /tmp/hybridiso/ &&  find .* * | sort")
# (find-fline "/tmp/hybridiso/live/" "filesystem.squashfs")
# (find-fline "/tmp/hybridiso/isolinux/")
# (find-fline "/tmp/hybridiso/isolinux/splash.png")
cp -v /tmp/hybridiso/.disk/mkisofs /tmp/
sudo umount /tmp/hybridiso/





#####
#
# live-build
# 2018mai15
#
#####

# «live-build» (to ".live-build")
# (find-es "isolinux")

# (find-status   "live-build")
# (find-vldifile "live-build.list")
# (find-udfile   "live-build/")
# (find-man "1 lb")
# (find-man "1 lb_binary")
# (find-man "1 lb_bootstrap")
# (find-man "1 lb_build")
# (find-man "1 lb_chroot")
# (find-man "1 lb_clean")
# (find-man "1 lb_config")
# (find-man "1 lb_source")
# (find-man "1 lb_testroot")
# (find-man "7 live-build")

# (find-fline "/usr/bin/lb")
# (find-fline "/usr/bin/live-build")
# (find-fline "/usr/lib/live/build/")
# (find-fline "/usr/lib/live/build/binary_iso")



# (find-status   "live-image-lxde-desktop")
# (find-vldifile "live-image-lxde-desktop.list")
# (find-udfile   "live-image-lxde-desktop/")
# (find-status   "live-image-rescue")
# (find-vldifile "live-image-rescue.list")
# (find-udfile   "live-image-rescue/")
# (find-status   "live-image-standard")
# (find-vldifile "live-image-standard.list")
# (find-udfile   "live-image-standard/")
# (find-status   "live-image-xfce-desktop")
# (find-vldifile "live-image-xfce-desktop.list")
# (find-udfile   "live-image-xfce-desktop/")

# (find-status   "live-boot-doc")
# (find-vldifile "live-boot-doc.list")
# (find-udfile   "live-boot-doc/")
# (find-man "5 persistence.conf")
# (find-man "7 live-boot")

# (find-status   "live-config-doc")
# (find-vldifile "live-config-doc.list")
# (find-udfile   "live-config-doc/")
# (find-man "7 live-config")
# (find-udfile "live-config/examples/")

# (find-status   "live-debconfig-doc")
# (find-vldifile "live-debconfig-doc.list")
# (find-udfile   "live-debconfig-doc/")
# (find-man "7 live-debconfig")
# (find-man "5 live-debconfig_hostname")
# (find-man "1 live-debconfig-set-selections")
# (find-man "1 live-debconfig-get-selections")

# (find-status   "live-image-lxde-desktop")
# (find-vldifile "live-image-lxde-desktop.list")
# (find-udfile   "live-image-lxde-desktop/")
# (find-fline "/usr/share/live/images/lxde-desktop/config/bootloaders/")
# (find-fline "/usr/share/live/images/lxde-desktop/config/package-lists/")

# (find-status   "live-manual-html")
# (find-vldifile "live-manual-html.list")
# (find-udfile   "live-manual-html/")
# (find-fline "/usr/share/doc/live-manual/html/live-manual/")
# file:///usr/share/doc/live-manual/html/live-manual/about-manual.en.html#7
# file:///usr/share/doc/live-manual/html/live-manual/examples.en.html
# file:///usr/share/doc/live-manual/html/live-manual/installation.en.html#installing-live-build

# (find-fline "/usr/share/live/images/")
# (find-fline "/usr/share/live/images/lxde-desktop/")
https://www.debian.org/devel/debian-live/
https://wiki.debian.org/DebianLive

* (eepitch-shell)
* (eepitch-kill)
* (eepitch-shell)
mkdir /tmp/tutorial1/
cd    /tmp/tutorial1/
lb config

# (find-fline "/etc/live/build.conf")

sudo lb build   |& tee build.log

# (find-fline "/tmp/tutorial1/")
# (find-fline "/tmp/tutorial1/build.log")
# (find-fline "/tmp/tutorial1/chroot/var/cache/apt/archives/")
# (find-fline "/tmp/tutorial1/chroot/var/lib/apt/lists/")
# (find-fline "/tmp/tutorial1/binary/live/")

# (find-fline "/tmp/tutorial1/config/binary" "DISTRIBUTION")

# (find-es "u" "every-boot")
# emacs zsh lua5.1 git make lua-lpeg expect xpdf recode figlet
# (find-fline "/tmp/tutorial1/config/package-lists/my.list.chroot")

mkdir /tmp/tutorial1/
cd    /tmp/tutorial1/
sudo lb clean   |& tee clean.log
sudo lb build   |& tee build2.log
# (find-fline "/tmp/tutorial1/build2.log")
# (find-fline "/tmp/tutorial1/cache/packages.binary/" "emacs")

# (find-es "u" "every-boot")
# google-chrome-stable
# (find-fline "/tmp/tutorial1/config/package-lists/my.list.chroot")

mkdir /tmp/tutorial1/
cd    /tmp/tutorial1/
sudo lb clean   |& tee clean.log
sudo lb build   |& tee build3.log
# (find-fline "/tmp/tutorial1/build3.log")
# (find-fline "/tmp/tutorial1/build3.log" "Unable to locate package google-chrome-stable")
# (find-fline "/tmp/tutorial1/cache/packages.binary/" "")

# file:///usr/share/doc/live-manual/html/live-manual/customizing-package-installation.en.html#430
# (find-fline "/tmp/tutorial1/config/packages.chroot/")
# (find-es "u" "every-boot")
# (find-es "u" "every-boot" "chrome")

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


sudo umount /tmp/tutorial1/chroot/dev/pts
sudo umount /tmp/tutorial1/chroot/proc
sudo umount /tmp/tutorial1/chroot/sys

sudo rm -Rf /tmp/tutorial1/
mkdir /tmp/tutorial1/
cd    /tmp/tutorial1/
# lb config --distribution buster
lb config --distribution stretch
# (find-fline "/tmp/tutorial1/config/")
# (find-fline "/tmp/tutorial1/config/binary" "DISTRIBUTION")
sudo lb clean   |& tee clean.log
sudo lb build   |& tee build5.log


mkdir /tmp/tutorial1/
cd    /tmp/tutorial1/
sudo lb clean   |& tee clean.log
sudo lb build   |& tee build4.log
# (find-fline "/tmp/tutorial1/build4.log")


lb config




#####
#
# Installing Google Chrome in debian-live
# 2018mai15
#
#####

# «debian-live-chrome» (to ".debian-live-chrome")
# (find-es "debrepository" "debootstrap-2018")
# https://askubuntu.com/questions/824818/how-can-i-install-chromium-browser-in-live-mode
# file:///usr/share/doc/live-manual/html/live-manual/customizing-package-installation.en.html#430
# file:///usr/share/doc/live-manual/html/live-manual/customizing-package-installation.en.html#437

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

sudo lb config
sudo lb clean   |& tee clean.log
sudo lb build   |& tee build1.log


# 4.5.2 Copying an ISO hybrid image to a USB stick:
# file:///usr/share/doc/live-manual/html/live-manual/the-basics.en.html#186

cd /home/live/
sudo time \
  dd if=binary.hybrid.iso of=/dev/sdb
sync

# 4.6.1 Testing an ISO image with QEMU:
# file:///usr/share/doc/live-manual/html/live-manual/the-basics.en.html#208
# (find-es "qemu" "qemu-kvm")
cd /home/live/
qemu-system-x86_64 -cdrom binary.hybrid.iso

sudo fdisk  /dev/sdb
sudo mke2fs /dev/sdb2

# (find-fline "/usr/lib/live/build/lb_binary_iso")


sudo gparted /dev/sdb


lb config --distribution buster
sudo lb clean   |& tee clean.log
sudo lb build   |& tee build1.log
# E: Failed getting release file http://ftp.debian.org/debian/dists/belenos/Release
# http://ftp.debian.org/debian/dists/
# http://ftp.debian.org/debian/dists/buster/

# (find-fline "/home/live/build2.log")
# (find-fline "/home/live/cache/packages.binary/" "emacs")

lb config





#####
#
# debian-live-stretch
# 2018mai18
#
#####

# «debian-live-stretch» (to ".debian-live-stretch")

# (find-es "u" "every-boot")
# emacs24 emacs24-el zsh lua5.1 git make lua-lpeg expect xpdf recode figlet
# xinit fvwm
# (find-fline      "/home/live/config/package-lists/")
# (find-asrootfile "/home/live/config/package-lists/my.list.chroot")

sudo lb clean   |& tee clean.log
sudo lb build   |& tee build2.log
sudo lb build   |& tee build3.log
sudo lb build   |& tee build4.log

# (find-fline "/home/live/")
# (find-sh "cd /home/live/ && sudo find * | sort")
# (find-fline "/home/live/config/bootstrap" "LB_DISTRIBUTION")
# (find-fline "/home/live/build1.log")
# (find-fline "/home/live/build1.log" "that does not conform to ISO-9660")
# (find-fline "/home/live/build3.log")
# (find-fline "/home/live/" "binary.hybrid.iso")

[2018-05-18 01:20:46] lb_chroot_linux-image 
--2018-05-18 01:20:47--  http://ftp.debian.org/debian//dists/stretch/Contents-amd64.gz
Resolving ftp.debian.org (ftp.debian.org)... 2001:67c:2564:a119::148:12, 130.89.148.12
Connecting to ftp.debian.org (ftp.debian.org)|2001:67c:2564:a119::148:12|:80... connected.
HTTP request sent, awaiting response... 404 Not Found

# https://superuser.com/questions/923411/why-are-there-no-contents-arch-gz-file-for-debian-jessie
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637442

# http://ftp.debian.org/debian/dists/wheezy/main/  Contents-amd64.gz
# http://ftp.debian.org/debian/dists/stretch/main/ Contents-amd64.gz



#####
#
# debian-live-make-ISO
# 2018mai16
#
#####

# «debian-live-make-ISO» (to ".debian-live-make-ISO")
# file:///usr/share/doc/live-manual/html/live-manual/the-basics.en.html#171





#####
#
# Debian-live IRC channel
# 2018mai15
#
#####

# «debian-live-irc» (to ".debian-live-irc")
# https://www.debian.org/devel/debian-live/
#      -> irc://irc.debian.org/debian-live
# (erc-select :server "irc.debian.org" :port 6667)
# (find-ebuffer "irc.debian.org:6667")
# (find-ebuffer "#debian-live")




#####
#
# debian-live-mailing-list
# 2018mai15
#
#####

# «debian-live-mailing-list» (to ".debian-live-mailing-list")
# https://www.debian.org/devel/debian-live/ ->
# https://lists.debian.org/debian-live/



# (find-es "debrepository" "debootstrap")
# (find-es "debrepository" "debootstrap-2018")
















# (find-sh "locate ext4")
http://blog.desdelinux.net/como-instalar-linux-en-un-usb-en-forma-persistente/
http://alexsleat.co.uk/2011/02/06/howto-mount-usb-persistent-casper-rw-file-in-linux/
http://www.doudoulinux.org/web/english/documentation-7/advanced-tools/article/data-persistence.html#types
http://code.metager.de/source/xref/linux/stable/Documentation/filesystems/sharedsubtree.txt

# (find-man "8 mount")
# (find-man "8 mount" "The bind mounts")
# (find-man "8 mount" "The shared subtrees operations")
# (find-man "8 mount")

Documentation/filesystems/sharedsubtree.txt
# (find-sh "locate Documentation/filesystems/sharedsubtree.txt")










file:///usr/share/doc/live-manual/html/live-manual.en.html#downloading-prebuilt-im
file:///usr/share/doc/live-manual/html/live-manual.en.html#husing-hdd-image
file:///usr/share/doc/live-manual/html/live-manual.en.html#hapt-pinning
file:///usr/share/doc/live-manual/html/live-manual.en.html#hpersistence
file:///usr/share/doc/live-manual/html/live-manual.en.html#using-usb-extra-space

ages



http://dwm.suckless.org/





#  Local Variables:
#  coding:               raw-text-unix
#  ee-delimiter-hash:    "\n#*\n"
#  ee-delimiter-percent: "\n%*\n"
#  ee-anchor-format:     "«%s»"
#  End: