git-svn-id: http://phraktured.net/archiso@13 00a9fe69-e71b-0410-bb23-df0e5024db41

This commit is contained in:
Aaron Griffin 2006-09-28 02:15:25 +00:00
parent 59ddc5be61
commit c464db5951
16 changed files with 78 additions and 4340 deletions

View File

@ -15,9 +15,8 @@ run_hook ()
squashimg="/tmpfs/bootcd/archlive.sqfs"
/bin/modprobe -q isofs >/dev/null 2>&1
PS1="ramfs$ " /bin/sh -i
for cdrom in /dev/cd/*; do
if mount -r -t isofs "${cdrom}" /tmpfs/bootcd >/dev/null 2>&1; then
if mount -r -t iso9660 "${cdrom}" /tmpfs/bootcd >/dev/null 2>&1; then
if [ -e "${squashimg}" ]; then
squashfound=1
msg "${cdrom}"
@ -34,26 +33,24 @@ run_hook ()
exit 1
fi
if [ "${copytoram}" == "y" ]; then
if [ "${copytoram}" = "y" ]; then
/bin/cat /tmpfs/bootcd/archlive.sqfs > /tmpfs/archlive.sqfs
squashimg="/tmpfs/archlive.sqfs"
fi
msg -n ":: Mounting squashfs image..."
msg ":: Mounting squashfs image"
/bin/modprobe -q squashfs >/dev/null 2>&1
/bin/mkdir -p /tmpfs/squashfs_root
if ! /bin/losetup /dev/loop0 "${squashimg}"; then
if ! /bin/losetup /dev/loop0 "${squashimg}" >/dev/null 2>&1; then
echo "ERROR: Cannot mount loop device /dev/loop0...aborting"
exit 1
fi
/bin/mount -r -t squashfs /dev/loop0 /tmpfs/squashfs_root
msg "done."
msg -n ":: Mounting root (union) filesystem..."
msg ":: Mounting root (union) filesystem"
/bin/modprobe -q unionfs >/dev/null 2>&1
/bin/mount -t unionfs -o dirs=/tmpfs=rw:/tmpfs/squashfs_root=ro,debug=0 none /real_root
msg "done."
/bin/mount -t unionfs -o dirs=/tmpfs=rw:/tmpfs/squashfs_root=ro none /real_root
if [ -d /proc/sys/dev/cdrom ]; then
echo 0 > /proc/sys/dev/cdrom/lock

View File

@ -14,12 +14,3 @@ pause Press enter to continue...
title HOW-TO: Do some other shit
cat /boot/help/othershit.txt
pause Press enter to continue...
title MANUAL: Grub
cat /boot/help/grub.txt
pause Press enter to continue...
title MANUAL: Lilo
cat /boot/help/lilo.txt
pause Press enter to continue...

View File

@ -8,18 +8,18 @@ title Boot ArchLive
kernel /boot/vmlinuz26 lang=en locale=en_US.UTF-8 ramdisk_size=75%
initrd /boot/archlive.img
title Tools...
configfile /boot/grub/tools.lst
title View Help...
configfile /boot/grub/help.lst
title More Options...
configfile /boot/grub/more.lst
title Shutdown the Computer
halt
title Reboot the Computer
reboot
title Tools...
configgile /boot/grub/tools.lst
title View Help...
configfile /boot/grub/help.lst
title More Options...
configfile /boot/grub/more.lst

View File

@ -9,27 +9,19 @@ configfile /boot/grub/menu.lst
title Run memtest86+ (Memory Testing)
kernel /boot/memtest86+/memtest.bin
# TODO package
# http://www.vortex.prodigynet.co.uk/x86test/
title Run x86test (CPU Info)
kernel /boot/x86test.img
kernel /boot/x86test_zImage.bin
#wget http://www.vortex.prodigynet.co.uk/x86test/x86test_zImage.bin
# TODO package
# http://home.san.rr.com/johninsd/pub/linux/lilo/boot/
title LILO Diagnostic 1 (diag1)
kernel /boot/lilo_diagnostic1.img
title LILO Diagnostic 2 (diag1)
kernel /boot/lilo_diagnostic2.img
title LILO Diagnostic
kernel /boot/diag2.img
title Install GRUB to hd0 MBR
root (hd0,0)
setup (hd0)
title Install GRUB to hd1 MBR
root (hd1,0)
setup (hd1)
# http://www.erikyyy.de/invaders/
title Space Invaders!!
kernel /boot/invaders.img

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -1,11 +1,13 @@
# vim: set ft=sh:
cmdline_param ()
{
while param do;
case "${param}" in
$1=*) echo "${param##*=}"; break ;;
*) continue ;;
esac
echo "${2}"
done < read /proc/cmdline
}
# vim: set ft=sh:
cmdline_param ()
{
read cmdline < /proc/cmdline
for param in ${cmdline}; do
case "${param}" in
$1=*) echo "${param##*=}"; break ;;
*) continue ;;
esac
done
[ -n "${2}" ] && echo "${2}"
}

View File

@ -1,17 +0,0 @@
# runlevel 4 is typically "text mode", but is not specified in LSB
id:4:initdefault:
rc::sysinit:/etc/rc.sysinit-proxy
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p
c1:2345:respawn:/sbin/agetty 38400 vc/1 linux
c2:2345:respawn:/sbin/agetty 38400 vc/2 linux
c3:2345:respawn:/sbin/agetty 38400 vc/3 linux
c4:2345:respawn:/sbin/agetty 38400 vc/4 linux
c5:2345:respawn:/sbin/agetty 38400 vc/5 linux
c6:2345:respawn:/sbin/agetty 38400 vc/6 linux
ca::ctrlaltdel:/sbin/shutdown -t3 -r now

View File

@ -1,3 +1,4 @@

Arch Linux Live ISO 0.1 (Snicklefritz) \n [\s \m \r] (\n)
Started at \b \t
\s-\r \v \m started at \d \t
Default login is "arch" with no password.

View File

@ -4,4 +4,4 @@ daemon:x:2:2:daemon:/sbin:
mail:x:8:12:mail:/var/spool/mail:
ftp:x:14:11:ftp:/home/ftp:
nobody:x:99:99:nobody:/:
arch::1000:100::/home/arch:/bin/bash
arch::1000:100:users:/home/arch:/bin/bash

View File

@ -1,12 +1,18 @@
#
# /etc/rc.conf - Main Configuration for Arch Linux
LOCALE="##LOCALE##"
. /etc/archiso/functions
LOCALE_DEFAULT="en_US.UTF-8"
TIMEZONE_DEFAULT="America/Chicago"
KEYMAP_DEFAULT="us"
LOCALE="$(cmdline_param locale ${LOCALE_DEFAULT})"
HARDWARECLOCK="UTC"
TIMEZONE="##TIMEZONE##"
KEYMAP="##KEYMAP##"
CONSOLEFONT=""
CONSOLEMAP=""
TIMEZONE="$(cmdline_param timezone ${TIMEZONE_DEFAULT})"
KEYMAP="$(cmdline_param keymap ${KEYMAP_DEFAULT})"
CONSOLEFONT="$(cmdline_param consolefont)"
CONSOLEMAP="$(cmdline_param consolefont)"
USECOLOR="yes"
MOD_AUTOLOAD="yes"

View File

@ -1,16 +0,0 @@
#!/bin/bash
# we need a proxy script here to convert some /proc/cmdline
# parameters to rc.conf settings.
. /etc/archlive/functions
LOCALE_DEFAULT="en_US.UTF-8"
TIMEZONE_DEFAULT="America/Chicago"
KEYMAP_DEFAULT="us"
sed -i "s|##LOCALE##|$(cmdline_param locale ${LOCALE_DEFAULT})|" /etc/rc.conf
sed -i "s|##TIMEZONE##|$(cmdline_param timezone ${TIMEZONE_DEFAULT})|" /etc/rc.conf
sed -i "s|##KEYMAP##|$(cmdline_param keymap ${KEYMAP_DEFAULT})|" /etc/rc.conf
#now go to the real sysinit
exec /etc/rc.sysinit

View File

@ -32,17 +32,18 @@ usage ()
exit 1
}
while getopts 'c:i:n:s:pvh' arg; do
while getopts 'c:i:fvh' arg; do
case "${arg}" in
c) CONFIG="${OPTARG}" ;;
i) CPIOCONFIG="${OPTARG}" ;;
v) FORCE="f" ;;
f) FORCE="y" ;;
v) QUIET="n" ;;
h|?) usage ;;
*) echo "invalid argument '${arg}'"; usage ;;
esac
done
shift $(($OPTIND - 1))
echo "ARGS: $@"
[ $# -le 1 ] && usage
@ -57,23 +58,6 @@ esac
[ "x${work_dir}" = "x" ] && (echo "please specify a working directory" && usage)
if [ -e "${work_dir}" -a "${FORCE}" = "n" ]; then
echo "Working dir '${work_dir}' already exists, aborting..."
exit 1
fi
if [ "${command_name}" = "iso" -o "${command_name}" = "all" ]; then
[ "x${isoname}" = "x" ] && (echo "please specify an iso name" && usage)
if [ -e "${isoname}" -a "${FORCE}" = "n"]; then
echo "ISO Image '${isoname}' already exists, aborting..."
exit 1
fi
if [ -e "${CPIOCONFIG}" ]; then
echo "mkinitcpio config '${CPIOCONFIG}' does not exist, aborting..."
exit 1
fi
fi
#TODO - do we even need a config file?
if [ -e "${CONFIG}" ]; then
source "${CONFIG}"
@ -134,6 +118,11 @@ install_pkgfile ()
}
if [ "${command_name}" = "install" -o "${command_name}" = "all" ]; then
if [ -e "${work_dir}" -a "${FORCE}" = "n" ]; then
echo "Working dir '${work_dir}' already exists, aborting..."
exit 1
fi
mkdir -p "${isoroot}"
mkdir -p "${instroot}"
@ -176,7 +165,7 @@ if [ "${command_name}" = "install" -o "${command_name}" = "all" ]; then
find "${instroot}/boot" -name *.img -delete #TODO, will this delete our special stuff?
echo "Applying default configuration for the Arch ISO."
cp -rf ${DEF_CONFIG_DIR}/* "${instroot}"
cp -rfa ${DEF_CONFIG_DIR}/* "${instroot}"
echo "Copyright (C) 2006, Arch Linux (Judd Vinet)" > "${instroot}/etc/copyright"
@ -228,6 +217,20 @@ if [ "${command_name}" = "squash" -o "${command_name}" = "all" ]; then
fi
if [ "${command_name}" = "iso" -o "${command_name}" = "all" ]; then
[ "x${isoname}" = "x" ] && (echo "please specify an iso name" && usage)
if [ -e "${isoname}" ]; then
if [ "${FORCE}" = "y" ]; then
rm -rf "${isoname}"
else
echo "ISO Image '${isoname}' already exists, aborting..."
exit 1
fi
fi
if [ ! -e "${CPIOCONFIG}" ]; then
echo "mkinitcpio config '${CPIOCONFIG}' does not exist, aborting..."
exit 1
fi
kernelver=$(_kversion)
basedir=${instroot}
[ "${instroot:0:1}" != "/" ] && basedir="$(pwd)/${instroot}"
@ -238,13 +241,11 @@ if [ "${command_name}" = "iso" -o "${command_name}" = "all" ]; then
fi
cp ${instroot}/usr/lib/grub/i386-pc/* "${isoroot}/boot/grub"
fi
if [ "${SKIP_ISO}" = "n" ]; then
echo "Creating ISO image..."
q=""
[ "${QUIET}" = "y" ] && q="-q"
mkisofs "${q}" -r -l -b "boot/grub/stage2_eltorito" -uid 0 -gid 0 -no-emul-boot \
#[ "${QUIET}" = "y" ] && q="-q"
mkisofs ${q} -r -l -b "boot/grub/stage2_eltorito" -uid 0 -gid 0 -no-emul-boot \
-boot-load-size 4 -boot-info-table -publisher "Arch Linux <archlinux.org>" \
-input-charset=UTF-8 -p "prepared by $NAME" -A "Arch Linux Live/Rescue CD" \
-copyright /etc/copyright -o "${isoname}" "${isoroot}"

13
testiso
View File

@ -1,6 +1,7 @@
#!/bin/sh
if [ $# -ne 1 ]; then
echo "usage: testiso <iso name>"
fi
qemu -boot d -kernel-kqemu -cdrom "${1}"
#!/bin/sh
if [ $# -ne 1 ]; then
echo "usage: testiso <iso name>"
exit 1
fi
qemu -boot d -kernel-kqemu -cdrom "${1}"