Maintenance scripts and documentation for a live USB image meant for use with http://mooc.fi/.
The image files may be downloaded here.
make -C src
make -C chrooter
If you're on a 64-bit system, your compiler must be able to generate i386 executables.
You may need to install gcc-multilib
on Debian-derivatives.
The image is based on 32-bit Linux Mint 13 and lives in a raw disk file, including the partition table. The system is assumed to be installed on a single ext2/3 partition that is marked bootable.
Edit the image under QEMU with a command like
qemu-system-i386 -hda images/current.img -m 512M -net user -net nic
# (shorthand `run-qemu.sh`)
See here for more options.
Installing and configuring the swapspace
package is recommended, since the scripts currently don't
support swap partitions.
Mounts the image and
- removes bash history
- removes
.ssh/known_hosts
- clears recently opened documents
- clears Firefox cache, cookies, history and downloads (but not settings)
- clears .cache
- clears
/tmp
and/var/tmp
- clears apt's package cache
- removes the TMC plugin's settings
Must be run as root since it needs to mount the image. Requires ruby, sqlite3 and parted 3.x.
Runs zerofree on the image to increase its compressability.
Usage:
release.sh version-number
Compresses images/current.img
to images/version-number.img.gz
and sets images/latest.img.gz
to point to it.
Set RSYNC_DEST to something like user@server:/path/to/webdir/
in settings.sh
or on the shell.
Then call this. It will sync everything under images/
except for current.img
.
Installs an initrd component that resizes the root fs partition and file system on boot.
Usage: grow-image.sh [--img-only] <new_size>
Grows the size of the image, and, unless --img-only
is specified,
the partition on it and the file system on the partition.
The size should be given with a size suffix, e.g. "7G" for seven gigs.
Requires ruby and parted 3.x. Must be run as root since it currently uses a loopback device to resize the FS.
Resizes the root FS to be as small as possible.
It's recommended to run clean-image.sh
and zerofree.sh
first.
Requires ruby and parted 3.x. Must be run as root since it currently uses a loopback device to resize the FS.
- clean-image.sh
- zerofree.sh
- install-root-resizer.sh
- shrink-image.sh
- release.sh
- grow-image.sh 7G (to make the image usable in a VM again)
- test the image in a VM one more time
- rsync.sh