diff options
author | ficus <ficus@robocracy.org> | 2012-11-13 22:56:37 +0100 |
---|---|---|
committer | ficus <ficus@robocracy.org> | 2012-11-13 22:56:37 +0100 |
commit | eddf79ba816ed061c6e2e70558f9a62c9191467c (patch) | |
tree | 57fb8baf793ba1560b4e5abb1aa4a4554478ec1a /config | |
parent | 554b72536dc9fbd145868518d122695b3f7b56b5 (diff) | |
download | torouter-live-eddf79ba816ed061c6e2e70558f9a62c9191467c.tar.gz torouter-live-eddf79ba816ed061c6e2e70558f9a62c9191467c.zip |
WIP: more torouter-ish image, boots with care
Diffstat (limited to 'config')
-rw-r--r-- | config/archives/torproject.key | bin | 0 -> 6624 bytes | |||
-rw-r--r-- | config/archives/torproject.list | 3 | ||||
-rw-r--r-- | config/binary | 10 | ||||
-rw-r--r-- | config/chroot | 2 | ||||
-rw-r--r-- | config/common | 2 | ||||
-rwxr-xr-x | config/hooks/kernel-image.sh.binary | 27 | ||||
-rwxr-xr-x | config/hooks/kernel-image.sh.chroot | 26 | ||||
-rw-r--r-- | config/includes.chroot/etc/hostname | 1 | ||||
-rw-r--r-- | config/includes.chroot/etc/inittab | 71 | ||||
-rw-r--r-- | config/package-lists/debian.list.chroot | 50 | ||||
-rw-r--r-- | config/package-lists/dreamplug.list.chroot | 4 | ||||
-rw-r--r-- | config/package-lists/torouter.list.chroot | 1 | ||||
-rw-r--r-- | config/package-lists/torproject.list.chroot | 8 |
13 files changed, 197 insertions, 8 deletions
diff --git a/config/archives/torproject.key b/config/archives/torproject.key Binary files differnew file mode 100644 index 0000000..f2505d0 --- /dev/null +++ b/config/archives/torproject.key diff --git a/config/archives/torproject.list b/config/archives/torproject.list new file mode 100644 index 0000000..55935ca --- /dev/null +++ b/config/archives/torproject.list @@ -0,0 +1,3 @@ +deb [arch=armel] http://deb.torproject.org/torproject.org/ wheezy main +deb-src http://deb.torproject.org/torproject.org/ wheezy main + diff --git a/config/binary b/config/binary index d8f2969..27e0043 100644 --- a/config/binary +++ b/config/binary @@ -14,7 +14,7 @@ LB_APT_INDICES="true" # $LB_BOOTAPPEND_LIVE: set boot parameters # (Default: empty) -LB_BOOTAPPEND_LIVE="boot=live config quiet splash" +LB_BOOTAPPEND_LIVE="boot=live config username=torouter" # $LB_BOOTAPPEND_INSTALL: set boot parameters # (Default: empty) @@ -78,16 +78,16 @@ LB_HDD_SIZE="10000" LB_ISO_APPLICATION="Debian Live" # $LB_ISO_PREPARER: set iso preparer -# (Default: live-build 3.0~a67-1; http://packages.qa.debian.org/live-build) -LB_ISO_PREPARER="live-build 3.0~a67-1; http://packages.qa.debian.org/live-build" +# (Default: live-build $VERSION; http://packages.qa.debian.org/live-build) +LB_ISO_PREPARER="live-build $VERSION; http://packages.qa.debian.org/live-build" # $LB_ISO_PUBLISHER: set iso publisher # (Default: Debian Live project; http://live.debian.net/; debian-live@lists.debian.org) LB_ISO_PUBLISHER="Debian Live project; http://live.debian.net/; debian-live@lists.debian.org" # $LB_ISO_VOLUME: set iso volume (max 32 chars) -# (Default: Debian wheezy 20121112-18:54) -LB_ISO_VOLUME="Debian wheezy 20121112-18:54" +# (Default: Debian wheezy $(date +%Y%m%d-%H:%M)) +LB_ISO_VOLUME="Debian wheezy $(date +%Y%m%d-%H:%M)" # $LB_JFFS2_ERASEBLOCK: set jffs2 eraseblock size # (Default: unset) diff --git a/config/chroot b/config/chroot index 46c5a45..ce1bec2 100644 --- a/config/chroot +++ b/config/chroot @@ -22,7 +22,7 @@ LB_INTERACTIVE="false" # $LB_KEYRING_PACKAGES: set keyring packages # (Default: empty) -LB_KEYRING_PACKAGES="debian-archive-keyring" +LB_KEYRING_PACKAGES="debian-archive-keyring deb.torproject.org-keyring" # $LB_LINUX_FLAVOURS: set kernel flavour to use # (Default: autodetected) diff --git a/config/common b/config/common index 00ee8f0..3ba9d46 100644 --- a/config/common +++ b/config/common @@ -134,5 +134,5 @@ APT_OPTIONS="--yes" APTITUDE_OPTIONS="--assume-yes" DEBOOTSTRAP_OPTIONS="" CDEBOOTSTRAP_OPTIONS="" -GZIP_OPTIONS="-6 --rsyncable" +GZIP_OPTIONS="-6 --rsyncable" ISOHYBRID_OPTIONS="" diff --git a/config/hooks/kernel-image.sh.binary b/config/hooks/kernel-image.sh.binary new file mode 100755 index 0000000..69a3b77 --- /dev/null +++ b/config/hooks/kernel-image.sh.binary @@ -0,0 +1,27 @@ +#!/bin/sh + +set -e + +echo "Mangling kernel..." +cd ./binary +mkdir initrd-repack +cp live/initrd.img-* initrd-repack +(cd initrd-repack ; \ + zcat initrd.img-* | cpio -i ; \ + rm -f conf/param.conf ; \ + find . | cpio --quiet -o -H newc | \ + gzip -9 > initrd.img ; \ + cd ..) + +cp initrd-repack/initrd.img live/initrd.img +rm -rf initrd-repack + +(cd live; \ + cp ../usr/lib/linux-image-*/kirkwood-dreamplug.dtb dtb ; \ + cat vmlinuz-* dtb >> temp-kernel ; \ + mkimage -A arm -O linux -T kernel -n "Debian kernel (unknown version)" \ + -C none -a 0x8000 -e 0x8000 -d temp-kernel uImage ; \ + rm -f temp-kernel ; \ + mkimage -A arm -O linux -T ramdisk -C gzip -a 0x0 -e 0x0 \ + -n "Debian ramdisk (unknown version)" \ + -d initrd.img uInitrd ) diff --git a/config/hooks/kernel-image.sh.chroot b/config/hooks/kernel-image.sh.chroot new file mode 100755 index 0000000..28b7f44 --- /dev/null +++ b/config/hooks/kernel-image.sh.chroot @@ -0,0 +1,26 @@ +#!/bin/sh + +set -e + +# TODO: this seems to be a null-op... flash-kernel is symlinked to `true`? +echo "Trying to flashing kernel..." +/usr/sbin/flash-kernel || echo "Failed to flash kernel! Don't worry, will mangle" + +echo "Mangling kernel..." +mkdir /tmp/initrd-repack +(cd /tmp/initrd-repack ; \ + zcat /boot/initrd.img-* | cpio -i ; \ + rm -f conf/param.conf ; \ + find . | cpio --quiet -o -H newc | \ + gzip -9 > /boot/initrd.img) +rm -rf /tmp/initrd-repack + +(cd /boot ; \ + cp /usr/lib/linux-image-*/kirkwood-dreamplug.dtb dtb ; \ + cat vmlinuz-* dtb >> temp-kernel ; \ + mkimage -A arm -O linux -T kernel -n "Debian kernel (unknown version)" \ + -C none -a 0x8000 -e 0x8000 -d temp-kernel uImage ; \ + rm -f temp-kernel ; \ + mkimage -A arm -O linux -T ramdisk -C gzip -a 0x0 -e 0x0 \ + -n "Debian ramdisk (unknown version)" \ + -d initrd.img uInitrd ) diff --git a/config/includes.chroot/etc/hostname b/config/includes.chroot/etc/hostname new file mode 100644 index 0000000..a4a2962 --- /dev/null +++ b/config/includes.chroot/etc/hostname @@ -0,0 +1 @@ +torouter diff --git a/config/includes.chroot/etc/inittab b/config/includes.chroot/etc/inittab new file mode 100644 index 0000000..483d42a --- /dev/null +++ b/config/includes.chroot/etc/inittab @@ -0,0 +1,71 @@ +# /etc/inittab: init(8) configuration. +# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $ + +# The default runlevel. +id:2:initdefault: + +# Boot-time system configuration/initialization script. +# This is run first except when booting in emergency (-b) mode. +si::sysinit:/etc/init.d/rcS + +# What to do in single-user mode. +~~:S:wait:/sbin/sulogin + +# /etc/init.d executes the S and K scripts upon change +# of runlevel. +# +# Runlevel 0 is halt. +# Runlevel 1 is single-user. +# Runlevels 2-5 are multi-user. +# Runlevel 6 is reboot. + +l0:0:wait:/etc/init.d/rc 0 +l1:1:wait:/etc/init.d/rc 1 +l2:2:wait:/etc/init.d/rc 2 +l3:3:wait:/etc/init.d/rc 3 +l4:4:wait:/etc/init.d/rc 4 +l5:5:wait:/etc/init.d/rc 5 +l6:6:wait:/etc/init.d/rc 6 +# Normally not reached, but fallthrough in case of emergency. +z6:6:respawn:/sbin/sulogin + +# What to do when CTRL-ALT-DEL is pressed. +ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now + +# Action on special keypress (ALT-UpArrow). +#kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work." + +# What to do when the power fails/returns. +pf::powerwait:/etc/init.d/powerfail start +pn::powerfailnow:/etc/init.d/powerfail now +po::powerokwait:/etc/init.d/powerfail stop + +# /sbin/getty invocations for the runlevels. +# +# The "id" field MUST be the same as the last +# characters of the device (after "tty"). +# +# Format: +# <id>:<runlevels>:<action>:<process> +# +# Note that on most Debian systems tty7 is used by the X Window System, +# so if you want to add more getty's go ahead but skip tty7 if you run X. +# +1:2345:respawn:/sbin/getty 38400 tty1 +#2:23:respawn:/sbin/getty 38400 tty2 +#3:23:respawn:/sbin/getty 38400 tty3 +#4:23:respawn:/sbin/getty 38400 tty4 +#5:23:respawn:/sbin/getty 38400 tty5 +#6:23:respawn:/sbin/getty 38400 tty6 + +# Example how to put a getty on a serial line (for a terminal) +# +#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100 +#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100 + +# Example how to put a getty on a modem line. +# +#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3 + +#T0:2345:respawn:/sbin/getty -L ttyS0 115200 linux +T0:12345:respawn:/sbin/getty -L ttyS0 115200 vt100 diff --git a/config/package-lists/debian.list.chroot b/config/package-lists/debian.list.chroot new file mode 100644 index 0000000..f5cfcfd --- /dev/null +++ b/config/package-lists/debian.list.chroot @@ -0,0 +1,50 @@ +base-files +netbase +openssh-server +zile +wget +iproute +net-tools +hostname +module-init-tools +wget +resolvconf +udev +isc-dhcp-client +ifupdown +devio +initramfs-tools +uboot-mkimage +parted +dosfstools +apt +iputils-ping +haveged +python +pandoc +python-simplejson +make +dialog +locales-all +uaputl +uapevent +dnsmasq +iptables +vim-nox +less +screen +lsof +tcptraceroute +traceroute +mtr-tiny +openntpd +dnsmasq +python-augeas +python-flask +python-daemon +cron +iw +python-setuptools +apt-utils +dnsutils +torsocks diff --git a/config/package-lists/dreamplug.list.chroot b/config/package-lists/dreamplug.list.chroot new file mode 100644 index 0000000..1757229 --- /dev/null +++ b/config/package-lists/dreamplug.list.chroot @@ -0,0 +1,4 @@ +flash-kernel +u-boot-tools +u-boot +wireless-tools diff --git a/config/package-lists/torouter.list.chroot b/config/package-lists/torouter.list.chroot index f027e0d..e69de29 100644 --- a/config/package-lists/torouter.list.chroot +++ b/config/package-lists/torouter.list.chroot @@ -1 +0,0 @@ -vim diff --git a/config/package-lists/torproject.list.chroot b/config/package-lists/torproject.list.chroot new file mode 100644 index 0000000..5e3ea03 --- /dev/null +++ b/config/package-lists/torproject.list.chroot @@ -0,0 +1,8 @@ +tor +tor-geoipdb +libnatpmp-dev +libnatpmp1 +libminiupnpc-dev +libminiupnpc5 +tor-arm +python-torctl |