summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2010-10-01 07:51:26 -0500
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2010-10-01 07:51:26 -0500
commit78a59fba0e1e5b7023370e4c6c9df2f5a4427d42 (patch)
tree7ec010a7119703c6488e3a43e4b4d461863519f4
parente9b21388759cffbdc62d5e02c2a19a1fc6047d53 (diff)
parent91e49037236e65fa567bc26ca501e2ed30857be0 (diff)
Merge branch 'master' of parabolagnulinux.org:~/projects/parabola-archiso
-rw-r--r--Makefile90
-rw-r--r--boot-files/releasenotes.txt4
-rw-r--r--boot-files/splash.pngbin0 -> 5445 bytes
-rw-r--r--boot-files/syslinux/syslinux.cfg69
-rwxr-xr-xdownload-repo.sh66
-rw-r--r--instructions36
-rw-r--r--isomounts12
-rw-r--r--mkinitcpio.conf6
-rwxr-xr-xoverlay/arch/setup3
-rw-r--r--overlay/etc/arch-release1
-rw-r--r--overlay/etc/archiso/functions12
-rw-r--r--overlay/etc/archiso/getshell9
-rw-r--r--overlay/etc/fstab7
-rw-r--r--overlay/etc/hosts8
-rw-r--r--overlay/etc/issue5
-rw-r--r--overlay/etc/motd13
-rw-r--r--overlay/etc/pacman.conf84
-rw-r--r--overlay/etc/pam.d/su6
-rw-r--r--overlay/etc/rc.conf25
-rwxr-xr-xoverlay/etc/rc.d/archiso96
-rw-r--r--overlay/etc/sudoers2
-rwxr-xr-xoverlay/usr/bin/km2
-rw-r--r--packages.i68636
-rw-r--r--packages.x86_6437
24 files changed, 629 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..0ca9b4c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,90 @@
+ver=$(shell date +%Y.%m.%d)
+
+WORKDIR=work
+
+ARCH?=$(shell uname -m)
+
+PWD=$(shell pwd)
+NETname=$(PWD)/parabola-$(ver)-netinstall-$(ARCH).iso
+COREname=$(PWD)/parabola-$(ver)-core-$(ARCH).iso
+
+PACKAGES="$(shell cat packages.$(ARCH))"
+
+kver_FILE=$(WORKDIR)/root-image/etc/mkinitcpio.d/kernel26.kver
+
+all: net-iso core-iso
+
+# Rules for each type of image
+core-iso: $(COREname)
+net-iso: $(NETname)
+
+$(COREname): core-pkgs base-fs
+ mkarchiso -v iso $(WORKDIR) $@
+$(NETname): base-fs
+ mkarchiso -v iso $(WORKDIR) $@
+
+# This is the main rule for make the working filesystem.
+base-fs: root-image bootfiles initcpio overlay iso-mounts
+
+
+# Rules for make the root-image for base filesystem.
+root-image: $(WORKDIR)/root-image/.arch-chroot
+$(WORKDIR)/root-image/.arch-chroot:
+ mkarchiso -v -p base create $(WORKDIR)
+ mkarchiso -v -p $(PACKAGES) create $(WORKDIR)
+
+# Rule for make /boot
+bootfiles: root-image
+ mkdir -p $(WORKDIR)/iso/boot
+ cp $(WORKDIR)/root-image/boot/System.map26 $(WORKDIR)/iso/boot/
+ cp $(WORKDIR)/root-image/boot/vmlinuz26 $(WORKDIR)/iso/boot/
+ cp $(WORKDIR)/root-image/boot/memtest86+/memtest.bin $(WORKDIR)/iso/boot/memtest
+ cp $(WORKDIR)/root-image/usr/share/licenses/common/GPL2/license.txt $(WORKDIR)/iso/boot/memtest.COPYING
+ cp -r boot-files/* $(WORKDIR)/iso/boot/
+ cp $(WORKDIR)/root-image/usr/lib/syslinux/*.c32 $(WORKDIR)/iso/boot/syslinux/
+ cp $(WORKDIR)/root-image/usr/lib/syslinux/isolinux.bin $(WORKDIR)/iso/boot/syslinux/
+ cp $(WORKDIR)/root-image/usr/lib/syslinux/memdisk $(WORKDIR)/iso/boot/syslinux/
+ cp $(WORKDIR)/root-image/usr/lib/syslinux/pxelinux.0 $(WORKDIR)/iso/boot/syslinux/
+ cp $(WORKDIR)/root-image/usr/lib/syslinux/gpxelinux.0 $(WORKDIR)/iso/boot/syslinux/
+ # Add pci.ids and modules.alias for hdt
+ mkdir -p $(WORKDIR)/iso/boot/syslinux/hdt/
+ wget -O - http://pciids.sourceforge.net/v2.2/pci.ids | gzip -9 > $(WORKDIR)/iso/boot/syslinux/hdt/pciids.gz
+ cat $(WORKDIR)/root-image/lib/modules/$(shell grep ^ALL_kver $(kver_FILE) | cut -d= -f2)/modules.alias | gzip -9 > $(WORKDIR)/iso/boot/syslinux/hdt/modalias.gz
+
+# Rules for initcpio images
+initcpio: $(WORKDIR)/iso/boot/archiso.img
+$(WORKDIR)/iso/boot/archiso.img: mkinitcpio.conf $(WORKDIR)/root-image/.arch-chroot
+ mkdir -p $(WORKDIR)/iso/boot
+ mkinitcpio -c ./mkinitcpio.conf -b $(WORKDIR)/root-image -k $(shell grep ^ALL_kver $(kver_FILE) | cut -d= -f2) -g $@
+
+
+# overlay filesystem
+overlay:
+ mkdir -p $(WORKDIR)/overlay/etc/pacman.d
+ cp -r overlay $(WORKDIR)/
+ wget -O $(WORKDIR)/overlay/etc/pacman.d/mirrorlist http://parabolagnulinux.org/mirrorlist
+ sed -i "s/#Server/Server/g" $(WORKDIR)/overlay/etc/pacman.d/mirrorlist
+
+
+# Rule to process isomounts file.
+iso-mounts: $(WORKDIR)/isomounts
+$(WORKDIR)/isomounts: isomounts root-image
+ sed "s|@ARCH@|$(ARCH)|g" isomounts > $@
+
+
+# Rule for make the [core] repo packages
+core-pkgs:
+ ./download-repo.sh core $(WORKDIR)/core-pkgs/src/core/pkg
+
+
+# Clean-up all work
+clean:
+ rm -rf $(WORKDIR) $(NETname) $(COREname)
+
+
+.PHONY: all core-iso net-iso
+.PHONY: base-fs
+.PHONY: root-image bootfiles initcpio overlay iso-mounts
+.PHONY: core-pkgs
+.PHONY: clean
+
diff --git a/boot-files/releasenotes.txt b/boot-files/releasenotes.txt
new file mode 100644
index 0000000..e4eb243
--- /dev/null
+++ b/boot-files/releasenotes.txt
@@ -0,0 +1,4 @@
+Parabola GNU/Linux-libre Live Medium
+ Release Notes
+--------------------------
+* Hi!
diff --git a/boot-files/splash.png b/boot-files/splash.png
new file mode 100644
index 0000000..5179717
--- /dev/null
+++ b/boot-files/splash.png
Binary files differ
diff --git a/boot-files/syslinux/syslinux.cfg b/boot-files/syslinux/syslinux.cfg
new file mode 100644
index 0000000..6880044
--- /dev/null
+++ b/boot-files/syslinux/syslinux.cfg
@@ -0,0 +1,69 @@
+DEFAULT vesamenu.c32
+PROMPT 0
+MENU TITLE Parabola GNU/Linux-libre
+MENU BACKGROUND /boot/splash.png
+TIMEOUT 3000
+
+# TODO: Replace these crappy messages with something useful
+F1 boot.txt
+F2 options.txt
+F3 help.txt
+
+MENU WIDTH 78
+MENU MARGIN 4
+MENU ROWS 5
+MENU VSHIFT 10
+MENU TIMEOUTROW 13
+MENU TABMSGROW 11
+MENU CMDLINEROW 11
+MENU HELPMSGROW 16
+MENU HELPMSGENDROW 29
+
+# Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu
+
+MENU COLOR border 30;44 #40ffffff #a0000000 std
+MENU COLOR title 1;36;44 #9033ccff #a0000000 std
+MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
+MENU COLOR unsel 37;44 #50ffffff #a0000000 std
+MENU COLOR help 37;40 #c0ffffff #a0000000 std
+MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std
+MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
+MENU COLOR msg07 37;40 #90ffffff #a0000000 std
+MENU COLOR tabmsg 31;40 #30ffffff #00000000 std
+
+LABEL arch
+TEXT HELP
+Boot the Parabola GNU/Linux-libre live medium. It allows you to
+install a libre Arch Linux or perform system maintenance.
+ENDTEXT
+MENU LABEL Boot Parabola GNU/Linux-libre
+KERNEL /boot/vmlinuz26
+APPEND initrd=/boot/archiso.img archisolabel=XXX rw_branch_size=75% locale=en_US.UTF-8
+# Next line should be uncommented when prepare enviroment to boot from PXE.
+#IPAPPEND 3
+
+LABEL existing
+TEXT HELP
+Boot an existing operating system. Press TAB to edit the disk and partition
+number to boot.
+ENDTEXT
+MENU LABEL Boot existing OS
+KERNEL chain.c32
+APPEND hd0 0
+
+# http://www.memtest.org/
+LABEL memtest
+MENU LABEL Run Memtest86+ (RAM test)
+KERNEL /boot/memtest
+
+# http://hdt-project.org/
+LABEL hdt
+MENU LABEL Hardware Information (HDT)
+KERNEL hdt.c32
+APPEND modules_alias=hdt/modalias.gz pciids=hdt/pciids.gz
+
+LABEL reboot
+MENU LABEL Reboot
+KERNEL reboot.c32
+
+ONTIMEOUT arch
diff --git a/download-repo.sh b/download-repo.sh
new file mode 100755
index 0000000..8655a8d
--- /dev/null
+++ b/download-repo.sh
@@ -0,0 +1,66 @@
+#!/bin/sh
+# This script downloads a entire pacman repo to a dir
+# using the locally configured best mirror.
+#
+# Copyright (c) 2009 Aaron Griffin <aaronmgriffin@gmail.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+REPO="$1"
+DEST="$2"
+
+REPO_CHANGED=n
+
+if [ -z "$REPO" -o -z "$DEST" ]; then
+ echo "usage: $(basename $0) <reponame> <dest-dir>"
+ exit 1
+fi
+
+if [ $EUID -ne 0 ]; then
+ echo "This script must be run as root (for pacman -Sp)"
+ exit 1
+fi
+
+[ -d "$DEST" ] || mkdir -p "$DEST"
+
+#update repos
+/usr/bin/pacman -Sy
+
+#Ensure we have core/pkgname format, so we don't get crap from other repos
+PKGS=$(/usr/bin/pacman -Sl $REPO | cut -d' ' -f1,2 | tr ' ' '/')
+
+if [ -n "$PKGS" ]; then
+ baseurl=""
+ cachedir="/var/cache/pacman/pkg"
+ for url in $(/usr/bin/pacman -Sdp $PKGS | grep '://'); do
+ baseurl="$(dirname "$url")" #save for later
+ pkgname="$(basename "$url")"
+ cachedpkg="$cachedir/$pkgname"
+ if [ ! -e "$DEST/$pkgname" ]; then
+ if [ -e "$cachedpkg" ]; then
+ cp -v "$cachedpkg" "$DEST/$pkgname"
+ REPO_CHANGED=y
+ else
+ wget -nv "$url" -O "$DEST/$pkgname"
+ REPO_CHANGED=y
+ fi
+ fi
+ done
+ if [ "$REPO_CHANGED" = "y" ]; then
+ wget -nv "$baseurl/$REPO.db.tar.gz" -O "$DEST/$REPO.db.tar.gz"
+ fi
+else
+ echo "No packages to download... what'd you break?"
+ exit 1
+fi
diff --git a/instructions b/instructions
new file mode 100644
index 0000000..5998788
--- /dev/null
+++ b/instructions
@@ -0,0 +1,36 @@
+ Arch Linux
+ Installation and Live-CDs
+ ----------------------------
+
+All images give you a live console environment in which you can do
+a manual or automatic installation and which can be used as maintenance and rescue systems.
+
+All iso files can also be written to hard disks/usbkeys.
+
+Flavors:
+--------
+Netinstall images are the preferred install media for Arch Linux.
+You can always get up to date packages using these media.
+Core images contain a snapshot of the core repository, which makes them ideal
+for offline installations when no Internet access is available
+to install the base system. (you can do a netinstall with these also)
+
+Both come in i686, x86_64 or dual variant. The latter contains both and lets you choose
+an architecture at boot.
+
+How to obtain and use these installation images:
+-------------------------------------
+Torrents are preferred (they are webseed enabled), but you can also just get the images
+from an Arch mirror.
+
+The Official Arch Linux Install Guide gives you more info:
+ http://wiki.archlinux.org/index.php/Official_Arch_Linux_Install_Guide
+
+More info / getting in touch:
+----------------------------
+http://bugs.archlinux.org/
+http://mailman.archlinux.org/mailman/listinfo/arch-releng
+
+Happy installing!
+Happy ARCHing!
+- Arch Linux Release Engineering team
diff --git a/isomounts b/isomounts
new file mode 100644
index 0000000..6998f3b
--- /dev/null
+++ b/isomounts
@@ -0,0 +1,12 @@
+# archiso isomounts file
+# img - location of image/directory to mount relative to addons directory
+# arch - architecture of this image
+# mount point - absolute location on the post-initrd root
+# type - either 'bind' or 'squashfs' for now
+
+# syntax: <img> <arch> <mount point> <type>
+
+# ORDER MATTERS! Files take top-down precedence. Be careful
+overlay.sqfs @ARCH@ / squashfs
+core-pkgs.sqfs @ARCH@ / squashfs
+root-image.sqfs @ARCH@ / squashfs
diff --git a/mkinitcpio.conf b/mkinitcpio.conf
new file mode 100644
index 0000000..15097c0
--- /dev/null
+++ b/mkinitcpio.conf
@@ -0,0 +1,6 @@
+# vim:set ft=sh
+MODULES=""
+BINARIES=""
+FILES=""
+HOOKS="base udev memdisk archiso archiso_pxe_nbd pata scsi sata usb fw pcmcia filesystems usbinput"
+COMPRESSION="lzma"
diff --git a/overlay/arch/setup b/overlay/arch/setup
new file mode 100755
index 0000000..e9d1660
--- /dev/null
+++ b/overlay/arch/setup
@@ -0,0 +1,3 @@
+#!/bin/sh
+#
+aif -p interactive
diff --git a/overlay/etc/arch-release b/overlay/etc/arch-release
new file mode 100644
index 0000000..153f8b2
--- /dev/null
+++ b/overlay/etc/arch-release
@@ -0,0 +1 @@
+Arch Linux Live ISO
diff --git a/overlay/etc/archiso/functions b/overlay/etc/archiso/functions
new file mode 100644
index 0000000..fdd48f4
--- /dev/null
+++ b/overlay/etc/archiso/functions
@@ -0,0 +1,12 @@
+# vim: set ft=sh:
+
+cmdline_param ()
+{
+ for param in ${CMDLINE}; do
+ case "${param}" in
+ $1=*) echo "${param##*=}"; return ;;
+ *) continue ;;
+ esac
+ done
+ [ -n "${2}" ] && echo "${2}"
+}
diff --git a/overlay/etc/archiso/getshell b/overlay/etc/archiso/getshell
new file mode 100644
index 0000000..a6f8775
--- /dev/null
+++ b/overlay/etc/archiso/getshell
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+. /etc/archiso/functions
+
+shell="$(cmdline_param shell)"
+[ -n "${shell}" ] && shell="/bin/bash"
+[ ! -e "${shell}" ] && shell="/bin/sh"
+
+exec ${shell}
diff --git a/overlay/etc/fstab b/overlay/etc/fstab
new file mode 100644
index 0000000..3c43a5e
--- /dev/null
+++ b/overlay/etc/fstab
@@ -0,0 +1,7 @@
+# /etc/fstab: static file system information
+# <file system> <dir> <type> <options> <dump> <pass>
+aufs / aufs noauto 0 0
+none /dev/pts devpts defaults 0 0
+none /dev/shm tmpfs defaults 0 0
+
+### Auto generated entries get added here:
diff --git a/overlay/etc/hosts b/overlay/etc/hosts
new file mode 100644
index 0000000..b6f25e3
--- /dev/null
+++ b/overlay/etc/hosts
@@ -0,0 +1,8 @@
+#
+# /etc/hosts: static lookup table for host names
+#
+
+#<ip-address> <hostname.domain.org> <hostname>
+127.0.0.1 localhost.localdomain localhost archiso
+
+# End of file
diff --git a/overlay/etc/issue b/overlay/etc/issue
new file mode 100644
index 0000000..ce82e88
--- /dev/null
+++ b/overlay/etc/issue
@@ -0,0 +1,5 @@
+
+Arch Linux Live ISO (\l)
+\s-\r \m.
+Default logins "root" and "arch" have no password.
+To begin installation, login as root.
diff --git a/overlay/etc/motd b/overlay/etc/motd
new file mode 100644
index 0000000..00e4775
--- /dev/null
+++ b/overlay/etc/motd
@@ -0,0 +1,13 @@
+**************************************************************
+* To begin installation, run /arch/setup *
+* You can find documentation at *
+* /usr/share/aif/docs/official_installation_guide_en *
+* *
+* i18n: Use the 'km' utility to change your keyboard layout *
+* and console font. *
+* *
+* If you are looking to install Arch on something more *
+* exotic, such as your kerosene-powered cheese grater, *
+* please consult http://wiki.archlinux.org. *
+* *
+**************************************************************
diff --git a/overlay/etc/pacman.conf b/overlay/etc/pacman.conf
new file mode 100644
index 0000000..911c23d
--- /dev/null
+++ b/overlay/etc/pacman.conf
@@ -0,0 +1,84 @@
+#
+# /etc/pacman.conf
+#
+# See the pacman.conf(5) manpage for option and repository directives
+
+#
+# GENERAL OPTIONS
+#
+[options]
+# The following paths are commented out with their default values listed.
+# If you wish to use different paths, uncomment and update the paths.
+#RootDir = /
+#DBPath = /var/lib/pacman/
+#CacheDir = /var/cache/pacman/pkg/
+#LogFile = /var/log/pacman.log
+HoldPkg = pacman glibc
+# If upgrades are available for these packages they will be asked for first
+SyncFirst = pacman
+#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
+#XferCommand = /usr/bin/curl -C - %u > %o
+#CleanMethod = KeepInstalled
+Architecture = auto
+
+# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
+#IgnorePkg =
+#IgnoreGroup =
+
+#NoUpgrade =
+#NoExtract =
+
+# Misc options (all disabled by default)
+#UseSyslog
+#ShowSize
+#UseDelta
+#TotalDownload
+
+#
+# REPOSITORIES
+# - can be defined here or included from another file
+# - pacman will search repositories in the order defined here
+# - local/custom mirrors can be added here or in separate files
+# - repositories listed first will take precedence when packages
+# have identical names, regardless of version number
+# - URLs will have $repo replaced by the name of the current repo
+# - URLs will have $arch replaced by the name of the architecture
+#
+# Repository entries are of the format:
+# [repo-name]
+# Server = ServerName
+# Include = IncludePath
+#
+# The header [repo-name] is crucial - it must be present and
+# uncommented to enable the repo.
+#
+
+# The testing repositories are disabled by default. To enable, uncomment the
+# repo name header and Include lines. You can add preferred servers immediately
+# after the header, and they will be used before the default mirrors.
+
+#[testing]
+## Add your preferred servers here, they will be used first
+#Include = /etc/pacman.d/mirrorlist
+
+[core]
+# Add your preferred servers here, they will be used first
+Include = /etc/pacman.d/mirrorlist
+
+[extra]
+# Add your preferred servers here, they will be used first
+Include = /etc/pacman.d/mirrorlist
+
+#[community-testing]
+## Add your preferred servers here, they will be used first
+#Include = /etc/pacman.d/mirrorlist
+
+[community]
+# Add your preferred servers here, they will be used first
+Include = /etc/pacman.d/mirrorlist
+
+# An example of a custom package repository. See the pacman manpage for
+# tips on creating your own repositories.
+#[custom]
+#Server = file:///home/custompkgs
+
diff --git a/overlay/etc/pam.d/su b/overlay/etc/pam.d/su
new file mode 100644
index 0000000..a291042
--- /dev/null
+++ b/overlay/etc/pam.d/su
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth sufficient pam_rootok.so
+auth sufficient pam_wheel.so trust use_uid
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
diff --git a/overlay/etc/rc.conf b/overlay/etc/rc.conf
new file mode 100644
index 0000000..ff18456
--- /dev/null
+++ b/overlay/etc/rc.conf
@@ -0,0 +1,25 @@
+#
+# /etc/rc.conf - Main Configuration for Arch Linux
+
+. /etc/archiso/functions
+
+LOCALE_DEFAULT="en_US.UTF-8"
+CLOCK_DEFAULT=""
+TIMEZONE_DEFAULT=""
+KEYMAP_DEFAULT="us"
+
+LOCALE="$(cmdline_param locale ${LOCALE_DEFAULT})"
+HARDWARECLOCK="$(cmdline_param clock ${CLOCK_DEFAULT})"
+TIMEZONE="$(cmdline_param timezone ${TIMEZONE_DEFAULT})"
+KEYMAP="$(cmdline_param keymap ${KEYMAP_DEFAULT})"
+CONSOLEFONT="$(cmdline_param consolefont)"
+CONSOLEMAP="$(cmdline_param consolemap)"
+USECOLOR="yes"
+
+MOD_AUTOLOAD="yes"
+
+HOSTNAME="archiso"
+
+#TODO add more auto-daemons here, especially the live-cd specific stuff
+DAEMONS=(syslog-ng network archiso)
+#TODO: auto-network find-disks find-user-home
diff --git a/overlay/etc/rc.d/archiso b/overlay/etc/rc.d/archiso
new file mode 100755
index 0000000..435152a
--- /dev/null
+++ b/overlay/etc/rc.d/archiso
@@ -0,0 +1,96 @@
+# vim: set ft=sh:
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/archiso/functions
+
+
+scan_network ()
+{
+ netparam () { echo ${2} | sed "s|.*${1}\([^ ]*\).*|\1|gi"; }
+ #
+ netdevs=$(cat /proc/net/dev | grep ':' | cut -d':' -f1)
+ for net in ${netdev}; do
+ stats=$(ifconfig ${net} | tr -s "\n" " ")
+ done
+}
+
+scan_mount_pts ()
+{
+ #iterate over all block devices
+ stat_busy "Scanning local block devices"
+ for dev in $(echo /sys/block/*/dev /sys/block/*/*/dev); do
+
+ devname="/dev/$(echo ${dev} | cut -d'/' -f3,4 | cut -d'/' -f1)"
+ mountpt="/mnt/$(basename '${devname}')"
+ mkdir -p "${mountpt}" 2>/dev/null
+ mount ${options} "${devname}" "${mountpt}" >/dev/null 2>&1
+
+ fstype=$(awk '{ if ($1=="${devname}") { print $3" "$4;q }}' /proc/mounts)
+ fstype="${fstype%%,*}"
+ case "${fstype%% *}" in
+ *fat*|ntfs|*dos) options="user,exec,uid=0,gid=100,umask=00070" ;;
+ *) options="users,defaults,exec" ;;
+ #TODO handle 'sync' on usb devices...
+ esac
+
+ echo "${devname} ${mountpt} ${fstype} ${options} 0 0 #configured by archiso" >>/etc/fstab
+ done
+ stat_done
+}
+
+scan_swap ()
+{
+ #Archie finds a pagefile.sys for windows/dos machines... may add later
+ stat_busy "Finding existing swap partitions"
+ swapdev="$(fdisk -l 2>/dev/null | grep swap | cut -d' ' -f1)"
+ if [ -e "${swapdev}" ]; then
+ swapon ${swapdev}
+ echo "${swapdev} swap swap defaults 0 0 #configured by archiso" >>/etc/fstab
+ fi
+ stat_done
+}
+
+do_homedir ()
+{
+ stat_busy "Scanning for existing HOME directory"
+ user="$(cmdline_param homeuser)"
+ for hdir in $(find /mnt -name "home/${user}" 2>/dev/null); do
+ mkdir -p "/home/arch/"
+ # break after the first success...
+ mount --bind "${hdir}" "/home/arch/" && break
+ done
+ stat_done
+}
+
+do_makeuser ()
+{
+ stat_busy "Making the default user arch"
+ addgroups="audio,disk,optical,wheel"
+ useradd -m -p "" -g users -G $addgroups arch
+ stat_done
+}
+
+do_locale_gen ()
+{
+ stat_busy "Generating locales..."
+ sed -i "s/#\(${LOCALE/[@.]*}\)/\1/" /etc/locale.gen
+ /usr/sbin/locale-gen > /dev/null
+ stat_done
+}
+
+# GIT does not manage perms others thans 755 and 644, so fix here.
+do_fix_perms ()
+{
+ stat_busy "Fixing file permissions..."
+ chmod 440 /etc/sudoers
+ stat_done
+}
+
+case "$1" in
+ start)
+ do_locale_gen
+ do_makeuser
+ do_fix_perms
+ ;;
+esac
+exit 0
diff --git a/overlay/etc/sudoers b/overlay/etc/sudoers
new file mode 100644
index 0000000..67b20ba
--- /dev/null
+++ b/overlay/etc/sudoers
@@ -0,0 +1,2 @@
+root ALL=(ALL) ALL
+%wheel ALL=(ALL) NOPASSWD: ALL
diff --git a/overlay/usr/bin/km b/overlay/usr/bin/km
new file mode 100755
index 0000000..e24d780
--- /dev/null
+++ b/overlay/usr/bin/km
@@ -0,0 +1,2 @@
+#!/bin/bash
+aif -p partial-keymap
diff --git a/packages.i686 b/packages.i686
new file mode 100644
index 0000000..a06b31a
--- /dev/null
+++ b/packages.i686
@@ -0,0 +1,36 @@
+aif
+aufs2
+aufs2-util
+crda
+ddrescue
+dialog
+dmraid
+dnsutils
+dosfstools
+elinks
+gnu-netcat
+hdparm
+inetutils
+joe
+lftp
+lilo
+memtest86+
+netcfg
+nfs-utils
+nmap
+ntfs-3g
+ntfsprogs
+ntp
+openssh
+openvpn
+parted
+pptpclient
+speedtouch
+squashfs-tools
+syslinux
+tcpdump
+tiacx
+tiacx-firmware
+wireless_tools
+wpa_actiond
+wpa_supplicant
diff --git a/packages.x86_64 b/packages.x86_64
new file mode 100644
index 0000000..f524c9f
--- /dev/null
+++ b/packages.x86_64
@@ -0,0 +1,37 @@
+aif
+aufs2
+aufs2-util
+crda
+ddrescue
+dialog
+dmraid
+dnsutils
+dosfstools
+elinks
+gnu-netcat
+hdparm
+inetutils
+joe
+lftp
+lilo
+memtest86+
+netcfg
+nfs-utils
+nmap
+ntfs-3g
+ntfsprogs
+ntp
+openssh
+openvpn
+parted
+pptpclient
+speedtouch
+squashfs-tools
+syslinux
+tcpdump
+tiacx
+tiacx-firmware
+wireless_tools
+wpa_actiond
+wpa_supplicant
+zd1211-firmware