'upgpkg: added lowmem files, added iso creation scripts'

This commit is contained in:
Tobias Powalowski 2007-10-22 06:26:34 +00:00
parent 4a4640db3f
commit 061a334dd5
18 changed files with 557 additions and 9 deletions

43
archbootcd-lowmem.conf Normal file
View file

@ -0,0 +1,43 @@
# vim:set ft=sh:
# Created by Tobias Powalowski <tpowa@archlinux.org>
# config file for mkbootcd
# DEFAULT kernel boot options
KERNEL_BOOT_OPTIONS="rootdelay=5"
# mkinitcpio config file, defaulted to stock config file
MKINITCPIO_CONFIG="/etc/archboot/install-lowmem.conf"
# kernel version, defaulted to build for runtime kernel
VERSION="$(uname -r)"
# kernel image, defaulted to stock arch kernel
KERNEL="/boot/vmlinuz26"
# boot message file
# blank by default arch-bootmessage hook will create it by default
BOOTMESSAGE=""
# append this file to the default bootmessage
APPENDBOOTMESSAGE="/etc/archboot/etc/append-message"
APPENDBOOTMESSAGE_SYSLINUX="/etc/archboot/etc/append-message-syslinux"
APPENDBOOTMESSAGE_SYSLINUX_LOWMEM="/etc/archboot/etc/append-message-syslinux-lowmem"
# menu.lst or isolinux.cfg files to use
ISOLINUXCFG="/etc/archboot/etc/isolinux-lowmem.cfg"
MENULST="/etc/archboot/etc/menu.lst"
# Prompt on CD boot, defaulted to yes, 1=yes 0=no
PROMPT="1"
# Name of the ISO, if empty Arch Linux is used if not set by a HOOK later
ISONAME=""
# Timeout in seconds on CD boot, defaulted to 30 to fix usb keyboard issues
# 0 means wait for prompt
TIMEOUT="300"
# Setting cdrecord options
DEVICE="/dev/cdrw"
SPEED="4"
BLANKMODE="fast"

View file

@ -0,0 +1,12 @@
Available boot options (no input will boot the install/rescue system):
- 'arch <any_other_boot_option>' to boot the install/rescue system.
- 'arch root=/dev/??? <any_other_boot_option>' to boot into an existing system.
- 'lowmem <any_other_boot_option>' to boot the 96MB RAM install system.
- 'lowmem root=/dev/??? <any_other_boot_option>' to boot into an existing
96MB RAM system.
- If you have trouble with IDE drives, use the "ide-legacy" boot option.
- If your system hangs during the boot process, any combinations of the
boot options noapic acpi=off pci=routeirq nosmp may be useful.
- 'memtest' to start the memory test program memtest86+.

10
etc/isolinux-lowmem.cfg Normal file
View file

@ -0,0 +1,10 @@
prompt @@PROMPT@@
timeout @@TIMEOUT@@
display boot.msg
default arch
label arch
kernel vmlinuz
append initrd=initrd.img @@KERNEL_BOOT_OPTIONS@@
label lowmem
kernel vmlinuz
append initrd=lowmem.img @@KERNEL_BOOT_OPTIONS@@

14
hooks/arch_base_lowmem Normal file
View file

@ -0,0 +1,14 @@
# Created by Tobias Powalowski <tpowa@archlinux.org>
run_hook ()
{
# fixing some symlinks
ln -s /sbin/halt /sbin/poweroff
ln -s /sbin/halt /sbin/reboot
ln -s /usr/sbin/chroot /bin/chroot
ln -s /bin/chroot /usr/bin/chroot
ln -s /sbin/killall5 /bin/pidof
ln -s /usr/bin/netcat /usr/bin/nc
# fix depmod link
ln -s /sbin/depmod /bin/depmod
}

View file

@ -0,0 +1,63 @@
run_hook ()
{
# fix reiserfs symlinks
ln -s /sbin/mkfs.reiserfs /sbin/mkreiserfs
# fix ext2/ext3 symlinks
ln -s /sbin/mkfs.ext2 /sbin/mkfs.ext3
ln -s /sbin/mkfs.ext2 /sbin/mke2fs
# fix jfs symlinks
ln -s /sbin/jfs_mkfs /sbin/mkfs.jfs
# fix vfat symlink
ln -s /sbin/mkdosfs /sbin/mkfs.vfat
ln -s /sbin/mkdosfs /sbin/mkfs.msdos
#needed for switching
if ! [ "${root}" = "" ]; then
msg -n ":: Loading root filesystem module..."
if [ "x${rootfstype}" != "x" ]; then
FSTYPE="${rootfstype}"
else
if [ ! -e "${root}" ]; then
msg -e "\nAttempting to create root device '${root}'"
if [ "x${rootdelay}" != "x" ]; then
msg -n "Waiting for devices to settle..."
/bin/sleep "${rootdelay}"
msg "done."
export rootdelay=0
kinit_params="${kinit_params} rootdelay=0"
fi
eval $(/bin/parseblock "${root}")
if [ "${BLOCKNAME}" = "unknown" ]; then
FSTYPE="unknown"
echo "ERROR: Failed to parse block device name for '${root}'"
elif [ "x${BLOCKDEVICE}" = "x" ]; then
FSTYPE="unknown"
echo "ERROR: Failed to parse block device ids for '${root}'"
else
export root="${BLOCKNAME}"
echo "/bin/mknod \"${BLOCKNAME}\" b ${BLOCKDEVICE}"
/bin/mknod "${BLOCKNAME}" b ${BLOCKDEVICE} >/dev/null
fi
fi
if [ -e "${root}" ]; then
eval $( /bin/fstype < "${root}" )
else
FSTYPE="unknown"
fi
fi
msg " ${FSTYPE}"
if [ "${FSTYPE}" = "unknown" ]; then
echo "ERROR: root fs cannot be detected. Try using the rootfstype= kernel parameter."
else
kinit_params="${kinit_params} rootfstype=${FSTYPE}"
/sbin/modprobe -q "${FSTYPE}" >/dev/null 2>&1
fi
fi
}

View file

@ -4,4 +4,6 @@ run_hook ()
for i in /etc/pacman.d/*; do for i in /etc/pacman.d/*; do
sed -i -e "s/i686/$(uname -m)/g" $i sed -i -e "s/i686/$(uname -m)/g" $i
done done
# add pacman.static symlink
ln -s /usr/bin/pacman /usr/bin/pacman.static
} }

9
hooks/arch_pacman_lowmem Normal file
View file

@ -0,0 +1,9 @@
run_hook ()
{
# fix download source
for i in /etc/pacman.d/*; do
sed -i -e "s/i686/$(uname -m)/g" $i
done
# add pacman.static symlink
ln -s /usr/bin/pacman /usr/bin/pacman.static
}

99
install-lowmem.conf Normal file
View file

@ -0,0 +1,99 @@
# vim:set ft=sh:
# Created by Tobias Powalowski <tpowa@archlinux.org>
# For more information on how using mkinitcpio please refer to the main config file
# or check the wiki.
MODULES=""
BINARIES=""
FILES=""
# SETUP
# You can choose between 2 types of install media:
# arch-core-install --> creates core install media
# arch-ftp-install --> creates ftp install media
#
# default is set to ftp install media
#
# Please change the other hooks only if you know what you are doing.
# hooks for lowmem image
HOOKS="arch_lowmem_install arch_acpi arch_bootmessage_lowmem arch_motd_lowmem arch_memtest arch_pam arch_shadow_lowmem arch_base_lowmem arch_hwdetect arch_udev ide pata scsi sata usb usbinput arch_raid arch_lvm2 arch_encrypt arch_filesystems_lowmem arch_pacman_lowmem arch_licenses"
#
# adding pxelinux hook if mkpxelinux is used.
if [ "${RUNPROGRAM}" = "mkpxelinux" ]; then
HOOKS="$HOOKS arch_pxelinux"
fi
#
### NETWORK SETUP
# the default install media creating process, uses latest files from online cvs!
#
#SERVER PARAMETERS
FTPSERVER="ftp://ftp.archlinux.org/core/os"
# CVS SERVER
ARCH_CVSSETUP=":pserver:anonymous:anonymous@cvs.archlinux.org:/home/cvs-arch"
CVSSETUP=":pserver:anonymous:anonymous@cvs.archlinux.org:/home/cvs-core"
# CVS TAG
TAG="CURRENT"
###### LOCAL SETUP
# only needed if you want to build custom install media
# disabled by default you can ignore all those parameters below
# if you don't set LOCALSETUP="yes"
#
# Set this switch to "yes" if you want a custom install media
LOCALSETUP="no"
#### NOTES:
# To get the cvs tree use these commands:
# - change to your dir you want to hold the cvs files and execute the script below
# Example Script:
# ---------------
# #!/bin/sh
# export CVSROOT=":pserver:anonymous:anonymous@cvs.archlinux.org:/home/cvs-arch"
# TAG="CURRENT"
# ### general setup stuff
# cvs -z3 co arch/scripts/{km,setup,quickinst}
# cvs -z3 co arch/doc/en/guide/install/arch-install-guide.txt
# cvs -z3 co arch/misc/bootdisk/2/mirrors.txt
# export CVSROOT=":pserver:anonymous:anonymous@cvs.archlinux.org:/home/cvs-core"
# cvs -z3 co -r ${TAG} core/
# ---------------
# Now you can start to modify this tree to your needs.
### GENERAL REMASTER PARAMETERS
# enter here your custom/modified cvs tree
CVSTREE=""
ARCH_CVSTREE=""
# path to keyboard layout change script
KMSCRIPT="${ARCH_CVSTREE}/arch/scripts/km"
# path to setup script
SETUP="${ARCH_CVSTREE}/arch/scripts/setup"
# path to quickinst script
QUICKINST="${ARCH_CVSTREE}/arch/scripts/quickinst"
# path to file which include the mirrors
MIRRORS="${ARCH_CVSTREE}/arch/misc/bootdisk/2/mirrors.txt"
# path to documentation file
DOCUMENTATION="${ARCH_CVSTREE}/arch/doc/en/guide/install/arch-install-guide.txt"
# path to built packages
PACKAGEDIR=""
# path to static pacman
# download it from:
# ftp://ftp.archlinux.org/core/os/<yourarchitecture>/setup/pacman.pkg.tar.gz
# or build it on your own ;)
PACMANBINARY=""
# path to rc.sysinit to get arch version
RCSYSINIT="${CVSTREE}/core/base/initscripts/rc.sysinit"
#### REMASTER FTP INSTALL MEDIA
# No extra parameters needed
#### REMASTER CORE INSTALL MEDIA
### main cvs dir for base install
# Note: the MAINCVSDIR dir must include a 'base' and 'kernels' directory
MAINCVSDIR="${CVSTREE}/core"

65
install/arch_base_lowmem Normal file
View file

@ -0,0 +1,65 @@
# Created by Tobias Powalowski <tpowa@archlinux.org>
install ()
{
### setting up base structure
add_dir "/proc"
add_dir "/sys"
add_dir "/dev"
add_dir "/mnt"
add_dir "/tmp"
add_dir "/var/run"
add_dir "/var/log"
add_dir "/addons"
add_dir "/home"
add_device "/dev/null" c 1 3
add_device "/dev/zero" c 1 5
add_device "/dev/console" c 5 1
### adding klibc lib files
for f in $(find /lib -name klibc-*.so); do
add_file $f
done
### adding klibc binaries
for f in $(find /usr/lib/klibc/bin/ ! -name "mount" ! -name "umount" ! -name "reboot" ! -name "halt" ! -name "chroot" ! -name "sh" ! -name "modprobe" ! -name "cat" ! -name "cpio" ! -name "dd" ! -name "gunzip" ! -name "gzip" ! -name "insmod" ! -name "zcat" ! -type d); do
add_file $f /bin/$(basename $f)
done
### adding needed programs from running system
add_file "${CONFIG}" "/config"
SCRIPT="arch_base_lowmem"
BINARIES="init agetty mount modprobe umount head basename clear nano printf tail test tty wc which xargs yes syslog-ng bash swapon uniq cut seq find sort fdisk sfdisk cfdisk gawk cp mv shutdown ls rm sed less chgrp chmod chown df dialog dmesg egrep fgrep grep kill killall killall5 more ps pwd rmdir stty sync tar touch uname hdparm true mktemp chroot dirname bzip2 hwclock depmod cat gzip sdparm expr"
add_file "/bin/echo"
add_file "/bin/gunzip"
add_file "/bin/zcat"
add_file "/usr/bin/reset"
add_file "/sbin/swapoff"
add_file "/sbin/halt"
add_file "/sbin/telinit"
add_file "/bin/awk"
add_file "/etc/archboot/etc/init" "/init"
add_file "/bin/dir"
add_file "/usr/share/terminfo/l/linux"
add_file "/etc/rc.d/functions"
add_file "/etc/archboot/etc/rc.conf" "/etc/rc.conf"
add_file "/etc/rc.d/syslog-ng"
### adding config files of installation system
for i in $(find /etc/archboot/etc/ -maxdepth 1 ! -type d ! -name 'init' ! -name "udev.rules" ! -name "menu.lst" ! -name "isolinux.cfg" ! -name "append-message*"); do
add_file "$i" "/etc/$(basename $i)"
done
### fixing network support
add_file "/lib/libnss_files.so.2"
add_file "/lib/libnss_dns.so.2"
}
help ()
{
cat <<HELPEOF
This hook sets up all initial directories and installs base
klibc utilities and libraries for a lowmem arch boot image.
DO NOT remove this one unless you know what you're doing.
HELPEOF
}

View file

@ -0,0 +1,52 @@
# Created by Tobias Powalowski <tpowa@archlinux.org>
install ()
{
### generate boot.msg
[ "${RUNPROGRAM}" = "mkbootcd" ] && TITLEMSG="ISOLINUX"
[ "${RUNPROGRAM}" = "mkbootcd-grub" ] && TITLEMSG="GRUB"
[ "${RUNPROGRAM}" = "mksyslinux" ] && TITLEMSG="SYSLINUX"
[ "${RUNPROGRAM}" = "mkpxelinux" ] && TITLEMSG="PXELINUX"
# change to english locale!
export LANG=en_US
CONFIGMSG="INSTALLATION SYSTEM"
if ! [ "${LOCALSETUP}" = "yes" ]; then
CVSMSG=$(mktemp /tmp/archmsg.XXXX)
rm ${CVSMSG}
mkdir -p ${CVSMSG}
# checkout actual name from cvs rc.sysinit
export CVSROOT=${ARCH_CVSSETUP}
cd ${CVSMSG}
cvs -z3 co -r ${TAG} arch/build/base/initscripts/rc.sysinit
NAME=$(grep 'Arch' arch/build/base/initscripts/rc.sysinit | sed -e 's/printhl "//g' -e 's/$C_OTHER(${C_H2}//g' -e 's/\\n"//g' -e 's/$C_OTHER)//g')
else
NAME=$(grep 'Arch' ${RCSYSINIT} | sed -e 's/printhl "//g' -e 's/$C_OTHER(${C_H2}//g' -e 's/\\n"//g' -e 's/$C_OTHER)//g')
fi
echo "Arch Linux" >> ${BOOTMESSAGE}
echo "http://www.archlinux.org" >> ${BOOTMESSAGE}
echo "Copyright 2002 - 2007 Judd Vinet <jvinet@zeroflux.org>" >> ${BOOTMESSAGE}
echo "Distributed under the GNU General Public License (GPL)" >> ${BOOTMESSAGE}
echo "" >> ${BOOTMESSAGE}
echo "${TITLEMSG} BOOT" >> ${BOOTMESSAGE}
echo "Creation Tool: '$(echo ${RUNPROGRAM} | sed 's|-grub||')' written by Tobias Powalowski <tpowa@archlinux.org>" >> ${BOOTMESSAGE}
echo "" >> ${BOOTMESSAGE}
echo "${CONFIGMSG}" >> ${BOOTMESSAGE}
echo "${NAME}" >> ${BOOTMESSAGE}
echo "Kernel: ${USEKERNEL}" >> ${BOOTMESSAGE}
echo "Architecture: $(uname -m)" >> ${BOOTMESSAGE}
echo "Creation Date: $(date)" >> ${BOOTMESSAGE}
echo "" >> ${BOOTMESSAGE}
if [ "${RUNPROGRAM}" = "mkbootcd-grub" ]; then
[ -s "${APPENDBOOTMESSAGE}" ] && cat ${APPENDBOOTMESSAGE} >> ${BOOTMESSAGE}
else
[ -s "${APPENDBOOTMESSAGE_SYSLINUX_LOWMEM}" ] && cat ${APPENDBOOTMESSAGE_SYSLINUX_LOWMEM} >> ${BOOTMESSAGE}
fi
}
help ()
{
cat <<HELPEOF
This hook sets up dynamically the lowmem boot message, depending on
your system.
HELPEOF
}

View file

@ -106,16 +106,20 @@ install ()
mkdir -p ${TEMPDIR}/arch mkdir -p ${TEMPDIR}/arch
add_file "${KM}" "/bin/km" add_file "${KM}" "/bin/km"
# fix mirrors.txt # fix mirrors.txt
if ! [ "${LOCALSETUP}" = "yes" ]; then if ! [ "${LOCALSETUP}" = "yes" ]; then
sed -i -e "s/i686/$(uname -m)/g" ${ARCH_CVSTREE}/arch/misc/bootdisk/2/mirrors.txt sed -i -e "s/i686/$(uname -m)/g" ${ARCH_CVSTREE}/arch/misc/bootdisk/2/mirrors.txt
add_file "${ARCH_CVSTREE}/arch/scripts/setup" "/arch/setup" add_file "${ARCH_CVSTREE}/arch/scripts/setup" "/arch/setup"
add_file "${ARCH_CVSTREE}/arch/scripts/quickinst" "/arch/quickinst" add_file "${ARCH_CVSTREE}/arch/scripts/quickinst" "/arch/quickinst"
add_file "${ARCH_CVSTREE}/arch/misc/bootdisk/2/mirrors.txt" "/arch/mirrors.txt" add_file "${ARCH_CVSTREE}/arch/misc/bootdisk/2/mirrors.txt" "/arch/mirrors.txt"
else else
sed -i -e "s/i686/$(uname -m)/g" ${MIRRORS} MIRRORTREE=$(mktemp /tmp/mirror.XXXX)
rm ${MIRRORTREE}
mkdir -p ${MIRRORTREE}
cp ${ARCH_CVSTREE}/arch/misc/bootdisk/2/mirrors.txt ${MIRRORTREE}/
sed -i -e "s/i686/$(uname -m)/g" ${MIRRORTREE}/mirrors.txt
add_file "${SETUP}" "/arch/setup" add_file "${SETUP}" "/arch/setup"
add_file "${QUICKINST}" "/arch/quickinst" add_file "${QUICKINST}" "/arch/quickinst"
add_file "${MIRRORS}" "/arch/mirrors.txt" add_file "${MIRRORTREE}/mirrors.txt" "/arch/mirrors.txt"
fi fi
DOCS=$(mktemp /tmp/docs.XXXX) DOCS=$(mktemp /tmp/docs.XXXX)
if ! [ "${LOCALSETUP}" = "yes" ]; then if ! [ "${LOCALSETUP}" = "yes" ]; then

View file

@ -0,0 +1,16 @@
# Created by Tobias Powalowski <tpowa@archlinux.org>
install ()
{
MODULES=" $(checked_modules '/kernel/fs/reiserfs') $(checked_modules '/kernel/fs/ext2') $(checked_modules '/kernel/fs/ext3') $(checked_modules '/kernel/fs/jfs') $(checked_modules '/kernel/fs/xfs') $(checked_modules '/kernel/fs/vfat') $(checked_modules '/kernel/fs/fat') $(checked_modules '/kernel/fs/isofs') $(checked_modules '/kernel/fs/nls/nls_cp437')"
BINARIES="mkswap mkfs.reiserfs mkfs.ext2 jfs_fsck jfs_mkfs mkfs.xfs xfs_freeze xfs_io mkdosfs"
FILES=""
SCRIPT="arch_filesystems_lowmem"
}
help ()
{
cat<<HELPEOF
This hook is responsible for including filesystems on a lowmem arch boot image.
HELPEOF
}

View file

@ -47,16 +47,20 @@ install ()
mkdir -p ${TEMPDIR}/arch mkdir -p ${TEMPDIR}/arch
add_file "${KM}" "/bin/km" add_file "${KM}" "/bin/km"
# fix mirrors.txt # fix mirrors.txt
if ! [ "${LOCALSETUP}" = "yes" ]; then if ! [ "${LOCALSETUP}" = "yes" ]; then
sed -i -e "s/i686/$(uname -m)/g" ${ARCH_CVSTREE}/arch/misc/bootdisk/2/mirrors.txt sed -i -e "s/i686/$(uname -m)/g" ${ARCH_CVSTREE}/arch/misc/bootdisk/2/mirrors.txt
add_file "${ARCH_CVSTREE}/arch/scripts/setup" "/arch/setup" add_file "${ARCH_CVSTREE}/arch/scripts/setup" "/arch/setup"
add_file "${ARCH_CVSTREE}/arch/scripts/quickinst" "/arch/quickinst" add_file "${ARCH_CVSTREE}/arch/scripts/quickinst" "/arch/quickinst"
add_file "${ARCH_CVSTREE}/arch/misc/bootdisk/2/mirrors.txt" "/arch/mirrors.txt" add_file "${ARCH_CVSTREE}/arch/misc/bootdisk/2/mirrors.txt" "/arch/mirrors.txt"
else else
sed -i -e "s/i686/$(uname -m)/g" ${MIRRORS} MIRRORTREE=$(mktemp /tmp/mirror.XXXX)
rm ${MIRRORTREE}
mkdir -p ${MIRRORTREE}
cp ${ARCH_CVSTREE}/arch/misc/bootdisk/2/mirrors.txt ${MIRRORTREE}/
sed -i -e "s/i686/$(uname -m)/g" ${MIRRORTREE}/mirrors.txt
add_file "${SETUP}" "/arch/setup" add_file "${SETUP}" "/arch/setup"
add_file "${QUICKINST}" "/arch/quickinst" add_file "${QUICKINST}" "/arch/quickinst"
add_file "${MIRRORS}" "/arch/mirrors.txt" add_file "${MIRRORTREE}/mirrors.txt" "/arch/mirrors.txt"
fi fi
DOCS=$(mktemp /tmp/docs.XXXX) DOCS=$(mktemp /tmp/docs.XXXX)
if ! [ "${LOCALSETUP}" = "yes" ]; then if ! [ "${LOCALSETUP}" = "yes" ]; then

View file

@ -0,0 +1,55 @@
# Created by Tobias Powalowski <tpowa@archlinux.org>
install ()
{
### check for activated testing repository
if ! [ "$(grep '^\[testing\]' /etc/pacman.conf)" = "" ]; then
echo "WARNING: TESTING REPOSITORY ACTIVATED"
echo "-------------------------------------"
echo "POSSIBILITY OF BROKEN BINARY PACKAGES ON INSTALL MEDIA!"
echo "Use a chroot instead to avoid those problems."
echo "5 seconds time to cancel with CTRL+C"
sleep 5
fi
### begin cvs part
if ! [ "${LOCALSETUP}" = "yes" ]; then
CVSTREE=$(mktemp /tmp/corecvs.XXXX)
ARCH_CVSTREE=$(mktemp /tmp/archcvs.XXXX)
rm ${CVSTREE}
rm ${ARCH_CVSTREE}
mkdir -p ${CVSTREE}
mkdir -p ${ARCH_CVSTREE}
# checkout actual CURRENT cvs
export CVSROOT=${CVSSETUP}
else
CVSTREE=${CVSTREE}
ARCH_CVSTREE=${ARCH_CVSTREE}
fi
SCRIPT=
BINARIES=
# always needed for every install
cd ${ARCH_CVSTREE}
if ! [ "${LOCALSETUP}" = "yes" ]; then
export CVSROOT=${ARCH_CVSSETUP}
cvs -z3 co arch/scripts/{setup,quickinst}
fi
mkdir -p ${TEMPDIR}/arch
add_dir "/src"
if ! [ "${LOCALSETUP}" = "yes" ]; then
add_file "${ARCH_CVSTREE}/arch/scripts/setup" "/arch/setup"
add_file "${ARCH_CVSTREE}/arch/scripts/quickinst" "/arch/quickinst"
else
sed -i -e "s/i686/$(uname -m)/g" ${MIRRORS}
add_file "${SETUP}" "/arch/setup"
add_file "${QUICKINST}" "/arch/quickinst"
fi
# generate iso title name
[ "${RUNPROGRAM}" = "mkbootcd" -o "${RUNPROGRAM}" = "mkbootcd-grub" ] && echo "Arch Linux MINI $(uname -m)" >> ${ISONAME}
}
help ()
{
cat <<HELPEOF
This hook sets up all you need for a lowmem arch install image.
HELPEOF
}

39
install/arch_motd_lowmem Normal file
View file

@ -0,0 +1,39 @@
# Created by Tobias Powalowski <tpowa@archlinux.org>
install ()
{
### generate motd
MOTD=$(mktemp /tmp/motd.XXXX)
echo "Virtual consoles 1-4 are active." >> ${MOTD}
echo "--------------------------------" >> ${MOTD}
echo "To change virtual console use ALT + F(1-5 or 12)" >> ${MOTD}
echo "" >> ${MOTD}
echo "Logging:" >> ${MOTD}
echo " - vc5 is used for setup logging." >> ${MOTD}
echo " - vc12 is used for kernel logging." >> ${MOTD}
if [ "${RUNPROGRAM}" = "mksyslinux" ]; then
echo "Installation Hints:" >> ${MOTD}
echo " - If you don't use 'FTP INSTALL', mount your install source under '/src/'" >> ${MOTD}
echo " choose --> 'CD INSTALL' and on menu 'Select Packages' --> choose 'SRC'." >> ${MOTD}
echo " - If you booted from an USB-DEVICE, it's possible that you need to unplug" >> ${MOTD}
echo " and replug your device to get the correct node in /dev/." >> ${MOTD}
fi
if [ "${RUNPROGRAM}" = "mkpxelinux" ]; then
echo "Installation Hints:" >> ${MOTD}
echo " - choose --> 'CD INSTALL' and on menu 'Select Packages' --> choose 'SRC'." >> ${MOTD}
fi
echo "Normal Setup:" >> ${MOTD}
echo " - When you are ready, please run '/arch/setup' to install Arch Linux." >> ${MOTD}
echo "For Experts:" >> ${MOTD}
echo " - Use '/arch/quickinst' to install and bypass the setup routine." >> ${MOTD}
chmod 644 ${MOTD}
add_file "${MOTD}" "/etc/motd"
}
help ()
{
cat <<HELPEOF
This hook sets up dynamically the lowmem motd message, depending on
your system.
HELPEOF
}

View file

@ -3,7 +3,7 @@
install () install ()
{ {
MODULES="" MODULES=""
BINARIES="pacman pacman.static" BINARIES="pacman"
FILES="" FILES=""
SCRIPT="arch_pacman" SCRIPT="arch_pacman"

View file

@ -0,0 +1,39 @@
# Created by Tobias Powalowski <tpowa@archlinux.org>
install ()
{
MODULES=""
BINARIES="pacman"
FILES=""
SCRIPT="arch_pacman_lowmem"
DEPENDS="initscripts bash coreutils cryptsetup dialog \
e2fsprogs findutils gawk grep jfsutils less lvm2 mdadm module-init-tools nano \
ncurses procps psmisc reiserfsprogs sed \
syslog-ng sysvinit tar util-linux-ng which xfsprogs hdparm memtest86+ \
grub hwdetect shadow dosfstools udev initscripts filesystem kernel26 glibc kernel-headers pacman pam \
bzip2 gcc-libs mktemp openssl zlib libelf gpm sysfsutils libgcrypt libgpg-error popt libpcap lilo grub gzip libarchive \
libdownload device-mapper cracklib readline acl attr archboot klibc libevent sdparm licenses"
for i in $DEPENDS; do
for k in $(echo /var/lib/pacman/local/$i-[0-9]*-[0-9]*); do
add_file "$k/depends"
add_file "$k/files"
add_file "$k/desc"
done
done
add_dir "/var/log"
add_file "/etc/archboot/etc/pacman/pacman.conf.pacman" "/etc/pacman.conf"
add_file "/etc/archboot/etc/pacman/core.pacman" "/etc/pacman.d/core"
add_file "/etc/archboot/etc/pacman/extra.pacman" "/etc/pacman.d/extra"
add_file "/etc/archboot/etc/pacman/unstable.pacman" "/etc/pacman.d/unstable"
add_file "/etc/archboot/etc/pacman/release.pacman" "/etc/pacman.d/release"
add_file "/etc/archboot/etc/pacman/community.pacman" "/etc/pacman.d/community"
}
help ()
{
cat<<HELPEOF
This hook includes the pacman on a lowmem arch boot image.
HELPEOF
}

View file

@ -0,0 +1,22 @@
# Created by Tobias Powalowski <tpowa@archlinux.org>
install ()
{
MODULES=""
BINARIES="login"
FILES=""
SCRIPT=""
for i in $(echo /etc/archboot/etc/shadow-config/*/*); do
add_file "$i" "$(echo $i | sed -e 's|/etc/archboot/etc/shadow-config|/etc|g')"
done
for i in $(echo /etc/archboot/etc/shadow-config/*.defs); do
add_file "$i" "$(echo $i | sed -e 's|/etc/archboot/etc/shadow-config|/etc|g')"
done
}
help ()
{
cat<<HELPEOF
This hook includes the shadow on a lowmem arch boot image.
HELPEOF
}