From 2031febe2ef7a678b2063d87a31e45dca7bf50b7 Mon Sep 17 00:00:00 2001 From: hackbard Date: Wed, 8 Dec 2004 03:27:06 +0000 Subject: [PATCH] minimal fixes ;) - should work now - semi automatic :)) --- doc/FAI | 3 +-- fai/scripts/rc_fai.sh | 17 +++++++++-------- misc/fai/fai_rc | 4 +--- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/doc/FAI b/doc/FAI index 85ccef8..dbe09c2 100644 --- a/doc/FAI +++ b/doc/FAI @@ -55,8 +55,7 @@ procedure (after using cfdisk, sync to disk file!) - reboot and finaly wathc your target system to get hdw'ed :) - 5) login, build a new kernel. copy new bzImage to /boot/vmlinuz_hdw - and run lilo again. reboot and enjoy! good luck. + 5) optional: login, build a new kernel or do other modifications. fai config files diff --git a/fai/scripts/rc_fai.sh b/fai/scripts/rc_fai.sh index 192c63f..a839f69 100755 --- a/fai/scripts/rc_fai.sh +++ b/fai/scripts/rc_fai.sh @@ -9,7 +9,6 @@ root=/trg croot=/fai/config myip="`ifconfig eth0 | grep inet\ addr | awk '{ print $2 }' | awk -F: '{ print $2 }'`" myconf=$croot/$myip -proot="" if [ ! -d $myconf ] ; then echo "no config found, aborting fai" @@ -28,15 +27,15 @@ mount -tramfs ramfs /tmp # # check if disk is ready # -if [ ! -f $croot/$myip/disk_ready ] ; then +if [ ! -f $myconf/disk_ready ] ; then echo echo "you're disk seems to not be ready. login now and use cfdisk" echo "to partition your harddisk. please make sure it's compatible" - echo "to $croot/$myip/disk:" - cat $croot/$myip/disk + echo "to $myconf/disk:" + cat $myconf/disk echo echo "after partitioning your harddisk please touch the file" - echo "$croot/$myip/disk_ready" + echo "$myconf/disk_ready" echo "on your fai install server and reboot." echo "... fully automated, he? :p" echo @@ -75,7 +74,6 @@ cat $myconf/disk | grep -v '^#' | while read nr mp fs ac; do grep -v '/dev/root' /etc/fstab > $root/etc/fstab echo -e "${disk}${nr}\t$mp\t$fs\tdefaults 0 2" >> \ $root/etc/fstab - proot=${disk}${nr} fi fi done @@ -97,7 +95,7 @@ cp $root/etc/fstab $root/etc/fstab~ # cd /tmp # we need to wget stuff! pkglist="" -[ -f /fai/config/$myip/packages ] && pkglist=/fai/config/$myip/packages +[ -f $myconf/packages ] && pkglist=$myconf/packages if [ -z "$pkglist" ] ; then echo "cant find package list for $myip, aborting" exit @@ -127,6 +125,8 @@ done # # lilo # +proot=${disk}`grep /[^a-z,^A-Z] $myconf/disk | awk '{ print $1 }'` +echo "running lilo -> root device = $proot" cat > $root/etc/lilo.conf << EOF boot=$disk prompt @@ -146,8 +146,9 @@ cat > $root/run_lilo.sh << EOF mount /dev mount /sys mount /proc +mkdir -p /dev/shm && mount /dev/shm +mkdir -p /dev/pts && mount /dev/pts udevstart -mount -a ln -s /proc/self/fd /dev/fd ln -s /proc/self/fd/0 /dev/stdin ln -s /proc/self/fd/1 /dev/stdout diff --git a/misc/fai/fai_rc b/misc/fai/fai_rc index 4c1279f..bba4373 100755 --- a/misc/fai/fai_rc +++ b/misc/fai/fai_rc @@ -80,9 +80,7 @@ if [ -f /tmp/fai_finished ] ; then echo "FAI finished - congrats :)" echo echo "you may login as root (passwd = hdw), chroot to /trg and" - echo "build a new kernel. copy the new bzImage to /boot/vmlinuz_hdw" - echo "and run lilo. imho this has to be done as we only have a nfsroot" - echo "kernel image searching init on a nfsroot. i might be wrong here." + echo "do further modifications." echo else echo "login: root | passwd = hdw" -- 2.39.2