-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b9b1f6
commit 74551c4
Showing
65 changed files
with
1,570 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
binary/ | ||
binary*.iso | ||
binary*.img | ||
binary*.tar* | ||
binary*.contents | ||
binary*.packages | ||
binary*.zsync | ||
|
||
.build/ | ||
build.log | ||
|
||
cache/ | ||
|
||
chroot/ | ||
chroot.packages.* | ||
|
||
config/binary | ||
config/bootstrap | ||
config/chroot | ||
config/common | ||
config/source | ||
|
||
config/control | ||
|
||
source/ | ||
source*.iso | ||
source*.img | ||
source*.tar* | ||
source*.contents | ||
source*.packages | ||
source*.zsync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
Debian UWA ICPC Contestant Environment | ||
====================================== | ||
|
||
Summary | ||
------- | ||
|
||
This Debain Live USB configuration is based on the Debian xfce-desktop configuration available at <http://live.debian.net/gitweb/?p=live-images.git>. The main changes are: | ||
|
||
* Disable installer and root access. | ||
* Install compilers, interpreters and editors required for the competition. | ||
* Remove unneeded software to safe space. | ||
|
||
Full details of the changes can be made by downloading the xfce-desktop configuration and using `diff`. | ||
|
||
`auto/config` | ||
------------- | ||
|
||
This is a script that runs `lb config` and auto-generates most of the configuration files in `config/`. Main changes: | ||
|
||
* Disable building source ISO. | ||
* Disable memtest. | ||
* Change apt to aptitude (allows removing unneeded software). | ||
* Append boot parameters to: | ||
* Disable Debian installer. | ||
* Change hostname and username. | ||
* Change timezone. | ||
* Disable root access. | ||
|
||
See `man lb config` for documentation on the `lb config` command and its options. | ||
|
||
`config/bootloaders` | ||
-------------------- | ||
|
||
These are syslinux configuration files that determine the options in the bootloader. Main changes: | ||
|
||
* Set a timeout. | ||
* Disable menu items for failsafe live environment, installer, and advanced options. | ||
* Immediately boot live environment. | ||
* Disable editing boot options. | ||
|
||
`config/package-lists` | ||
---------------------- | ||
|
||
These are lists of packages to be installed. Main changes: | ||
|
||
* Remove installer. | ||
* Remove unneeded desktop software (e.g. libreoffice). | ||
* Install programming languages for competition. | ||
* Install editors and IDEs. | ||
|
||
The `icpc-contestant.list.chroot` and `icpc-languages.list.chroot` comprise the main changes relative to the base Debian install. | ||
|
||
Additional software can be installed by adding to the lists here. | ||
|
||
`config/includes.chroot` | ||
------------------------ | ||
|
||
These are files to be included in the Live USB environment. They are added after the packages in `config/package-lists` are installed, and will overwrite any files that are already present. Main additions: | ||
|
||
* Desktop shortcuts to DOMjudge server and on-the-day resources. | ||
* XFCE configuration file to hide filesystem desktop shortcuts (i.e. filesystems belonging to the computer the Live USB is booting off) | ||
|
||
Additional files could be added here to, e.g. configure firewall rules or printing services. | ||
|
||
`config/hooks` | ||
-------------- | ||
|
||
These are scripts that are run after the packages in `config/package-lists` are installed and the files in `config/includes.chroot` are added. Main addition: | ||
|
||
* Run `update-alternatives` to set the default Java VM and compiler to Java 7. | ||
|
||
Additional scripts could be added here to, e.g. configure firewall rules or printing services. | ||
|
||
Building an image | ||
----------------- | ||
|
||
To build an image: | ||
|
||
# lb build | ||
|
||
The image will be saved as `binary.hybrid.iso`. This image is ready to be burned to a CD or copied to a USB device. | ||
|
||
To clean up after a previous build: | ||
|
||
# lb clean | ||
|
||
This will remove the chroot environment and some cache files, but keep the package cache (i.e. downloaded .deb files) so they don't need to be downloaded again. | ||
|
||
Creating a Live USB with persistence | ||
------------------------------------ | ||
|
||
Divide a USB stick into two partitions: | ||
|
||
1. A FAT32 partition to store the read-only Live USB environment. Size accordingly. | ||
2. An ext4 partition to store persistent data. The label for the partition must be `persistence`. | ||
|
||
Use an appropriate tool to create a bootable Live USB using the first partition, e.g. unetbootin (Linux) or Universal USB Installer (Windows). One the bootable Live USB is created, on the Live USB partition edit the file `isolinux/live.cfg` and add the `persistence` option to the end of the `append` line. | ||
|
||
On the root of the persistence partition, create a file called `persistence.conf`. This configures which directories on the Live USB will be persistent. See `man persistence.conf` for more details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
This is the configuration tree for: | ||
|
||
Debian UWA ICPC Contestant Environment | ||
|
||
A software called live-build can be used to automatically build images from | ||
this configuration tree. | ||
|
||
live-build can be obtained from <http://live-systems.org/devel/live-build/>. | ||
On Debian based systems, live-build can be installed with: | ||
|
||
# apt-get install live-build | ||
|
||
live-build can be used to build this image with the following command executed | ||
in this directory:: | ||
|
||
# lb build | ||
|
||
More information about live-build and the Live Systems project can be found on | ||
its homepage at <http://live-systems.org/> and in the manual at | ||
<http://live-systems.org/manual/>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
debian-uwa-icpc-contestant-env | ||
============================== | ||
|
||
This is the configuration tree for: | ||
|
||
Debian UWA ICPC Contestant Environment | ||
|
||
A software called live-build can be used to automatically build images from | ||
this configuration tree. | ||
|
||
live-build can be obtained from <http://live-systems.org/devel/live-build/>. | ||
On Debian based systems, live-build can be installed with: | ||
|
||
# apt-get install live-build | ||
|
||
live-build can be used to build this image with the following command executed | ||
in this directory:: | ||
|
||
# lb build | ||
|
||
More information about live-build and the Live Systems project can be found on | ||
its homepage at <http://live-systems.org/> and in the manual at | ||
<http://live-systems.org/manual/>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
lb build noauto "${@}" 2>&1 | tee build.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
lb clean noauto "${@}" | ||
|
||
rm -f config/binary config/bootstrap config/chroot config/common config/source | ||
rm -f config/control | ||
|
||
rm -f build.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
case "$(dpkg --print-architecture)" in | ||
amd64) | ||
_LINUX_FLAVOURS="amd64" | ||
_SOURCE="false" | ||
;; | ||
|
||
i386) | ||
_LINUX_FLAVOURS="486 686-pae" | ||
_SOURCE="false" | ||
;; | ||
esac | ||
|
||
lb config noauto \ | ||
--clean \ | ||
--ignore-system-defaults \ | ||
--mode debian \ | ||
--debian-installer false \ | ||
--memtest none \ | ||
--apt aptitude \ | ||
--bootappend-live "boot=live noconfig=debian-installer-launcher quiet splash live-config.hostname=contestant live-config.username=contestant live-config.user-fullname=Contestant live-config.timezone=Australia/Perth live-config.noroot" \ | ||
--linux-flavours "${_LINUX_FLAVOURS}" \ | ||
--linux-packages "linux-image linux-headers" \ | ||
--source "${_SOURCE}" \ | ||
"${@}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
include menu.cfg | ||
default live-amd64 | ||
prompt 0 | ||
timeout 1 | ||
noescape 1 | ||
allowoptions 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/usr/lib/syslinux/hdt.c32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/usr/lib/syslinux/ldlinux.c32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/usr/lib/syslinux/libcom32.c32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/usr/lib/syslinux/libutil.c32 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
label live-@FLAVOUR@ | ||
menu label ^Live (@FLAVOUR@) | ||
menu default | ||
linux @LINUX@ | ||
initrd @INITRD@ | ||
append @APPEND_LIVE@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
menu hshift 7 | ||
menu width 60 | ||
|
||
menu title Boot menu | ||
include stdmenu.cfg | ||
include live.cfg | ||
|
||
menu clear |
Oops, something went wrong.