You are not logged in.
Pages: 1
live-build is a powerful but complicated beast, the documentation is sparse, and sometimes out of date, and there is little useful material out on the web, so I thought I'd drop here some things I ran into recently for future reference. Please feel free to add any discoveries/hints/whatever...
pvsage started a thread on this topic back in CrunchBang, so first have a look there: http://crunchbang.org/forums/viewtopic.php?id=39134
*) I feel nervous running a huge bunch of shell scripts with sudo, without reading through each and every one, so at the moment I'm doing live-build iso building in a VM. Alternatives to look at might include systemd-nspawn.
Guide here:
https://wiki.archlinux.org/index.php/Systemd-nspawn
*) It's a very good idea to edit auto/config and set --mirror-bootstrap to a fast local mirror. When it was set to httpredir I had a couple of builds fail partway through because the remote server had closed the connection. It went much more smoothly with a local mirror. This does not affect the settings in apt's sources.list for the generated system - that comes from --mirror-binary.
*) You don't necessarily want to run --purge every time you do an 'lb clean'. It's safer that way, but you'll have to rebuild the cache every time, and sometimes you can save a lot of time if you don't --purge. Just as long as you're sure there's nothing in the cache that you want to change. For example, if you mess up the final "binary" stage, you can do 'sudo lb clean noauto --binary' (noauto is necessary if your auto/clean contains instructions to remove everything!)
*) There's quite a lot of live-build config code out there in the form of git repositories. I've found it's much easier to look around these if you clone them locally first. First, the Debian live-build configs, along with live-build itself and various other stuff, here: https://alioth.debian.org/anonscm/git/debian-live/
Any of those .git urls can be cloned with, eg,
git clone https://alioth.debian.org/anonscm/git/debian-live/live-images.git
The live-images repo has all that's needed to build Debian live isos.
Then, there's Kali Linux. Raphael Herzog, the current live-build maintainer, is closely involved with this:
git clone git://git.kali.org/live-build-config.git
And Handy Linux, by Arpinux (remember him from #!?):
git clone http://gitorious.org/handylinux/handylinux.git
*) You can put .deb files into config/packages.chroot (as described in the manual section 8.3.1) and they'll be installed into the chroot filesystem if the version number is newer than what's in the configured repos, or if they don't exist in the repos. This is handy for patching some troublesome package - you don't have to remove the package from the install list, the .deb file will automatically be chosen if it's newer.
*) The current debian-installer may have some issues with eMMC drives, see this thread for details:
https://forums.bunsenlabs.org/viewtopic.php?id=3295
*) The method described in jessie live-build manual 8.2.7 Removing packages at install time seems to be broken, and no signs of attempts to fix it: https://bugs.debian.org/cgi-bin/bugrepo … bug=655198 so only the standard live-boot, live-config etc packages get removed. Others you'd have to do yourself with a custom script.
Last edited by johnraff (2017-02-19 06:47:15)
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
By analogy with dropping .deb files in config/packages.chroot, you can also put .udeb files in config/packages.binary, as described in manual 12.3. Confirmed, this works.
Udeb (μdeb, micro-deb) files are stripped-down debs used only by the Debian-installer, which brings us to...
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
The Debian Installer
This is not part of live-build as such, but lb usually puts it in the isos it builds.
debian-installer or d-i is not a single package but a complicated collection of ~100 udebs.
Debian Wiki:
https://wiki.debian.org/DebianInstaller
Debian Installer Internals:
http://d-i.alioth.debian.org/doc/internals/index.html
Get the whole source:
https://wiki.debian.org/DebianInstaller/CheckOut
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Also apt-cacher-ng is worth including too.
Also eatmydata, but you would need to make changes to the live-build scripts.
Ozi
Offline
Ozi, thanks for the hints.
live-build does cache apt downloads (until you run 'lb clean --purge') - does apt-cacher-ng add something over that?
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Hi John
Yes that live-build does cache, but apt-cacher-ng retains the packages even after a purge and limits the round trips to the server. And it's not limited to the packages for a specific build, i.e if you want to remove packages for a special build, but still want them for the main build, all the packages are retained. Also, you can run it on a central server, and many build machines reference it. It's like a mirror, except that it only contains the requested packages.
Ozi
Offline
Pages: 1