I've been working on generating complete USB stick d-i installs - (with all necessary packages, not just base) on the stick. The way I ended up doing it is by starting with the d-i manual's instructions for booting from a usb stick w/ an embedded netinst ISO image. I did all this on the first 128MB partition of a 2G stick, then created an ext2 filesystem for a second partition containing an archive of all the packages I wanted available in the second stage (sarge-based d-i, so still has a second stage).
I had problems getting the stick to boot from the first partition - the install-mbr tool didn't do the trick for me. Instead, I cat'd the mbr.bin file from the syslinux source package (not currently included in the syslinux binary package) onto the raw block device. Its also important to make sure your syslinux-configured partition has the bootable flag set (parted /dev/uba -- set 1 boot on) - syslinux doesn't appear to chain to partitions that don't.
It might be better to combine the netinst ISO and the full archive into a single archive embedded in an ISO so that no manual mounting/apt configuration is necessary. But it'd also be cool if the ISO scanning in the second stage was capable of scanning local partitions for archives as well.
posted at: 15:52 | path: /tech | permanent link to this entry