From: Kern Sibbald Date: Wed, 27 Dec 2006 14:10:05 +0000 (+0000) Subject: Get it booting again X-Git-Tag: Release-2.0.0~71 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=fd0942ed727e31dab3067d448226224681b7e8ec;p=bacula%2Frescue Get it booting again --- diff --git a/rescue/linux/cdrom/Makefile.in b/rescue/linux/cdrom/Makefile.in index e242b24..83a0627 100644 --- a/rescue/linux/cdrom/Makefile.in +++ b/rescue/linux/cdrom/Makefile.in @@ -8,7 +8,7 @@ MKCDREC=@BUILD_DIR@/mkcdrec CWD=@BUILD_DIR@/linux/cdrom -first_rule: mkcdrec +first_rule: all dummy: #------------------------------------------------------------------------- @@ -55,6 +55,7 @@ copy-bacula: cp -a bacula/ cdimage/ pre-mkcdrec: + @echo ./mkcdrec_rd @echo "Patching mkcdrec Config.sh for Bacula" @mkdir -p tmp @@ -73,7 +74,11 @@ pre-mkcdrec: @cp -f @BACULA_SCRIPTS@/bacula-fd.conf bacula/bin main-mkcdrec: dummy - @echo "Doing make in mkcdrec directory" + @echo " " + @echo "Doing make in mkcdrec directory. This may take some time and" + @echo " produce a good amount of output" + @echo " " + @echo (cd ${MKCDREC}; make rescue) post-mkcdrec: diff --git a/rescue/linux/cdrom/cdtree/boot/isolinux/isolinux.bin b/rescue/linux/cdrom/cdtree/boot/isolinux/isolinux.bin index 408fd05..7b20754 100644 Binary files a/rescue/linux/cdrom/cdtree/boot/isolinux/isolinux.bin and b/rescue/linux/cdrom/cdtree/boot/isolinux/isolinux.bin differ diff --git a/rescue/linux/cdrom/makeinitrd b/rescue/linux/cdrom/makeinitrd index d59ad05..ae939a9 100755 --- a/rescue/linux/cdrom/makeinitrd +++ b/rescue/linux/cdrom/makeinitrd @@ -58,7 +58,7 @@ if [ $cprtn != 0 ] ; then fi # This is a newer way of creating a ramfs, which we don't use -# (cd roottree; find . | cpio --quiet -c -o) >root +(cd roottree; find . | cpio --quiet -c -o) >root echo "Building initial RAM disk done" diff --git a/rescue/linux/cdrom/roottree/etc/inittab b/rescue/linux/cdrom/roottree/etc/inittab index 84cfbab..e245f85 100644 --- a/rescue/linux/cdrom/roottree/etc/inittab +++ b/rescue/linux/cdrom/roottree/etc/inittab @@ -38,13 +38,13 @@ ca::ctrlaltdel:/sbin/halt -d # Run gettys in standard runlevels -#1:2345:respawn:/sbin/mingetty tty1 -1:2345:respawn:/bin/sh -#2:2345:respawn:/sbin/mingetty tty2 -#2:2345:respawn:/bin/sh +#1:2345:respawn:/bin/sh +2:2345:respawn:/bin/sh #3:2345:respawn:/bin/sh #4:2345:respawn:/bin/sh #5:2345:respawn:/bin/sh +#1:2345:respawn:/sbin/mingetty tty1 +#2:2345:respawn:/sbin/mingetty tty2 #3:2345:respawn:/sbin/mingetty tty3 #4:2345:respawn:/sbin/mingetty tty4 #5:2345:respawn:/sbin/mingetty tty5 diff --git a/rescue/linux/cdrom/roottree/init b/rescue/linux/cdrom/roottree/init new file mode 100755 index 0000000..43cbb3a --- /dev/null +++ b/rescue/linux/cdrom/roottree/init @@ -0,0 +1,48 @@ +#!/bin/sh +# +# First script called by Linux when booting +# + +echo "======== init called ========" +sbin/sleep 3 +# sbin/chroot . +#trap "" 1 2 3 15 +# exec >/dev/console &1 +#PATH=sbin +sbin/mount -t proc none /proc +sbin/mount -t sysfs none /sys +echo Creating /dev +sbin/mount -o mode=0755 -t tmpfs none /dev +sbin/mknod /dev/console c 5 1 +sbin/mknod /dev/null c 1 3 +sbin/mknod /dev/zero c 1 5 +sbin/mkdir /dev/pts +sbin/mkdir /dev/shm +echo Starting udev +sbin/udevstart +echo -n "/sbin/hotplug" > /proc/sys/kernel/hotplug +echo "Loading scsi_mod.ko module" +sbin/insmod /lib/scsi_mod.ko +echo "Loading sd_mod.ko module" +sbin/insmod /lib/sd_mod.ko +echo "Loading aic7xxx.ko module" +sbin/insmod /lib/aic7xxx.ko +echo "Loading libata.ko module" +sbin/insmod /lib/libata.ko +echo "Loading ata_piix.ko module" +sbin/insmod /lib/ata_piix.ko +sbin/udevstart + +# CMDLINE=`cat /proc/cmdline` +# DEBUG="" +# case "$CMDLINE" in *debug*) DEBUG="yes"; ;; esac +# export DEBUG + +# Magic incantation for root to remain in ram +# echo 0x0100 > /proc/sys/kernel/real-root-dev + +sbin/mount -o remount,rw /dev/root / + +# sh + +exec /sbin/init