From 167098d731dcdc19be3aaeaee86cc320f982ba8b Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 14 Jun 2011 00:00:51 +0200 Subject: [PATCH] more ideas on how to install via cdist Signed-off-by: Nico Schottelius --- .../logs/2011-06-13.installation-via-cdist | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) diff --git a/doc/dev/logs/2011-06-13.installation-via-cdist b/doc/dev/logs/2011-06-13.installation-via-cdist index f43a4ba3..1b7e6c97 100644 --- a/doc/dev/logs/2011-06-13.installation-via-cdist +++ b/doc/dev/logs/2011-06-13.installation-via-cdist @@ -11,3 +11,102 @@ Requires: - Including ssh keys -> known! - startup sshd +-------------------------------------------------------------------------------- +Setup for installation server: + + - have dhcpd available + - install tftpd server + - configure dhcp to tell clients to boot from tftp server + - have a kernel + +-------------------------------------------------------------------------------- +Ideas on how to create "blob" + + - Use tools from system? + -> requires same arch on destination! + - Use debian|...| base? + -> works with cuni! +-------------------------------------------------------------------------------- +tftp via cuni: +debian pxelinux.0 pxelinux.cfg + +[19:44] kr:tftp% ln -s /usr/lib/syslinux/ + +-------------------------------------------------------------------------------- +How to create the initrd? + Base from ... + arch? + debian? + +- needs many hardware support / in kernel? + - fit to kernel? + +-------------------------------------------------------------------------------- +Based on Debian +[21:33] kr:tftp% sudo debootstrap --arch=i386 squeeze debian-squeeze + +sudo chroot debian-squeeze /bin/bash + apt-get install openssh-server + + +-------------------------------------------------------------------------------- +Based on Archlinux + +Edit / create pacman.conf +Server = ftp://mirrors.kernel.org/archlinux/$repo/os/i686 + +[21:40] kr:~% grep -v ^# pacman.conf | grep -v '^$' +[options] +HoldPkg = pacman glibc +SyncFirst = pacman +Architecture = auto +[core] +Include = Server = ftp://mirrors.kernel.org/archlinux/$repo/os/i686 +[extra] +Include = Server = ftp://mirrors.kernel.org/archlinux/$repo/os/i686 +[community] +Include = Server = ftp://mirrors.kernel.org/archlinux/$repo/os/i686 +[archlinuxfr] +Server = http://repo.archlinux.fr/$arch + +[21:40] kr:tftp% sudo mkarchroot -C ~/pacman.conf archlinuxroot + +[21:42] kr:tftp% sudo mkarchroot -C ~/pacman.conf archlinuxroot base + +-------------------------------------------------------------------------------- +Initramfs general: + + - need /init + +Test in Debian: + root@kr:/# ln -s /sbin/init init + +Create initramfs: + [22:47] kr:debian-squeeze% sudo find . -print0 | sudo cpio --null -ov --format=newc | gzip -9 > ../pre-os/initrd.gz + + + +-------------------------------------------------------------------------------- +Gentoo: http://en.gentoo-wiki.com/wiki/Initramfs + +It is possible to specify multiple initramfs to be extracted during boot. This can be useful if you want to create a generic initramfs (for example one that does mdadm) and then add modifications in separate files (for example a custom /etc/mdadm.conf for every machine). + +http://syslinux.zytor.com/wiki/index.php/SYSLINUX#INITRD_initrd_file + It supports multiple filenames separated by commas. This is mostly useful for initramfs, which can be composed of multiple separate cpio or cpio.gz archives. Note: all files except the last one are zero-padded to a 4K page boundary. This should not affect initramfs. +-------------------------------------------------------------------------------- +Multiple initrds, #1: + +LABEL preos + MENU LABEL Pre OS (Debian Squeeze) + KERNEL debian-squeeze/boot/vmlinuz-2.6.32-5-686 + INITRD debian-squeeze/boot/initrd.img-2.6.32-5-686,pre-os/initrd.gz + +-------------------------------------------------------------------------------- +Debug in rootfs: +root@kr:/# passwd +Enter new UNIX password: +Retype new UNIX password: +passwd: password updated successfully +test +-------------------------------------------------------------------------------- +Multiple nics in Debian...