Re: Customizing Owl to fit in a small sized USB Stick or CF

[email protected] Wed, 28 Mar 2012 17:28:57 +0400
Newsgroups gmane.linux.openwall.user
Message-ID <[email protected]>
On 28-Mar-2012 08:48:04 +0000, Zenny wrote:

 > > > > > Gremlin had patches to add a new make target that would
 > > > > > generate flash images instead of ISOs. I think those were
 > > > > > primarily intended for installing systems from, and they
 > > > > > were for larger flash devices (1 GB being considered the
 > > > > > minimum anyone would likely happen to have handy anyway).
 > > > > Great info. Do you mean this one:
 > > > > ftp://ftp.gremlin.people.openwall.com/pub/linux/Owl/INSTALL/?
 > > > Almost. IIRC, Gremlin also produced a patch to our Owl/build/
 > > > tree to automatically generate flash images like that.
 > > Not yet. There was only /etc/lilo-flash.conf file for booting
 > > from a flash device.
 > It would be awesome if you could create a wiki page about the way
 > that you manage your compilation in flash. ;-) Appreciate that if
 > you could manage to post a small documentation, subject to your
 > convenience.

I hope I'll find some time for that... For now, here's brief recipe:

0. Run `qemu -hda flash1gb.image -cdrom owl-install.iso -boot d`
1. Intall the system to one single root partition
2. Exit to shell instead of rebooting
3. Copy the /usr/src to /owl/usr/src
4. Create /owl/etc/lilo-flash.conf
5. Run `chroot /owl lilo -C /etc/lilo-flash.conf -b /dev/hda`
6. Shut down the Qemu VM
7. Run `dd bs=1M if=flash1gb.image of=/dev/sdX`
8. Try booting physical machine from freshly created flash drive

I remember some issues with /etc/fstab when flash is recognized
with different device name, so one single root partition and
`mount / -o remount,rw` works that around.

 > > > Owl already supports encryption for loopback devices, so
 > > > you can use an encrypted ext4 filesystem with it currently
 > > > (with our pre-built kernels and tools).
 > > Yes, `losetup -e twofish -k 256 /dev/loop0 /dev/md0` works
 > > just fine.
 > Thanks for the hint ;-)

That wasn't the hint - the hint is "don't forget to destroy the key
when feds appear at your door" :-)


-- 
Alexey V. Vissarionov aka Gremlin from Kremlin
<gremlin ПРИ gremlin ТЧК ru>
GPG key ID: 0xEF3B1FA8, keyserver: hkp://subkeys.pgp.net
GPG key fingerprint: 8832 FE9F A791 F796 8AC9 6E4E 909D AC45 EF3B 1FA8
signature.asc (application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQIcBAEBCgAGBQJPcxIZAAoJEJCdrEXvOx+oDe8QALKO9AFLC0mnyMq7mSqjb8Kw
R+s50vp9+f8CTWjHYKrkx/G/A9P7CDcMp5C6OlRE8Zk5oHpO7dsNWZ+kpRJQB4VA
FtJO8I5wdMoHnN7Iplzmwwm6DRdl6z+X6RYLvp9AywK1VUqaFNSSrSq4QKjARaqe
xYMzOY+0ptmdS7EDeHXVas+iQZ5eY8DbB5Q97pv/kZUgOvDpa5h3FjoSvWUzSSE3
lBqSDJghrVWYLC0VpwCeEmz6+VjJuUV0fqX94N83Au+fHaM3c2F+vaCOsSNZt0xi
fZZgNFoFtJcRFH4JmvHWMA+Z3i4x6WsLJ4fYzscM9agVW8PRCF+8Rbg4BTIsL3fz
EMTlNV28+TWhebH/teSenXHwoC0tBdWzzN8yPhw0XanNthtNxPHXmmKpkUvEAalv
AIRglZD2U8KcZ2XUxB6JU5QQm+P5pdtpOzA1OrQQGV3CjMMcRyAYbgLKXR15r90g
1+gwiQx07AoIHmHAj2Ps2Y4wU3AF5Xg50m7sjoA/xye/Y4/hRcnT9BUUVmUZDHue
+4zPRhpUWg2xfvwJbA/tLMBeSyRC1qQ+iNDH7U0uno/z7oD6/pqtFUxo1wpKIu23
94GvbFG825L2/kmrQ7zcPgCQfnNNbVU2Sgxqk9A6b1tGeoxGPB2FOQ6w44A2YV/E
8XKsNHgFItwjhUx7ygCH
=NKaf
-----END PGP SIGNATURE-----