[owl-users] making installation flash

From: <gremlin_at_private>
Date: Tue, 29 May 2012 15:35:29 +0400
This memo is primarily for project members, but it can be useful
for Owl users as well.

Also, I have some bad news: now the installation flash must have
at least 2 Gb capacity. Not really a problem, unless you have to
make lots of them (does anyone produce souvenirs with Owl?).

After installing the Owl-current to the flash (e.g. using Qemu),
you need to issue the following commands before rebooting:

==== flash-prepare starts here ====

#!/bin/sh
# flash-prepare - postinstall script for Owl installation

# copy the distribution files
tar -C /rom -c world | tar -C /owl/usr/src -x

# remove the SSH host keys (they'll be regenerated on first boot)
rm /owl/etc/ssh/ssh_host_*

# remove the root password
chroot /owl usermod -p '' root

# disable automatic filesystem check on boot
sed -i -re 's,[[:blank:]]+[0-9][[:blank:]]+[0-9]$, 0 0,g' /owl/etc/fstab
sed -i -re 's,.*/mnt/.*,#&,g' /owl/etc/fstab

# create special lilo.conf
cat > /owl/etc/lilo.conf << __LILO_CONF_EOF__
boot=/dev/sdh
read-only
lba32
prompt
timeout=600
menu-title="Openwall GNU/*/Linux boot menu"
menu-scheme=kw:Wk:kw:kw
append="rootdelay=10 panic=10"

image=/boot/vmlinuz
        root=/dev/sda1
        label=sda

image=/boot/vmlinuz
        root=/dev/sdb1
        label=sdb

image=/boot/vmlinuz
        root=/dev/sdc1
        label=sdc

image=/boot/vmlinuz
        root=/dev/sdd1
        label=sdd

image=/boot/vmlinuz
        root=/dev/sde1
        label=sde

image=/boot/vmlinuz
        root=/dev/sdf1
        label=sdf

image=/boot/vmlinuz
        root=/dev/sdg1
        label=sdg

image=/boot/vmlinuz
        root=/dev/sdh1
        label=sdh

__LILO_CONF_EOF__

# reinstall bootloader; possibly, we should use syslinux here...
chroot /owl lilo -b `cat /proc/mounts | grep /owl | sed -re 's,[0-9].*,,g'`


==== end of file flash-prepare ====

I've tested this script on Owl-current-20120508-x86_64.iso and it mostly
worked. Possibly, we can add this script to the owl-cdrom package in the
next -current image after the correction of the following issues:

0. Lack of hardware support in the kernel (we need newer kernel version).
1. The e2fsck attempts to check non-existent devices even when fs_passno
field is missing or is set to zero.

For those who want to test the resulting image immediately, there's a
copy at ftp://ftp.gremlin.people.openwall.com/pub/linux/Owl/INSTALL/ -
hopefully it will work for you.

% md5sum < Owl-current-20120508-x86_64-install-flash-2Gb.image.gz
1dcc1834305b6a817498ce68ae778530  -


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

Received on Tue May 29 2012 - 04:35:29 PDT

This archive was generated by hypermail 2.2.0 : Tue May 29 2012 - 04:36:04 PDT