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»		(to "debian-live")




# (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
# 2014jul06
#
#####

# «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



# (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: