Skip to content

Instantly share code, notes, and snippets.

Created October 27, 2009 18:52
Show Gist options
  • Save anonymous/219822 to your computer and use it in GitHub Desktop.
Save anonymous/219822 to your computer and use it in GitHub Desktop.
1) created a new bare virtual machine with vmware-server
2) installed the bare VM with the gnomehost entry on the ISO:
http://www.informatik.uni-koeln.de/fai/fai-cd/fai-cd-3.2.16.iso
################################################################################
# steps 3 -11 were executed in the gnomehost virtual machine #
################################################################################
3) edited the sources.list
deb http://www.informatik.uni-koeln.de/fai/download experimental koeln
deb http://ftp.us.debian.org/debian/ stable main non-free
deb http://security.debian.org/ stable/updates main non-free
4) apt-get install -y apt-move fai-server fai-client mkisofs
5) cp /etc/apt/sources.list /etc/fai/apt/sources.list
6) added cryptsetup to /etc/fai/NFSROOT
7) ran fai-setup
8) ensured the nfsroot/livecd had 3.2.23~beta25+experimental1 with:
dpkg --root=/srv/fai/nfsroot/live/filesystem.dir/ \
-l fai-client|awk '/fai-client/ {print $3}'
9) rsync'ed the 3.2.16 configs from the iso to nfsroot
mount -o loop fai-cd-3.2.16.iso /mnt/loop && \
rsync -avzPH /mnt/loop/live/filesystem.dir/var/lib/fai/config/ \
/srv/fai/config/
10) fai-mirror /srv/fai-mirror # add cryptsetup to package_config/FAIBASE
11) fai-cd -fm /srv/fai-mirror /srv/fai-cd-3.2.23.iso
################################################################################
# Back on the workstation... #
################################################################################
12) copied the iso off of the VM
13) created a second virtual machine with vmware-server
14) installed demohost,gnomehost,faiserver from the fai-cd-3.2.23.iso
they all resulted in a functioning host, as expected.
15) wrote a script that would un-pack the fai-cd-3.2.23.iso, rsync a config
dir from a git repository into live/filesystem.dir/var/lib/fai/config
and re-pack the iso into fai-cd-3.2.23-custom.iso so the new procedure
could be [ edit_config->add_to_git->repack_iso->boot_vm->repeat ]
16) altered disk_config/FAIBASE to use the "Simple LVM example" from:
http://faiwiki.informatik.uni-koeln.de/index.php/Setup-storage
re-packed the iso, booted the vm.
It times out forever waiting to mount the root filesystem, apparenlty dm-mod
didn't make it into the initramfs.
work-around:
################################################################################
# On gnomehost ... how do I trigger this during install?
cat<<EOF>>/srv/fai/nfsroot/live/filesystem.dir/etc/initramfs-tools/modules
aes-i586
dm-mod
dm-crypt
sha256-generic
EOF
chroot /srv/fai/nfsroot/live/filesystem.dir \
/usr/sbin/mkinitramfs \
-o /boot/initrd.img-$(ls /srv/fai/nfsroot/live/filesystem.dir/lib/modules) \
$(ls /srv/fai/nfsroot/live/filesystem.dir/lib/modules)
# and during install:
cp /boot/initrd.img-* /target/boot/
################################################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment