@ -0,0 +1,37 @@ |
|||
#!/bin/sh |
|||
# |
|||
# --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
|||
# |
|||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|||
# Please add additional copyright information _after_ the line containing |
|||
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
|||
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
|||
# |
|||
# ROCK Linux: rock-src/package/base/sysfiles/system.init |
|||
# ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf |
|||
# |
|||
# 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. A copy of the GNU General Public |
|||
# License can be found at Documentation/COPYING. |
|||
# |
|||
# Many people helped and are helping developing ROCK Linux. Please |
|||
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
|||
# file for details. |
|||
# |
|||
# --- ROCK-COPYRIGHT-NOTE-END --- |
|||
# |
|||
# Desc: System bootup and shutdown |
|||
# Runlevel: 80 rc5 |
|||
# |
|||
|
|||
[ "$1" = stop ] && exit 0 |
|||
|
|||
main_begin |
|||
block_begin(start, `Creating X server configuration with grml-x.') |
|||
XDM="kdm" |
|||
[ -f /etc/conf/xdm ] && . /etc/conf/xdm |
|||
check(`grml-x -force -nostart $XDM') |
|||
block_end |
|||
main_end |
@ -1,136 +0,0 @@ |
|||
Section "Monitor" |
|||
Identifier "Monitor1" |
|||
# NOTE: THE VALUES HERE ARE EXAMPLES ONLY. REFER TO YOUR MONITOR'S |
|||
# USER MANUAL FOR THE CORRECT NUMBERS !! |
|||
# normally uncomment this lines |
|||
# HorizSync 24.0 - 80.0 |
|||
# VertRefresh 50-100 |
|||
EndSection |
|||
|
|||
Section "Device" |
|||
Identifier "Card1" |
|||
# Use this for framebuffer devices - should work on most systems. |
|||
Driver "fbdev" |
|||
Option "fbdev" "/dev/fb/0" |
|||
# Some driver accept an UseFBDev option (e.g. radeon) to switch the |
|||
# mode via the Linux framebuffer layer. Needed e.g. as workaround for |
|||
# iBooks. |
|||
# Option "UseFBDev" |
|||
EndSection |
|||
|
|||
Section "Screen" |
|||
Identifier "Screen1" |
|||
Device "Card1" |
|||
Monitor "Monitor1" |
|||
DefaultDepth 16 |
|||
|
|||
Subsection "Display" |
|||
Depth 4 |
|||
Modes "1024x768" "800x600" "640x480" |
|||
ViewPort 0 0 |
|||
EndSubsection |
|||
Subsection "Display" |
|||
Depth 8 |
|||
Modes "1024x768" "800x600" "640x400" |
|||
ViewPort 0 0 |
|||
EndSubsection |
|||
Subsection "Display" |
|||
Depth 16 |
|||
Modes "1024x768" "800x600" "640x480" |
|||
ViewPort 0 0 |
|||
EndSubsection |
|||
Subsection "Display" |
|||
Depth 24 |
|||
Modes "1024x768" "800x600" "640x480" |
|||
ViewPort 0 0 |
|||
EndSubsection |
|||
Subsection "Display" |
|||
Depth 32 |
|||
Modes "1024x768" "800x600" "640x480" |
|||
ViewPort 0 0 |
|||
EndSubsection |
|||
EndSection |
|||
|
|||
Section "Module" |
|||
|
|||
Load "dbe" # DBE (double buffer extension) |
|||
Load "ddc" # Display Data Channel extension |
|||
|
|||
# This loads the miscellaneous extensions module |
|||
SubSectionSub "extmod" |
|||
Option "omit xfree86-dga" # don't initialise the DGA extension |
|||
Option "omit XFree86-VidModeExtension" # disable mode-switching-supoprt |
|||
EndSubSection |
|||
|
|||
# This loads the Type1 and FreeType font modules |
|||
Load "type1" |
|||
Load "freetype" |
|||
|
|||
# Load "glx" # GLX extension (OpenGL visuals) |
|||
# Load "dri" # Direct Rendering Interface extension (OpenGL) |
|||
|
|||
# Load "v4l" # Video 4 Linux extension (provides a xv adapter) |
|||
EndSection |
|||
|
|||
# this enabled normal users to use DRI - the Direct Rendering Extension. |
|||
# it is also possible to use a group to control access. |
|||
# |
|||
Section "DRI" |
|||
Mode 0666 |
|||
EndSection |
|||
|
|||
Section "Files" |
|||
RgbPath "/usr/X11R7/share/X11/rgb" |
|||
FontPath "/usr/X11R7/lib/X11/fonts/75dpi/:unscaled" |
|||
FontPath "/usr/X11R7/lib/X11/fonts/100dpi/:unscaled" |
|||
FontPath "/usr/X11R7/lib/X11/fonts/CID/" |
|||
FontPath "/usr/X11R7/lib/X11/fonts/PEX/" |
|||
FontPath "/usr/X11R7/lib/X11/fonts/Speedo/" |
|||
FontPath "/usr/X11R7/lib/X11/fonts/Type1/" |
|||
FontPath "/usr/X11R7/lib/X11/fonts/cyrillic/" |
|||
FontPath "/usr/X11R7/lib/X11/fonts/encodings/" |
|||
FontPath "/usr/X11R7/lib/X11/fonts/freefont/" |
|||
FontPath "/usr/X11R7/lib/X11/fonts/latin2/" |
|||
FontPath "/usr/X11R7/lib/X11/fonts/local/" |
|||
FontPath "/usr/X11R7/lib/X11/fonts/misc/" |
|||
FontPath "/usr/X11R7/lib/X11/fonts/sharefont" |
|||
FontPath "/usr/X11R7/lib/X11/fonts/TrueType" |
|||
FontPath "/usr/share/ghostscript/fonts/" |
|||
EndSection |
|||
|
|||
Section "ServerFlags" |
|||
EndSection |
|||
|
|||
Section "InputDevice" |
|||
|
|||
Identifier "Keyboard1" |
|||
Driver "keyboard" |
|||
Option "AutoRepeat" "250 30" |
|||
Option "XkbRules" "xfree86" |
|||
Option "XkbModel" "pc105" |
|||
EndSection |
|||
|
|||
|
|||
Section "InputDevice" |
|||
Identifier "Mouse1" |
|||
Driver "mouse" |
|||
Option "Protocol" "Auto" |
|||
Option "Device" "/dev/input/mice" |
|||
#Option "Emulate3Buttons" "true" # for a two button touch-pad |
|||
EndSection |
|||
|
|||
Section "InputDevice" |
|||
Identifier "Mouse2" |
|||
Driver "mouse" |
|||
Option "Protocol" "Auto" |
|||
Option "Device" "/dev/misc/psaux" |
|||
EndSection |
|||
|
|||
Section "ServerLayout" |
|||
Identifier "Simple Layout" |
|||
Screen "Screen1" |
|||
InputDevice "Mouse1" "CorePointer" |
|||
InputDevice "Mouse2" "SendCoreEvents" |
|||
InputDevice "Keyboard1" "CoreKeyboard" |
|||
EndSection |
|||
|
@ -1,517 +0,0 @@ |
|||
#!/bin/bash |
|||
|
|||
export PATH="/bin:/usr/bin:/sbin:/usr/sbin" |
|||
|
|||
STAGE_2_BIG_IMAGE="2nd_stage.tar.gz" |
|||
STAGE_2_SMALL_IMAGE="2nd_stage_small.tar.gz" |
|||
# Use -m to not let tar complain about modification times in the future, e.g. |
|||
# if the system clock is not set. |
|||
STAGE_2_COMPRESS_ARG="--use-compress-program=gzip -m" |
|||
|
|||
#640kB, err, 64 MB should be enought for the tmpfs ;-) |
|||
# 80 MB is better... |
|||
TMPFS_OPTIONS="size=83886060" |
|||
|
|||
mod_load_info () { # {{{ |
|||
read os host version rest < <( uname -a ) |
|||
if [ -z "${os}" ] ; then |
|||
echo "Can't run \`uname -a\`" |
|||
return |
|||
elif [ "${os}" != "Linux" ] ; then |
|||
echo "Your operating system is not supported ?!" |
|||
return |
|||
fi |
|||
|
|||
mod_loader="/sbin/insmod" |
|||
mod_dir="/lib/modules/" |
|||
|
|||
# kernel module suffix for <= 2.4 is .o, .ko if above |
|||
if [ ${version:2:1} -gt 4 ] ; then |
|||
mod_suffix=".ko" |
|||
mod_suffix_len=3 |
|||
else |
|||
mod_suffix=".o" |
|||
mod_suffix_len=2 |
|||
fi |
|||
} # }}} |
|||
doboot() { # {{{ |
|||
if ! mkdir -p /mnt_root/old_root ; then |
|||
echo "Can't create /mnt_root/old_root" |
|||
return 1 |
|||
fi |
|||
|
|||
if [ ! -f /mnt_root/sbin/init ] ; then |
|||
echo "Can't find /mnt_root/sbin/init!" |
|||
return 1 |
|||
fi |
|||
|
|||
# pivot_root may or may not change the PWD and root of the |
|||
# caller, so we change into the new root directory first. |
|||
cd /mnt_root |
|||
if ! pivot_root . "/mnt_root/old_root" ; then |
|||
echo "Can't call pivot_root" |
|||
cd / |
|||
return 1 |
|||
fi |
|||
|
|||
if ! mount --move /old_root/dev /dev ; then |
|||
echo "Can't remount /old_root/dev as /dev" |
|||
fi |
|||
|
|||
if ! mount --move /old_root/proc /proc ; then |
|||
echo "Can't remount /old_root/proc as /proc" |
|||
fi |
|||
|
|||
if [[ "$( < /proc/version )" == "Linux version 2.6."* ]] ; then |
|||
if ! mount --move /old_root/sys /sys ; then |
|||
echo "Can't remount /old_root/sys as /sys" |
|||
fi |
|||
fi |
|||
|
|||
if ! umount /old_root/tmp ; then |
|||
echo "Can't umount /old_root/tmp" |
|||
fi |
|||
|
|||
sed -e "s, /mnt_root , / ," /old_root/etc/mtab > /etc/mtab |
|||
|
|||
# Kill udevd so /old_root can be unmounted. |
|||
udev_pid="$( ps -C udevd -o pid= )" |
|||
[ "$udev_pid" ] && kill $udev_pid |
|||
|
|||
exec chroot . sh -c "exec /sbin/init" <dev/console >dev/console 2>&1 |
|||
|
|||
echo "Can't exec /sbin/init!" |
|||
return 1 |
|||
} # }}} |
|||
trymount() { # {{{ |
|||
source=${1} |
|||
target=${2} |
|||
mount -t iso9600 -o ro ${source} ${target} && return 0 |
|||
mount -t ext3 -o ro ${source} ${target} && return 0 |
|||
mount -t ext2 -o ro ${source} ${target} && return 0 |
|||
mount -t minix -o ro ${source} ${target} && return 0 |
|||
mount -t vfat -o ro ${source} ${target} && return 0 |
|||
return -1 |
|||
} # }}} |
|||
httpload() { # {{{ |
|||
echo -n "Enter base URL (e.g. http://1.2.3.4/rock): " |
|||
|
|||
read baseurl |
|||
[ -z "${baseurl}" ] && return |
|||
|
|||
cat <<EOF |
|||
Select a stage 2 image file: |
|||
|
|||
0. ${STAGE_2_BIG_IMAGE} |
|||
1. ${STAGE_2_SMALL_IMAGE} |
|||
|
|||
EOF |
|||
echo -n "Enter number or image file name (default=0): " |
|||
read filename |
|||
|
|||
if [ -z "${filename}" ] ; then |
|||
filename="${STAGE_2_BIG_IMAGE}" |
|||
elif [ "${filename}" == "0" ] ; then |
|||
filename=${STAGE_2_BIG_IMAGE} |
|||
elif [ "${filename}" == "1" ] ; then |
|||
filename="${STAGE_2_SMALL_IMAGE}" |
|||
fi |
|||
|
|||
url="${baseurl%/}/${filename}" |
|||
echo "[ ${url} ]" |
|||
export ROCK_INSTALL_SOURCE_URL=${baseurl} |
|||
|
|||
if ! mkdir /mnt_root ; then |
|||
echo "Can't create /mnt_root" |
|||
return 1 |
|||
fi |
|||
|
|||
if ! mount -t tmpfs -O ${TMPFS_OPTIONS} tmpfs /mnt_root ; then |
|||
echo "Can't mount /mnt_root" |
|||
return 1 |
|||
fi |
|||
|
|||
wget -O - ${url} | tar ${STAGE_2_COMPRESS_ARG} -C /mnt_root -xf - |
|||
|
|||
echo "finished ... now booting 2nd stage" |
|||
doboot |
|||
} # }}} |
|||
load_modules() { # {{{ |
|||
# this starts the module loading shell |
|||
directory=${1} |
|||
cat <<EOF |
|||
module loading shell |
|||
|
|||
you can navigate through the filestem with 'cd'. for loading a module |
|||
simply enter the shown name, to exit press enter on a blank line. |
|||
|
|||
EOF |
|||
cd ${directory} |
|||
while : ; do |
|||
echo "Directories:" |
|||
count=0 |
|||
while read inode ; do |
|||
[ -d "${inode}" ] || continue |
|||
echo -n " [ ${inode} ]" |
|||
count=$((${count}+1)) |
|||
if [ ${count} -gt 3 ] ; then |
|||
echo |
|||
count=0 |
|||
fi |
|||
done < <( ls ) | expand -t1,3,19,21,23,39,41,43,59,61,63,78 |
|||
echo |
|||
echo "Modules:" |
|||
count=0 |
|||
while read inode ; do |
|||
[ -f "${inode}" ] || continue |
|||
[ "${inode%${mod_suffix}}" == "${inode}" ] && continue |
|||
echo -n " [ ${inode%${mod_suffix}} ]" |
|||
count=$((${count}+1)) |
|||
if [ ${count} -gt 3 ] ; then |
|||
echo |
|||
count=0 |
|||
fi |
|||
done < <( ls ) | expand -t1,3,19,21,23,39,41,43,59,61,63,78 |
|||
echo |
|||
echo -n "[${PWD##*/} ] > " |
|||
read cmd par |
|||
if [ "${cmd}" == "cd" ] ; then |
|||
cd ${par} |
|||
elif [ -f "${cmd}${mod_suffix}" ] ; then |
|||
insmod ${PWD%/}/${cmd}${mod_suffix} ${par} |
|||
elif [ -z "${cmd}" ] ; then |
|||
break |
|||
else |
|||
echo "No such module: ${cmd}" |
|||
fi |
|||
done |
|||
return |
|||
} # }}} |
|||
getdevice () { # {{{ |
|||
while : ; do |
|||
echo -en "\nDevice file to use (q to return) : "; |
|||
read device; |
|||
[ "${device}" == "q" ] && return -1; |
|||
if [ ! -e "${device}" ] ; then |
|||
echo -e "\nNot a valid device!" |
|||
else |
|||
devicefile=${device} |
|||
return 0; |
|||
fi |
|||
done |
|||
} # }}} |
|||
getcdromdevice () { # {{{ |
|||
cdroms="${1}" |
|||
floppies="${2}" |
|||
autoboot="${3}" |
|||
devicelists="/dev/cdroms/* /dev/floppy/*" |
|||
|
|||
[ "${cdroms}" == "0" -a "${floppies}" == "0" ] && return -1 |
|||
|
|||
devnr=0 |
|||
for dev in ${devicelists} ; do |
|||
[ -e "${dev}" ] || continue |
|||
[[ ${dev} = /dev/cdroms* ]] && [ "${cdroms}" == "0" ] && continue |
|||
[[ ${dev} = /dev/floppy* ]] && [ "${floppies}" == "0" ] && continue |
|||
|
|||
eval "device_${devnr}='${dev}'" |
|||
devnr=$((${devnr}+1)) |
|||
done |
|||
|
|||
[ ${devnr} -eq 0 ] && return -1 |
|||
|
|||
x=0 |
|||
floppy=1 |
|||
cdrom=1 |
|||
while [ ${x} -lt ${devnr} ] ; do |
|||
eval "device=\${device_${x}}" |
|||
if [[ ${device} = /dev/cdrom* ]] ; then |
|||
echo " ${x}. CD-ROM #${cdrom} (IDE/ATAPI or SCSI)" |
|||
cdrom=$((${cdrom}+1)) |
|||
fi |
|||
if [[ ${device} = /dev/flopp* ]] ; then |
|||
echo " ${x}. FDD (Floppy Disk Drive) #${floppy}" |
|||
floppy=$((${floppy}+1)) |
|||
fi |
|||
x=$((${x}+1)) |
|||
done |
|||
|
|||
echo -en "\nEnter number or device file name (default=0): " |
|||
|
|||
if [ ${autoboot} -eq 1 ] ; then |
|||
echo "0" |
|||
text=0 |
|||
else |
|||
read text |
|||
fi |
|||
|
|||
[ -z "${text}" ] && text=0 |
|||
|
|||
while : ; do |
|||
if [ -e "${text}" ] ; then |
|||
devicefile="${text}" |
|||
return 0 |
|||
fi |
|||
|
|||
eval "text=\"\${device_${text}}\"" |
|||
if [ -n "${text}" ] ; then |
|||
devicefile="${text}" |
|||
return 0 |
|||
fi |
|||
|
|||
echo -n "No such device found. Try again (enter=back): " |
|||
read text |
|||
[ -z "${text}" ] && return -1 |
|||
done |
|||
|
|||
return 1; |
|||
} # }}} |
|||
load_ramdisk_file() { # {{{ |
|||
devicetype=${1} |
|||
autoboot=${2} |
|||
mountopts="" |
|||
|
|||
echo -en "Select a device for loading the 2nd stage system from: \n\n" |
|||
|
|||
if [ "${devicetype}" == "cdroms" ] ; then |
|||
getcdromdevice 1 1 ${autoboot} || return |
|||
mountopts="-o ro" |
|||
else |
|||
getdevice || return |
|||
fi |
|||
|
|||
cat << EOF |
|||
Select a stage 2 image file: |
|||
|
|||
1. ${STAGE_2_BIG_IMAGE} |
|||
2. ${STAGE_2_SMALL_IMAGE} |
|||
|
|||
EOF |
|||
echo -n "Enter number or image file name (default=1): " |
|||
if [ ${autoboot} -eq 1 ] ; then |
|||
echo "1" |
|||
text=1 |
|||
else |
|||
read text |
|||
fi |
|||
|
|||
if [ -z "${text}" ] ; then |
|||
filename="${STAGE_2_BIG_IMAGE}" |
|||
elif [ "${text}" == "1" ] ; then |
|||
filename="${STAGE_2_BIG_IMAGE}" |
|||
elif [ "${text}" == "2" ] ; then |
|||
filename="${STAGE_2_SMALL_IMAGE}" |
|||
else |
|||
filename="${text}" |
|||
fi |
|||
|
|||
echo "Using ${devicefile}:${filename}." |
|||
|
|||
if ! mkdir -p /mnt_source ; then |
|||
echo "Can't create /mnt_source" |
|||
return 1 |
|||
fi |
|||
|
|||
if ! mount ${mountopts} ${devicefile} "/mnt_source" ; then |
|||
echo "Can't mount /mnt_source" |
|||
return 1 |
|||
fi |
|||
|
|||
if ! mkdir -p /mnt_root ; then |
|||
echo "Can't create /mnt_root" |
|||
return 1 |
|||
fi |
|||
|
|||
if ! mount -t tmpfs -o ${TMPFS_OPTIONS} tmpfs /mnt_root ; then |
|||
echo "Can't mount tmpfs on /mnt_root" |
|||
return 1 |
|||
fi |
|||
|
|||
echo "Extracting 2nd stage filesystem to RAM ..." |
|||
if ! tar ${STAGE_2_COMPRESS_ARG} -C /mnt_root -xf /mnt_source/${filename} ; then |
|||
echo "Can't extract /mnt/source/${filename}" |
|||
return 1 |
|||
fi |
|||
|
|||
if ! umount "/mnt_source" ; then |
|||
echo "Can't umount /mnt_source" |
|||
return 1 |
|||
fi |
|||
|
|||
if ! rmdir "/mnt_source" ; then |
|||
echo "Can't remove /mnt_source" |
|||
return 1 |
|||
fi |
|||
|
|||
export ROCK_INSTALL_SOURCE_DEV=${devicefile} |
|||
export ROCK_INSTALL_SOURCE_FILE=${filename} |
|||
doboot |
|||
} # }}} |
|||
activate_swap() { # {{{ |
|||
echo |
|||
echo -n "Enter file name of swap device: " |
|||
|
|||
read text |
|||
if [ -n "${text}" ] ; then |
|||
swapon ${text} |
|||
fi |
|||
} # }}} |
|||
config_net() { # {{{ |
|||
ip addr |
|||
echo |
|||
ip route |
|||
echo |
|||
|
|||
echo -n "Enter interface name (eth0): " |
|||
read dv |
|||
[ -z "${dv}" ] && dv="eth0" |
|||
|
|||
echo -n "Enter ip (192.168.0.254/24): " |
|||
read ip |
|||
[ -z "${ip}" ] && ip="192.168.0.254/24" |
|||
|
|||
ip addr add ${ip} dev ${dv} |
|||
ip link set ${dv} up |
|||
|
|||
echo -n "Enter default gateway (none): " |
|||
read gw |
|||
[ -n "${gw}" ] && ip route add default via ${gw} |
|||
|
|||
ip addr |
|||
echo |
|||
ip route |
|||
echo |
|||
} # }}} |
|||
exec_sh() { # {{{ |
|||
echo "Quit the shell to return to the stage 1 loader!" |
|||
/bin/sh |
|||
} # }}} |
|||
checkisomd5() { # {{{ |
|||
echo "Select a device for checking: " |
|||
|
|||
getcdromdevice 1 0 0 || return |
|||
echo "Running check..." |
|||
|
|||
/bin/checkisomd5 --verbose ${devicefile} |
|||
code=${?} |
|||
if [ ${code} -eq 0 ] ; then |
|||
echo "MD5Sum is correct." |
|||
elif [ ${code} -eq 1 ] ; then |
|||
echo "MD5Sum is NOT correct! Please contact the authors!" |
|||
fi |
|||
|
|||
echo "Press Return key to continue." |
|||
read |
|||
} # }}} |
|||
|
|||
emit_udev_events() { # {{{ |
|||
/sbin/udevtrigger |
|||
/sbin/udevsettle |
|||
} # }}} |
|||
|
|||
input=1 |
|||
[ -z "${autoboot}" ] && autoboot=0 |
|||
|
|||
mount / / -o remount,rw -n || echo "Can't remount / read-/writeable" |
|||
mount / / -o remount,rw || echo "Can't remount / read-/writeable (for mount log)" |
|||
mount -t tmpfs tmpfs /tmp -o ${TMPFS_OPTIONS} || echo "Can't mount a tmpfs on /tmp" |
|||
mount -t proc proc /proc || echo "Can't mount proc on /proc!" |
|||
|
|||
# /sbin/depmod -ae |
|||
|
|||
case "$( < /proc/version )" in |
|||
"Linux version 2.4."*) |
|||
mount -t devfs devfs /dev || echo "Can't mount devfs on /dev!" ;; |
|||
"Linux version 2.6."*) |
|||
mount -t sysfs sysfs /sys || echo "Can't mount sysfs on /sys!" |
|||
|
|||
if type -p udevd > /dev/null ; then |
|||
mount -t tmpfs tmpfs /dev || echo "Can't mount a tmpfs on /dev!" |
|||
|
|||
cp -r /lib/udev/devices/* /dev |
|||
|
|||
echo "" > /proc/sys/kernel/hotplug |
|||
/sbin/udevd --daemon |
|||
|
|||
# create nodes for devices already in kernel |
|||
emit_udev_events |
|||
mod_load_info |
|||
|
|||
# some devices (scsi...) need time to settle... |
|||
echo "Waiting for devices to settle..." |
|||
sleep 5 |
|||
fi ;; |
|||
esac |
|||
|
|||
ip addr add 127.0.0.1 dev lo |
|||
ip link set lo up |
|||
|
|||
if [ ${autoboot} -eq 1 ] ; then |
|||
load_ramdisk_file cdroms 1 |
|||
fi |
|||
autoboot=0 |
|||
cat << EOF |
|||
============================================ |
|||
=== ROCK Linux 1st stage boot system === |
|||
============================================ |
|||
|
|||
The ROCK Linux install / rescue system boots up in two stages. You |
|||
are now in the first of this two stages and if everything goes right |
|||
you will not spend much time here. Just load your SCSI and networking |
|||
drivers (if needed) and configure the installation source so the |
|||
2nd stage boot system can be loaded and you can start the installation. |
|||
EOF |
|||
while : ; do |
|||
cat <<EOF |
|||
0. Load 2nd stage system from cdrom or floppy drive |
|||
1. Load 2nd stage system from any device |
|||
2. Load 2nd stage system from network |
|||
3. Configure network interfaces (IPv4 only) |
|||
4. Load kernel modules from this disk |
|||
5. Load kernel modules from another disk |
|||
6. Activate already formatted swap device |
|||
7. Execute a shell (for experts!) |
|||
8. Validate a CD/DVD against its embedded checksum |
|||
|
|||
EOF |
|||
echo -n "What do you want to do [0-8] (default=0)? " |
|||
read text |
|||
[ -z "${text}" ] && text=0 |
|||
input=${text//[^0-9]/} |
|||
|
|||
|
|||
case "${input}" in |
|||
0) |
|||
load_ramdisk_file cdroms 0 |
|||
;; |
|||
1) |
|||
load_ramdisk_file any 0 |
|||
;; |
|||
2) |
|||
httpload |
|||
;; |
|||
3) |
|||
config_net |
|||
;; |
|||
4) |
|||
load_modules "${mod_dir}" |
|||
;; |
|||
5) |
|||
mkdir "/mnt_floppy" || echo "Can't create /mnt_floppy" |
|||
trymount "/dev/floppy/0" "/mnt_floppy" && load_modules "/mnt_floppy" |
|||
umount "/mnt_floppy" || echo "Can't umount /mnt_floppy" |
|||
rmdir "/mnt_floppy" || echo "Can't remove /mnt_floppy" |
|||
;; |
|||
6) |
|||
activate_swap |
|||
;; |
|||
7) |
|||
exec_sh |
|||
;; |
|||
8) |
|||
checkisomd5 |
|||
;; |
|||
*) |
|||
echo "No such option present!" |
|||
esac |
|||
done |