FAI from disk partition
David Hausheer
hausheer at tik.ee.ethz.ch
Tue Sep 27 22:11:43 CEST 2005
Thomas Lange wrote:
> Your idea should be possible to implement but it needs some work to
> get it run. Maybe some ideas from fai-cd may help, since it also gets
> everything from a media without using the network.
I managed to run FAI from a local disk partition. However, sfdisk
complained about the disk being mounted (although the mounted partition
would be preserved). Thus I had to skip disk partitioning to make it work.
Finally, I solved the problem by running FAI from a (huge) ramdisk.
Luckily, I have enough RAM (512 MB), so the whole nfsroot (250 MB) fits
into it.
Here's how it works:
* Comment out FAI_LOCATION in /etc/fai/fai.conf, thus the configuration
directory (/fai) will neither be mounted over nfs nor checked out from a
cvs repository.
* Set FAI_BOOT to " " in /etc/fai/make-fai-nfsroot.conf, thus
make-fai-nfsroot will neither setup a dhcp nor a bootp environment
* Create the nfsroot directory with /usr/sbin/make-fai-nfsroot
* Copy the configuration directory to the nfsroot directory:
cp -a /usr/local/share/fai/* /usr/lib/fai/nfsroot/fai
* Create a compressed ext2 image of the nfsroot, which will be used as
initrd image. Note: cramfs won't work because of its filesize limitation
(base.tgz is larger than 16MB).
dd if=/dev/zero of=initrd bs=1k count=250000
mkfs.ext2 -F -m0 -b 1024 initrd
mount -o loop initrd /mnt
cp -a /usr/lib/fai/nfsroot/* /mnt
umount /mnt
gzip -v9 initrd
* Add the install kernel and the initrd image to the boot loader menu.
(the ramdisk_size has to be large enough).
title FAI Install
root (hd0,1)
kernel /boot/vmlinuz-2.4.27-fai ramdisk_size=250000
ip=192.168.1.1::::demohost::off devfs=nomount FAI_ACTION=install
root=/dev/ram0 FAI_FLAGS=verbose,sshd,syslogd,reboot
initrd /boot/initrd.gz
* Reboot and see the machine be installed standalone from ram :-)
David
--
+--------------------------------------------------------------------+
| Dipl. El.-Ing. ETH David Hausheer |
| Computer Engineering and Networks Laboratory (TIK), ETH Zurich |
|--------------------------------------------------------------------|
| Postal Address: ETH-Zentrum, CH-8092 Zurich |
|--------------------------------------------------------------------|
| Phone: +41-44-632-7540 | Room: ETZ H83, Gloriastrasse 35 |
| Fax: +41-44-632-1035 | E-Mail: mailto:hausheer at tik.ee.ethz.ch |
| Mobile: +41-79-336-4076 | WWW: http://www.csg.ethz.ch/~hausheer/ |
+--------------------------------------------------------------------+
More information about the linux-fai
mailing list