(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
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"
#
# 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
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
#
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
#
# 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
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
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"