minimal fixes ;) - should work now - semi automatic :))
authorhackbard <hackbard>
Wed, 8 Dec 2004 03:27:06 +0000 (03:27 +0000)
committerhackbard <hackbard>
Wed, 8 Dec 2004 03:27:06 +0000 (03:27 +0000)
doc/FAI
fai/scripts/rc_fai.sh
misc/fai/fai_rc

diff --git a/doc/FAI b/doc/FAI
index 85ccef8..dbe09c2 100644 (file)
--- 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 :)
 
                  (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
 
 
 fai config files
index 192c63f..a839f69 100755 (executable)
@@ -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
 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"
 
 if [ ! -d $myconf ] ; then
        echo "no config found, aborting fai"
@@ -28,15 +27,15 @@ mount -tramfs ramfs /tmp
 #
 # check if disk is ready
 #
 #
 # 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
        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
        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
        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
                        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
                fi
        fi
 done
@@ -97,7 +95,7 @@ cp $root/etc/fstab $root/etc/fstab~
 #
 cd /tmp # we need to wget stuff!
 pkglist=""
 #
 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
 if [ -z "$pkglist" ] ; then
        echo "cant find package list for $myip, aborting"
        exit
@@ -127,6 +125,8 @@ done
 #
 # lilo
 #
 #
 # 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
 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
 mount /dev
 mount /sys
 mount /proc
+mkdir -p /dev/shm && mount /dev/shm
+mkdir -p /dev/pts && mount /dev/pts
 udevstart
 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
 ln -s /proc/self/fd /dev/fd
 ln -s /proc/self/fd/0 /dev/stdin
 ln -s /proc/self/fd/1 /dev/stdout
index 4c1279f..bba4373 100755 (executable)
@@ -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 "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"
        echo
 else
        echo "login: root | passwd = hdw"