@ -0,0 +1,39 @@ |
|||
/bin/tar /bin/tar |
|||
/bin/gzip /bin/gzip |
|||
/bin/bash2 /bin/bash2 |
|||
/bin/bash3 /bin/bash3 |
|||
/bin/bash /bin/bash |
|||
/bin/sh /bin/sh |
|||
/bin/mount /bin/mount |
|||
/bin/umount /bin/umount |
|||
/bin/ls /bin/ls |
|||
/bin/sed /bin/sed |
|||
/bin/cut /bin/cut |
|||
/bin/cp /bin/cp |
|||
/bin/cat /bin/cat |
|||
/bin/uname /bin/uname |
|||
/bin/rm /bin/rm |
|||
/bin/ln /bin/ln |
|||
/bin/mkdir /bin/mkdir |
|||
/bin/rmdir /bin/rmdir |
|||
/bin/find /bin/find |
|||
/bin/gawk /bin/gawk |
|||
/bin/awk /bin/awk |
|||
/bin/grep /bin/grep |
|||
/bin/sleep /bin/sleep |
|||
/sbin/ip /sbin/ip |
|||
/sbin/hwscan /sbin/hwscan |
|||
/sbin/pivot_root /sbin/pivot_root |
|||
/sbin/swapon /sbin/swapon |
|||
/sbin/swapoff /sbin/swapoff |
|||
/sbin/udevd /sbin/udevd |
|||
/sbin/udevsettle /sbin/udevsettle |
|||
/sbin/udevtrigger /sbin/udevtrigger |
|||
/usr/bin/wget /usr/bin/wget |
|||
/usr/bin/expand /usr/bin/expand |
|||
/usr/bin/readlink /usr/bin/readlink |
|||
/usr/bin/basename /usr/bin/basename |
|||
/usr/bin/tr /usr/bin/tr |
|||
/usr/sbin/lspci /usr/sbin/lspci |
|||
/etc/udev /etc/udev |
|||
/lib/udev /lib/udev |
@ -0,0 +1,503 @@ |
|||
#!/bin/bash |
|||
|
|||
STAGE_2_BIG_IMAGE="2nd_stage.tar.gz" |
|||
STAGE_2_SMALL_IMAGE="2nd_stage_small.tar.gz" |
|||
STAGE_2_COMPRESS_ARG="--use-compress-program=gzip" |
|||
|
|||
#640kB, err, 64 MB should be enought for the tmpfs ;-) |
|||
TMPFS_OPTIONS="size=67108864" |
|||
|
|||
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 /mnt_root/old_root ; then |
|||
echo "Can't create /mnt_root/old_root" |
|||
exit_linuxrc=0 |
|||
fi |
|||
|
|||
if [ ! -f /mnt_root/sbin/init ] ; then |
|||
echo "Can't find /mnt_root/sbin/init!" |
|||
exit_linuxrc=0 |
|||
fi |
|||
|
|||
if [ ${exit_linuxrc} -ne 0 ] ; then |
|||
if ! pivot_root "/mnt_root" "/mnt_root/old_root" ; then |
|||
echo "Can't call pivot_root" |
|||
exit_linuxrc=0 |
|||
return |
|||
fi |
|||
cd / |
|||
|
|||
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 ! mount --move /old_root/sys /sys ; then |
|||
echo "Can't remount /old_root/sys as /sys" |
|||
fi |
|||
|
|||
if ! umount /old_root/tmp ; then |
|||
echo "Can't umount /old_root/tmp" |
|||
fi |
|||
|
|||
else |
|||
rmdir /mnt_root/old_root || echo "Can't remove /mnt_root/old_root" |
|||
|
|||
umount /mnt_root || echo "Can't umount /mnt_root" |
|||
rmdir /mnt_root || echo "Can't remove /mnt_root" |
|||
fi |
|||
} # }}} |
|||
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} |
|||
|
|||
exit_linuxrc=1; |
|||
if ! mkdir /mnt_root ; then |
|||
echo "Can't create /mnt_root" |
|||
exit_linuxrc=0 |
|||
fi |
|||
|
|||
if ! mount -t tmpfs -O ${TMPFS_OPTIONS} none /mnt_root ; then |
|||
echo "Can't mount /mnt_root" |
|||
exit_linuxrc=0 |
|||
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 |
|||
|
|||
exit_linuxrc=1 |
|||
echo "Using ${devicefile}:${filename}." |
|||
|
|||
if ! mkdir -p /mnt_source ; then |
|||
echo "Can't create /mnt_source" |
|||
exit_linuxrc=0 |
|||
fi |
|||
|
|||
if ! mount ${mountopts} ${devicefile} "/mnt_source" ; then |
|||
echo "Can't mount /mnt_source" |
|||
exit_linuxrc=0 |
|||
fi |
|||
|
|||
if ! mkdir -p /mnt_root ; then |
|||
echo "Can't create /mnt_root" |
|||
exit_linuxrc=0 |
|||
fi |
|||
|
|||
if ! mount -t tmpfs -o ${TMPFS_OPTIONS} tmpfs /mnt_root ; then |
|||
echo "Can't mount tmpfs on /mnt_root" |
|||
exit_linuxrc=0 |
|||
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}" |
|||
exit_linuxrc=0 |
|||
return 1 |
|||
fi |
|||
|
|||
if ! umount "/mnt_source" ; then |
|||
echo "Can't umount /mnt_source" |
|||
exit_linuxrc=0 |
|||
fi |
|||
|
|||
if ! rmdir "/mnt_source" ; then |
|||
echo "Can't remove /mnt_source" |
|||
exit_linuxrc=0 |
|||
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 ${devicefile} |
|||
code=${?} |
|||
if [ ${code} -eq 1 ] ; then |
|||
echo "MD5Sum is correct." |
|||
elif [ ${code} -eq 0 ] ; 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 |
|||
exit_linuxrc=0 |
|||
[ -z "${autoboot}" ] && autoboot=0 |
|||
|
|||
# mount / / -o remount,rw || 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!" |
|||
mount -t sysfs sysfs /sys || echo "Can't mount sysfs on /sys!" |
|||
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 |
|||
|
|||
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 [ ${exit_linuxrc} -eq 0 ] ; 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 |
|||
|
|||
exec /sbin/init |
|||
echo "Can't start /sbin/init!! Life sucks.\n\n" |
|||
|
@ -0,0 +1,90 @@ |
|||
#!/bin/sh |
|||
|
|||
export PATH="/sbin:/bin:/usr/sbin:/usr/bin" |
|||
if type -p gzip > /dev/null ; then |
|||
umount -d /old_root ; rmdir /old_root |
|||
else |
|||
PATH="$PATH:/old_root/bin" |
|||
for x in /old_root/* ; do |
|||
rmdir $x 2> /dev/null || rm -f $x 2> /dev/null |
|||
done |
|||
fi |
|||
grep -v "^rootfs " /proc/mounts > /etc/mtab |
|||
freeramdisk /dev/rd/* 2> /dev/null |
|||
|
|||
mkdir -p /lib/modules/$( uname -r ) |
|||
echo -n >> /lib/modules/$( uname -r )/modules.dep |
|||
|
|||
setterm -blank 0 -powersave off -powerdown 0 |
|||
|
|||
echo |
|||
echo ' ******************************************************************' |
|||
echo ' * Welcome to the ROCK Linux 2nd stage boot disk. *' |
|||
echo ' ******************************************************************' |
|||
echo |
|||
echo "This is a small linux distribution, loaded into your computer's memory." |
|||
echo "It has everything needed to install ROCK Linux, restore an old installation" |
|||
echo "or perform some administrative tasks." |
|||
|
|||
for x in /etc/setup-*.sh /setup/setup.sh ; do |
|||
if [ -f "$x" ] ; then |
|||
echo ; echo "Running $x ..." ; sh $x |
|||
echo "Setup script $x finished." |
|||
fi |
|||
done |
|||
|
|||
echo |
|||
ttydevs="" |
|||
|
|||
if [ -z "$autoboot" ]; then |
|||
echo "Enter the names of all terminal devices (e.g. 'vc/1' or 'tts/0')." |
|||
echo -n "An empty text stands for vc/1 - vc/6: "; read ttydevs |
|||
fi |
|||
|
|||
if [ -z "$ttydevs" ]; then |
|||
ttydevs="vc/1 vc/2 vc/3 vc/4 vc/5 vc/6" |
|||
fi |
|||
|
|||
if [[ "$ttydevs" = *tts/* ]] ; then |
|||
echo -n "Connection speed in Baud (default: 9600): " ; read baud |
|||
[ -z "$baud" ] && baud=9600 |
|||
else |
|||
baud=38400 |
|||
fi |
|||
|
|||
echo |
|||
echo 'Just type "stone" now if you want to make a normal installation of a ROCK' |
|||
echo -n 'Linux build ' |
|||
if type -p dialog > /dev/null ; then |
|||
echo '(or type "stone -text" if you prefer non-dialog based menus).' |
|||
else |
|||
echo '(only the text interface is available).' |
|||
fi |
|||
|
|||
if [ -z "$autoboot" ]; then |
|||
echo -e '#!/bin/sh\ncd ; exec /bin/sh --login' > /sbin/login-shell |
|||
else |
|||
cat <<- EOT > /sbin/login-shell |
|||
#!/bin/bash |
|||
cd |
|||
case "\$( tty )" in |
|||
/dev/vc/1) |
|||
echo "Running 'stone' now.." |
|||
/bin/sh --login -c "stone" |
|||
echo -e '#!/bin/sh\\ncd ; exec /bin/sh --login' > /sbin/login-shell |
|||
exit 0 |
|||
;; |
|||
*) |
|||
exec /bin/sh --login |
|||
esac |
|||
EOT |
|||
fi |
|||
chmod +x /sbin/login-shell |
|||
|
|||
for x in $ttydevs ; do |
|||
( ( while : ; do agetty -i $baud $x -n -l /sbin/login-shell ; done ) & ) |
|||
done |
|||
|
|||
exec < /dev/null > /dev/null 2>&1 |
|||
while : ; do sleep 1 ; done |
|||
|
@ -0,0 +1,21 @@ |
|||
#!/bin/sh |
|||
|
|||
echo "Sending all processes a SIGTERM (15)." |
|||
killall5 -15 || error=$? ; sleep 5 |
|||
|
|||
echo "Sending all processes a 2nd SIGTERM (15)." |
|||
killall5 -15 || error=$? ; sleep 5 |
|||
|
|||
echo "Sending all processes a SIGKILL (9)." |
|||
killall5 -9 || error=$? ; sleep 5 |
|||
|
|||
echo "Turning off swap devices." |
|||
swapoff -a || error=$? |
|||
sync ; sleep 1 |
|||
|
|||
echo "Unmounting filesystems." |
|||
umount -advf || error=$? |
|||
|
|||
echo "Reboot ..." |
|||
reboot -f |
|||
|
@ -0,0 +1,30 @@ |
|||
|
|||
mainfunction="bootloader_mainfunction" |
|||
|
|||
bootloader_mainfunction () |
|||
{ |
|||
|
|||
if [ "$ROCK_BUILD_TARGET" != 1 ] ; then |
|||
echo "$xpkg can only be built with ./scripts/Build-Target!" |
|||
false |
|||
fi |
|||
|
|||
build_rock="$xroot/ROCK" |
|||
disksdir="$build_rock/$target" |
|||
|
|||
if [ -f $confdir/$arch/build.sh ]; then |
|||
. $confdir/$arch/build.sh |
|||
fi |
|||
|
|||
echo "Creating ISO filesystem description." |
|||
cd $disksdir; rm -rf isofs; mkdir -p isofs |
|||
|
|||
echo "Creating isofs directory.." |
|||
ln 2nd_stage.tar.gz 2nd_stage_small.tar.gz isofs/ |
|||
ln *.img initrd.gz isofs/ 2>/dev/null || true # might not exist on some architectures |
|||
|
|||
echo "Creating isofs.txt file .." |
|||
echo "DISK1 build/${ROCKCFG_ID}/ROCK/$target/isofs/ ` |
|||
`${ROCKCFG_SHORTID}/" > $build_rock/isofs_bootdisk.txt |
|||
|
|||
} |
@ -0,0 +1,37 @@ |
|||
|
|||
[COPY] --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
|||
[COPY] |
|||
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|||
[COPY] Please add additional copyright information _after_ the line containing |
|||
[COPY] the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
|||
[COPY] the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
|||
[COPY] |
|||
[COPY] ROCK Linux: rock-src/package/base/mdadm/mdadm.desc |
|||
[COPY] ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf |
|||
[COPY] |
|||
[COPY] This program is free software; you can redistribute it and/or modify |
|||
[COPY] it under the terms of the GNU General Public License as published by |
|||
[COPY] the Free Software Foundation; either version 2 of the License, or |
|||
[COPY] (at your option) any later version. A copy of the GNU General Public |
|||
[COPY] License can be found at Documentation/COPYING. |
|||
[COPY] |
|||
[COPY] Many people helped and are helping developing ROCK Linux. Please |
|||
[COPY] have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
|||
[COPY] file for details. |
|||
[COPY] |
|||
[COPY] --- ROCK-COPYRIGHT-NOTE-END --- |
|||
|
|||
[I] Boot-loaders for target builds |
|||
|
|||
[T] This package adds CD and floppy boot-loaders to a target. |
|||
|
|||
[A] The ROCK Linux Project |
|||
[M] The ROCK Linux Project |
|||
|
|||
[C] extra/base |
|||
|
|||
[L] GPL |
|||
[S] Stable |
|||
[V] 1 |
|||
[P] O --------8- 196.200 |
|||
|
@ -0,0 +1,16 @@ |
|||
____ ___ ___ _ __ _ |
|||
| _ \ / _ \ / __| |/ / | | _ _ __ _ _ _ _ |
|||
| . _/| | | | | | '_/ | | |_| '_ \| | | | \/ | |
|||
| |\ \| |_| | |__| . \ | |__| | | | | `_' |> < |
|||
|_| \_\ ___/ \___|_|\_\ |____|_|_| |_|\___/|_/\_| |
|||
[============> http://www.rocklinux.org/ <============] |
|||
|
|||
So you are going to install ROCK Linux ... |
|||
|
|||
Possible choices are: |
|||
install ........... normal CD boot |
|||
install-novideo .., normal CD boot without accelerated framebuffer |
|||
hd-install ........ boot from hard-disc image |
|||
hd-install-novide . boot from hard-disc image without accelerated framebuffer |
|||
|
|||
. |
@ -0,0 +1,50 @@ |
|||
|
|||
use_yaboot=1 |
|||
|
|||
cd $disksdir |
|||
|
|||
echo "Creating cleaning boot directory:" |
|||
rm -rfv boot/*-rock boot/System.map boot/kconfig* |
|||
|
|||
if [ $use_yaboot -eq 1 ] |
|||
then |
|||
echo "Creating yaboot setup:" |
|||
# |
|||
echo "Extracting yaboot boot loader images." |
|||
mkdir -p boot etc |
|||
tar -O $taropt $base/build/${ROCKCFG_ID}/ROCK/pkgs/yaboot.tar.bz2 \ |
|||
usr/lib/yaboot/yaboot > boot/yaboot |
|||
tar -O $taropt $base/build/${ROCKCFG_ID}/ROCK/pkgs/yaboot.tar.bz2 \ |
|||
usr/lib/yaboot/yaboot.rs6k > boot/yaboot.rs6k |
|||
cp boot/yaboot.rs6k install.bin |
|||
# |
|||
echo "Creating yaboot config files." |
|||
cp -v $confdir/powerpc/{boot.msg,ofboot.b} \ |
|||
boot |
|||
( |
|||
echo "device=cdrom:" |
|||
cat $confdir/powerpc/yaboot.conf |
|||
) > etc/yaboot.conf |
|||
( |
|||
echo "device=cd:" |
|||
cat $confdir/powerpc/yaboot.conf |
|||
) > boot/yaboot.conf |
|||
# |
|||
echo "Moving image (initrd) to boot directory." |
|||
mv -v initrd.gz boot/ |
|||
# |
|||
echo "Copy more config files." |
|||
cp -v $confdir/powerpc/mapping . |
|||
# |
|||
datadir="build/${ROCKCFG_ID}/ROCK/$target" |
|||
cat > $xroot/ROCK/isofs_arch.txt <<- EOT |
|||
BOOT -hfs -part -map $datadir/mapping -hfs-volid "ROCK_Linux_CD" |
|||
BOOTx -hfs-bless boot -sysid PPC -l -L -r -T -chrp-boot |
|||
BOOTx --prep-boot install.bin |
|||
DISK1 $datadir/boot/ boot/ |
|||
DISK1 $datadir/etc/ etc/ |
|||
DISK1 $datadir/install.bin install.bin |
|||
EOT |
|||
# SCRIPT sh $confdir/powerpc/bless-rs6k.sh $disksdir |
|||
fi |
|||
|
@ -0,0 +1,10 @@ |
|||
# Example filename mapping file |
|||
# |
|||
# EXTN XLate CREATOR TYPE Comment |
|||
.b Raw 'UNIX' 'tbxi' "bootstrap" |
|||
yaboot Raw 'UNIX' 'boot' "bootstrap" |
|||
*linux Raw 'UNIX' 'boot' "kernel" |
|||
*.conf Raw 'UNIX' 'conf' "bootstrap" |
|||
root.bin Raw 'UNIX' 'root' "root_image" |
|||
* Raw '????' '????' "Unknown" |
|||
|
@ -0,0 +1,64 @@ |
|||
<CHRP-BOOT> |
|||
<COMPATIBLE> |
|||
MacRISC MacRISC3 |
|||
</COMPATIBLE> |
|||
<DESCRIPTION> |
|||
GNU/Linux PPC bootloader |
|||
</DESCRIPTION> |
|||
<BOOT-SCRIPT> |
|||
" screen" output |
|||
load-base release-load-area |
|||
boot cd:,\\yaboot |
|||
</BOOT-SCRIPT> |
|||
<OS-BADGE-ICONS> |
|||
1010 |
|||
000000000000F8FEACF6000000000000 |
|||
0000000000F5FFFFFEFEF50000000000 |
|||
00000000002BFAFEFAFCF70000000000 |
|||
0000000000F65D5857812B0000000000 |
|||
0000000000F5350B2F88560000000000 |
|||
0000000000F6335708F8FE0000000000 |
|||
00000000005600F600F5FD8100000000 |
|||
00000000F9F8000000F5FAFFF8000000 |
|||
000000008100F5F50000F6FEFE000000 |
|||
000000F8F700F500F50000FCFFF70000 |
|||
00000088F70000F50000F5FCFF2B0000 |
|||
0000002F582A00F5000008ADE02C0000 |
|||
00090B0A35A62B0000002D3B350A0000 |
|||
000A0A0B0B3BF60000505E0B0A0B0A00 |
|||
002E350B0B2F87FAFCF45F0B2E090000 |
|||
00000007335FF82BF72B575907000000 |
|||
000000000000ACFFFF81000000000000 |
|||
000000000081FFFFFFFF810000000000 |
|||
0000000000FBFFFFFFFFAC0000000000 |
|||
000000000081DFDFDFFFFB0000000000 |
|||
000000000081DD5F83FFFD0000000000 |
|||
000000000081DDDF5EACFF0000000000 |
|||
0000000000FDF981F981FFFF00000000 |
|||
00000000FFACF9F9F981FFFFAC000000 |
|||
00000000FFF98181F9F981FFFF000000 |
|||
000000ACACF981F981F9F9FFFFAC0000 |
|||
000000FFACF9F981F9F981FFFFFB0000 |
|||
00000083DFFBF981F9F95EFFFFFC0000 |
|||
005F5F5FDDFFFBF9F9F983DDDD5F0000 |
|||
005F5F5F5FDD81F9F9E7DF5F5F5F5F00 |
|||
0083DD5F5F83FFFFFFFFDF5F835F0000 |
|||
000000FBDDDFACFBACFBDFDFFB000000 |
|||
000000000000FFFFFFFF000000000000 |
|||
0000000000FFFFFFFFFFFF0000000000 |
|||
0000000000FFFFFFFFFFFF0000000000 |
|||
0000000000FFFFFFFFFFFF0000000000 |
|||
0000000000FFFFFFFFFFFF0000000000 |
|||
0000000000FFFFFFFFFFFF0000000000 |
|||
0000000000FFFFFFFFFFFFFF00000000 |
|||
00000000FFFFFFFFFFFFFFFFFF000000 |
|||
00000000FFFFFFFFFFFFFFFFFF000000 |
|||
000000FFFFFFFFFFFFFFFFFFFFFF0000 |
|||
000000FFFFFFFFFFFFFFFFFFFFFF0000 |
|||
000000FFFFFFFFFFFFFFFFFFFFFF0000 |
|||
00FFFFFFFFFFFFFFFFFFFFFFFFFF0000 |
|||
00FFFFFFFFFFFFFFFFFFFFFFFFFFFF00 |
|||
00FFFFFFFFFFFFFFFFFFFFFFFFFF0000 |
|||
000000FFFFFFFFFFFFFFFFFFFF000000 |
|||
</OS-BADGE-ICONS> |
|||
</CHRP-BOOT> |
@ -0,0 +1,24 @@ |
|||
message=/boot/boot.msg |
|||
|
|||
timeout = 120 |
|||
default = auto |
|||
|
|||
## CD-ROM Installs ## |
|||
image=/boot/vmlinux |
|||
label=auto |
|||
initrd=/boot/initrd.gz |
|||
initrd-size=12288 |
|||
append="root=/dev/ram0 devfs=nocompat autoboot=1 rw" |
|||
|
|||
image=/boot/vmlinux |
|||
label=install |
|||
initrd=/boot/initrd.gz |
|||
initrd-size=12288 |
|||
append="root=/dev/ram0 devfs=nocompat rw" |
|||
|
|||
image=/boot/vmlinux |
|||
label=install-novideo |
|||
initrd=/boot/initrd.gz |
|||
initrd-size=12288 |
|||
append="root=/dev/ram0 devfs=nocompat rw video=ofonly" |
|||
|
@ -0,0 +1,20 @@ |
|||
____ ___ ___ _ __ _ |
|||
| _ \ / _ \ / __| |/ / | | _ _ __ _ _ _ _ |
|||
| . _/| | | | | | '_/ | | |_| '_ \| | | | \/ | |
|||
| |\ \| |_| | |__| . \ | |__| | | | | `_' |> < |
|||
|_| \_\ ___/ \___|_|\_\ |____|_|_| |_|\___/|_/\_| |
|||
[============> http://www.rocklinux.org/ <============] |
|||
|
|||
Help Screens: |
|||
------------- |
|||
|
|||
<1> Installation overview |
|||
<0> This help-text |
|||
|
|||
Actions: |
|||
-------- |
|||
|
|||
<ENTER> Start installation |
|||
install options <Enter> Start install with the given kernel options |
|||
help Show SILO's help |
|||
|
@ -0,0 +1,27 @@ |
|||
|
|||
cd $disksdir |
|||
|
|||
echo "Cleaning boot directory:" |
|||
rm -rfv boot/*-rock boot/System.map boot/kconfig* boot/initrd*img boot/*.b |
|||
|
|||
echo "Creating silo setup:" |
|||
# |
|||
echo "Extracting silo boot loader images." |
|||
mkdir -p boot |
|||
tar $taropt $base/build/${ROCKCFG_ID}/ROCK/pkgs/silo.tar.bz2 \ |
|||
boot/second.b -O > boot/second.b |
|||
# |
|||
echo "Creating silo config file." |
|||
cp -v $confdir/sparc/{silo.conf,boot.msg,help1.txt} \ |
|||
boot |
|||
# |
|||
echo "Moving image (initrd) to boot directory." |
|||
mv -v initrd.gz boot/ |
|||
# |
|||
buildroot="build/${ROCKCFG_ID}" |
|||
datadir="build/${ROCKCFG_ID}/ROCK/$target" |
|||
cat > $xroot/ROCK/isofs_arch.txt <<- EOT |
|||
BOOT -G $buildroot/boot/isofs.b -B ... |
|||
DISK1 $datadir/boot/ boot/ |
|||
EOT |
|||
|
@ -0,0 +1,22 @@ |
|||
Installation Overview: |
|||
|
|||
The ROCK Linux install / rescue system boots up in two stages. In the first |
|||
stage only a small binary is running which is used to load the complete |
|||
install / rescue system into the memory. So in the first stage you can load |
|||
network and scsi kernel modules, configure network devices (for netwok |
|||
installation) or load the system from a floppy or CD-ROM device. |
|||
|
|||
For a normal installation from the first CD-ROM you only need to press enter |
|||
for each question to do use default options. |
|||
|
|||
You can freely choose which terminal devices (e.g. 'vc/1' or 'tts/0'). |
|||
If you just hit <ENTER>, you'll use vc/1 to vc/6. |
|||
|
|||
To start the installation just exectute our Setup Tool ONE via 'stone' or |
|||
'stone -text', if you prefer non-dialog based menus. |
|||
|
|||
|
|||
In STONE you can create your partitions and filesystems and after selecting |
|||
the Package Manager choose wich packages to install. |
|||
|
|||
At the end reboot your machine with 'reboot -f'. |
@ -0,0 +1,22 @@ |
|||
partition=1 |
|||
timeout=600 |
|||
message=/boot/boot.msg |
|||
default=install |
|||
root=/dev/ram0 |
|||
initrd=/boot/initrd.gz |
|||
read-write |
|||
append="devfs=nocompat" |
|||
|
|||
image="cat /boot/boot.msg" |
|||
label=0 |
|||
single-key |
|||
image="cat /boot/help1.txt" |
|||
label=1 |
|||
single-key |
|||
|
|||
image[sun4u]=/boot/vmlinux64.gz |
|||
label=install |
|||
alias=linux |
|||
image[sun4c,sun4d,sun4m]=/boot/vmlinux32.gz |
|||
label=install |
|||
alias=linux |
@ -0,0 +1,62 @@ |
|||
|
|||
use_isolinux=1 |
|||
syslinux_ver="`sed -n 's,.*syslinux-\(.*\).tar.*,\1,p' \ |
|||
$base/target/bootdisk/download.txt`" |
|||
use_mdlbl=1 |
|||
mdlbl_ver="`sed -n 's,.*mdlbl-\(.*\).tar.*,\1,p' \ |
|||
$base/target/bootdisk/download.txt`" |
|||
|
|||
cd $disksdir |
|||
|
|||
echo "Creating lilo config and cleaning boot directory:" |
|||
cp $confdir/x86/lilo-* boot/ |
|||
rm -rfv boot/*-rock boot/grub boot/System.map boot/kconfig boot/*.24** |
|||
|
|||
echo "Creating floppy disk images:" |
|||
cp $confdir/x86/makeimages.sh . |
|||
chmod +x makeimages.sh |
|||
|
|||
if [ $use_mdlbl -eq 1 ] |
|||
then |
|||
tar $taropt $base/download/mirror/m/mdlbl-$mdlbl_ver.tar.bz2 |
|||
cd mdlbl-$mdlbl_ver |
|||
cp ../boot/vmlinuz .; cp ../initrd.gz initrd; ./makedisks.sh |
|||
for x in disk*.img; do mv $x ../floppy${x#disk}; done; cd .. |
|||
du -sh floppy*.img | while read x; do echo $x; done |
|||
else |
|||
tmpfile=`mktemp -p $PWD` |
|||
if sh ./makeimages.sh &> $tmpfile; then |
|||
cat $tmpfile | while read x; do echo "$x"; done |
|||
else |
|||
cat $tmpfile | while read x; do echo "$x"; done |
|||
fi |
|||
rm -f $tmpfile |
|||
cat > $xroot/ROCK/isofs_arch.txt <<- EOT |
|||
BOOT -b ${ROCKCFG_SHORTID}/boot_288.img -c ${ROCKCFG_SHORTID}/boot.catalog |
|||
EOT |
|||
fi |
|||
|
|||
if [ $use_isolinux -eq 1 ] |
|||
then |
|||
echo "Creating isolinux setup:" |
|||
# |
|||
echo "Extracting isolinux boot loader." |
|||
mkdir -p isolinux |
|||
tar -O $taropt $base/download/mirror/s/syslinux-$syslinux_ver.tar.bz2 \ |
|||
syslinux-$syslinux_ver/isolinux.bin > isolinux/isolinux.bin |
|||
# |
|||
echo "Creating isolinux config file." |
|||
cp $confdir/x86/isolinux.cfg isolinux/ |
|||
cp $confdir/x86/help?.txt isolinux/ |
|||
# |
|||
echo "Copy images to isolinux directory." |
|||
[ -e boot/memtest86.bin ] && cp boot/memtest86.bin isolinux/memtest86 || true |
|||
cp initrd.gz boot/vmlinuz isolinux/ |
|||
# |
|||
cat > $xroot/ROCK/isofs_arch.txt <<- EOT |
|||
BOOT -b isolinux/isolinux.bin -c isolinux/boot.catalog |
|||
BOOTx -no-emul-boot -boot-load-size 4 -boot-info-table |
|||
DISK1 build/${ROCKCFG_ID}/ROCK/$target/isolinux/ isolinux/ |
|||
EOT |
|||
fi |
|||
|
@ -0,0 +1,22 @@ |
|||
____ ___ ___ _ __ _ |
|||
| _ \ / _ \ / __| |/ / | | _ _ __ _ _ _ _ |
|||
| . _/| | | | | | '_/ | | |_| '_ \| | | | \/ | |
|||
| |\ \| |_| | |__| . \ | |__| | | | | `_' |> < |
|||
|_| \_\ ___/ \___|_|\_\ |____|_|_| |_|\___/|_/\_| |
|||
[============> http://www.rocklinux.org/ <============] |
|||
|
|||
Help Screens: |
|||
------------- |
|||
|
|||
<F1> <Ctrl-F><1> Installation overview |
|||
<F2> <Ctrl-F><2> Installing on systems with less than 64 MB RAM |
|||
<F10> <Ctrl-F><0> This help-text |
|||
|
|||
Actions: |
|||
-------- |
|||
|
|||
<ENTER> Start installation system |
|||
ROCK [options] <Enter> The same with interactive stage 1 (for experts) |
|||
linux [options] <Enter> Boot a plain linux kernel (for rescue purposes) |
|||
memtest86 <Enter> Boot the memtest86 mini-os |
|||
|
@ -0,0 +1,22 @@ |
|||
Installation Overview: |
|||
|
|||
The ROCK Linux install / rescue system boots up in two stages. In the first |
|||
stage only a small binary is running which is used to load the complete |
|||
install / rescue system into the memory. So in the first stage you can load |
|||
network and scsi kernel modules, configure network devices (for netwok |
|||
installation) or load the system from a floppy or CD-ROM device. |
|||
|
|||
For a normal installation from the first CD-ROM you only need to press enter |
|||
for each question to do use default options. |
|||
|
|||
You can freely choose which terminal devices (e.g. 'vc/1' or 'tts/0'). |
|||
If you just hit <ENTER>, you'll use vc/1 to vc/6. |
|||
|
|||
To start the installation just exectute our Setup Tool ONE via 'stone' or |
|||
'stone -text', if you prefer non-dialog based menus. |
|||
|
|||
|
|||
In STONE you can create your partitions and filesystems and after selecting |
|||
the Package Manager choose wich packages to install. |
|||
|
|||
At the end reboot your machine with 'reboot -f'. |
@ -0,0 +1,13 @@ |
|||
Installation on systems with less than 64MB of RAM: |
|||
|
|||
To load the ramdisk for the 2nd stage installation you nead arround |
|||
20MB of RAM. It can also be loaded on small sized memory systems when |
|||
a swap partition is available. If you already have partitionized the |
|||
disk you can activate it in the first stage program using the option |
|||
"Activate already formatted swap device". |
|||
|
|||
If you need to partitionize your disk you can load a very small ram- |
|||
disk ("2nd_stage_small") to perform initial configuration such as |
|||
partitionizing the disk, and then reboot to choose the normal 2nd_ |
|||
stage file for installation. |
|||
|
@ -0,0 +1,36 @@ |
|||
|
|||
DEFAULT auto |
|||
TIMEOUT 600 |
|||
PROMPT 1 |
|||
|
|||
DISPLAY help0.txt |
|||
|
|||
F1 help1.txt |
|||
F2 help2.txt |
|||
F3 help3.txt |
|||
F4 help4.txt |
|||
F5 help5.txt |
|||
F6 help6.txt |
|||
F7 help7.txt |
|||
F8 help8.txt |
|||
F9 help9.txt |
|||
F0 help0.txt |
|||
|
|||
LABEL auto |
|||
kernel vmlinuz |
|||
APPEND initrd=initrd.gz root=/dev/ram0 devfs=nocompat autoboot=1 rw |
|||
|
|||
LABEL ROCK |
|||
kernel vmlinuz |
|||
APPEND initrd=initrd.gz root=/dev/ram0 devfs=nocompat rw |
|||
|
|||
LABEL ramdisk |
|||
kernel vmlinuz |
|||
APPEND initrd=initrd.gz root=/dev/ram0 devfs=nocompat rw |
|||
|
|||
LABEL linux |
|||
kernel vmlinuz |
|||
|
|||
LABEL memtest86 |
|||
kernel memtest86 |
|||
|
@ -0,0 +1,30 @@ |
|||
disk=/dev/floppy/0 |
|||
bios = 0x00 |
|||
sectors = 18 |
|||
heads = 2 |
|||
cylinders = 80 |
|||
|
|||
nowarn |
|||
boot=/dev/floppy/0 |
|||
install=/mnt/boot.b |
|||
map=/mnt/map |
|||
vga=normal |
|||
message=/mnt/lilo-help.txt |
|||
geometric |
|||
compact |
|||
prompt |
|||
|
|||
image=/mnt/vmlinuz |
|||
read-write |
|||
append="root=/dev/fd devfs=nocompat \ |
|||
load_ramdisk=1 prompt_ramdisk=1 \ |
|||
ramdisk_size=12288" |
|||
label=ramdisk |
|||
|
|||
image=/mnt/vmlinuz |
|||
label=linux |
|||
|
|||
image=/mnt/memtest.bin |
|||
label=memtest |
|||
optional |
|||
|
@ -0,0 +1,29 @@ |
|||
disk=/dev/floppy/0 |
|||
bios = 0x00 |
|||
sectors = 18 |
|||
heads = 2 |
|||
cylinders = 80 |
|||
|
|||
nowarn |
|||
boot=/dev/floppy/0 |
|||
install=/mnt/boot.b |
|||
map=/mnt/map |
|||
vga=normal |
|||
message=/mnt/lilo-help.txt |
|||
geometric |
|||
compact |
|||
prompt |
|||
|
|||
image=/mnt/vmlinuz |
|||
read-write |
|||
append="root=/dev/ram0 devfs=nocompat" |
|||
initrd=/mnt/initrd.gz |
|||
label=ramdisk |
|||
|
|||
image=/mnt/vmlinuz |
|||
label=linux |
|||
|
|||
image=/mnt/memtest.bin |
|||
label=memtest |
|||
optional |
|||
|
@ -0,0 +1,29 @@ |
|||
disk=/dev/floppy/0 |
|||
bios = 0x00 |
|||
sectors = 36 |
|||
heads = 2 |
|||
cylinders = 80 |
|||
|
|||
nowarn |
|||
boot=/dev/floppy/0 |
|||
install=/mnt/boot.b |
|||
map=/mnt/map |
|||
vga=normal |
|||
message=/mnt/lilo-help.txt |
|||
geometric |
|||
compact |
|||
prompt |
|||
|
|||
image=/mnt/vmlinuz |
|||
read-write |
|||
append="root=/dev/ram0 devfs=nocompat" |
|||
initrd=/mnt/initrd.gz |
|||
label=ramdisk |
|||
|
|||
image=/mnt/vmlinuz |
|||
label=linux |
|||
|
|||
image=/mnt/memtest.bin |
|||
label=memtest |
|||
optional |
|||
|
@ -0,0 +1,4 @@ |
|||
|
|||
This is the ROCK Linux Install system. If you don't know what to do now just |
|||
press enter and start reading the documentation. |
|||
|
@ -0,0 +1,92 @@ |
|||
#!/bin/sh |
|||
|
|||
if [ "$1" = -reroot ] ; then |
|||
echo "Old PATH: $PATH" |
|||
PATH="../../sbin:../../bin:../../../sbin:../usr/bin:$PATH" |
|||
echo "New PATH: $PATH" |
|||
echo "Old LD_LIBRARY_PATH: $LD_LIBRARY_PATH" |
|||
export LD_LIBRARY_PATH="../../lib:../../usr/lib:$LD_LIBRARY_PATH" |
|||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH%:} |
|||
echo "New LD_LIBRARY_PATH: $LD_LIBRARY_PATH" |
|||
shift |
|||
fi |
|||
|
|||
if [ "$1" = -combo ] ; then |
|||
combo=1 |
|||
elif [ "$#" != 0 ] ; then |
|||
echo "usage: $0 [-reroot] [-combo]" |
|||
exit 1 |
|||
fi |
|||
|
|||
tmpfile=`mktemp -p $PWD` |
|||
tmpdir=$tmpfile.dir |
|||
mkdir $tmpdir || exit 1 |
|||
rc=0 |
|||
|
|||
tmpdev="" |
|||
for x in /dev/loop/* ; do |
|||
if losetup $x $tmpfile 2> /dev/null ; then |
|||
tmpdev=$x ; break |
|||
fi |
|||
done |
|||
if [ -z "$tmpdev" ] ; then |
|||
echo "No free loopback device found!" |
|||
rm -f $tmpfile ; rmdir $tmpdir |
|||
exit 1 |
|||
fi |
|||
echo "Using $tmpdev." |
|||
|
|||
for image in initrd boot_144 boot_288 |
|||
do |
|||
case ${image} in |
|||
initrd) |
|||
echo "Creating ${image}.gz ..." |
|||
size=4096 ;; |
|||
boot_144) |
|||
echo "Creating ${image}.img ..." |
|||
size=1440 ;; |
|||
boot_288) |
|||
echo "Creating ${image}.img ..." |
|||
size=2880 ;; |
|||
esac |
|||
|
|||
dd if=/dev/zero of=$tmpfile bs=1024 count=$size &> /dev/null |
|||
losetup -d $tmpdev ; losetup $tmpdev $tmpfile || rc=1 |
|||
mke2fs -q $tmpdev &> /dev/null ; mount $tmpdev $tmpdir || rc=1 |
|||
|
|||
case ${image} in |
|||
initrd) |
|||
cp -a initrd/* $tmpdir || rc=1 |
|||
;; |
|||
|
|||
boot_144|boot_288) |
|||
cp -a boot/{vmlinuz,lilo-help.txt} $tmpdir || rc=1 |
|||
if [ -f /boot/boot-text.b ]; then |
|||
cp /boot/boot-text.b $tmpdir/boot.b || rc=1 |
|||
fi |
|||
liloconf=lilo-conf-${image#boot_} |
|||
if [ $image = boot_288 -o "$combo" = 1 ] ; then |
|||
cp initrd.gz $tmpdir || rc=1 |
|||
[ $image = boot_144 ] && liloconf=lilo-conf-1x2 |
|||
fi |
|||
sed -e "s,/mnt/,$tmpdir/,g" \ |
|||
-e "s,/dev/floppy/0,$tmpdev,;" \ |
|||
< boot/$liloconf > $tmpdir/lilo.conf || rc=1 |
|||
lilo -C $tmpdir/lilo.conf > /dev/null || rc=1 |
|||
;; |
|||
esac |
|||
|
|||
umount $tmpdir |
|||
|
|||
case ${image} in |
|||
initrd) gzip -9 < $tmpfile > $image.gz || rc=1 ;; |
|||
*) cp $tmpfile $image.img || rc=1 ;; |
|||
esac |
|||
done |
|||
|
|||
losetup -d $tmpdev |
|||
rm -f $tmpfile |
|||
rmdir $tmpdir |
|||
|
|||
exit $rc |
|||
|
@ -0,0 +1,25 @@ |
|||
|
|||
mainfunction="packagedb_mainfunction" |
|||
|
|||
packagedb_mainfunction () |
|||
{ |
|||
|
|||
if [ "$ROCK_BUILD_TARGET" != 1 ] ; then |
|||
echo "$xpkg can only be built with ./scripts/Build-Target!" |
|||
false |
|||
fi |
|||
|
|||
echo "Creating isofs.txt file .." |
|||
admdir="build/${ROCKCFG_ID}/var/adm" |
|||
cat << EOT > $xroot/ROCK/isofs_generic.txt |
|||
DISK1 $admdir/cache/ ${ROCKCFG_SHORTID}/info/cache/ |
|||
DISK1 $admdir/cksums/ ${ROCKCFG_SHORTID}/info/cksums/ |
|||
DISK1 $admdir/dependencies/ ${ROCKCFG_SHORTID}/info/dependencies/ |
|||
DISK1 $admdir/descs/ ${ROCKCFG_SHORTID}/info/descs/ |
|||
DISK1 $admdir/flists/ ${ROCKCFG_SHORTID}/info/flists/ |
|||
DISK1 $admdir/md5sums/ ${ROCKCFG_SHORTID}/info/md5sums/ |
|||
DISK1 $admdir/packages/ ${ROCKCFG_SHORTID}/info/packages/ |
|||
EOT |
|||
|
|||
cat $xroot/ROCK/isofs_*.txt > $xroot/ROCK/isofs.txt |
|||
} |
@ -0,0 +1,38 @@ |
|||
|
|||
[COPY] --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
|||
[COPY] |
|||
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|||
[COPY] Please add additional copyright information _after_ the line containing |
|||
[COPY] the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
|||
[COPY] the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
|||
[COPY] |
|||
[COPY] ROCK Linux: rock-src/package/base/mdadm/mdadm.desc |
|||
[COPY] ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf |
|||
[COPY] |
|||
[COPY] This program is free software; you can redistribute it and/or modify |
|||
[COPY] it under the terms of the GNU General Public License as published by |
|||
[COPY] the Free Software Foundation; either version 2 of the License, or |
|||
[COPY] (at your option) any later version. A copy of the GNU General Public |
|||
[COPY] License can be found at Documentation/COPYING. |
|||
[COPY] |
|||
[COPY] Many people helped and are helping developing ROCK Linux. Please |
|||
[COPY] have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
|||
[COPY] file for details. |
|||
[COPY] |
|||
[COPY] --- ROCK-COPYRIGHT-NOTE-END --- |
|||
|
|||
[I] ISO file system description |
|||
|
|||
[T] This package creates a file describing the contents of ISO images |
|||
[T] for targets. |
|||
|
|||
[A] The ROCK Linux Project |
|||
[M] The ROCK Linux Project |
|||
|
|||
[C] extra/base |
|||
|
|||
[L] GPL |
|||
[S] Stable |
|||
[V] 1 |
|||
[P] O --------8- 198.200 |
|||
|
@ -0,0 +1,20 @@ |
|||
|
|||
mainfunction="packagedb_mainfunction" |
|||
|
|||
packagedb_mainfunction () |
|||
{ |
|||
|
|||
if [ "$ROCK_BUILD_TARGET" != 1 ] ; then |
|||
echo "$xpkg can only be built with ./scripts/Build-Target!" |
|||
false |
|||
fi |
|||
|
|||
echo "Creating package database ..." |
|||
admdir="$xroot/var/adm" |
|||
create_package_db $admdir $xroot/ROCK/pkgs |
|||
|
|||
cat << EOT >> $xroot/ROCK/isofs_packages.txt |
|||
EVERY build/${ROCKCFG_ID}/ROCK/pkgs/packages.db ${ROCKCFG_SHORTID}/pkgs/packages.db |
|||
SPLIT build/${ROCKCFG_ID}/ROCK/pkgs/ ${ROCKCFG_SHORTID}/pkgs/ |
|||
EOT |
|||
} |
@ -0,0 +1,37 @@ |
|||
|
|||
[COPY] --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
|||
[COPY] |
|||
[COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|||
[COPY] Please add additional copyright information _after_ the line containing |
|||
[COPY] the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
|||
[COPY] the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
|||
[COPY] |
|||
[COPY] ROCK Linux: rock-src/package/base/mdadm/mdadm.desc |
|||
[COPY] ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf |
|||
[COPY] |
|||
[COPY] This program is free software; you can redistribute it and/or modify |
|||
[COPY] it under the terms of the GNU General Public License as published by |
|||
[COPY] the Free Software Foundation; either version 2 of the License, or |
|||
[COPY] (at your option) any later version. A copy of the GNU General Public |
|||
[COPY] License can be found at Documentation/COPYING. |
|||
[COPY] |
|||
[COPY] Many people helped and are helping developing ROCK Linux. Please |
|||
[COPY] have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
|||
[COPY] file for details. |
|||
[COPY] |
|||
[COPY] --- ROCK-COPYRIGHT-NOTE-END --- |
|||
|
|||
[I] Package database for targets |
|||
|
|||
[T] This package creates a database file for all packages in a target. |
|||
|
|||
[A] The ROCK Linux Project |
|||
[M] The ROCK Linux Project |
|||
|
|||
[C] extra/base |
|||
|
|||
[L] GPL |
|||
[S] Stable |
|||
[V] 1 |
|||
[P] O --------8- 197.200 |
|||
|