Editing
Minimal
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Debian minimal webboot == Webboot is een diskless Debian versie, die boot met behulp van PXE start. Diskless boot is een samenspel tussen een werkstation en een server. Het werkstation moet beschikken over de mogelijk om vanaf de netwerkkaart te booten, met het PXE protocol. Eenmaal gestart is het mogelijk om devices aan te haken en software te installeren.<br> Let op: debirf installeert elke gewenste versie van Debian, <b>binnen de eigen architectuur</b> van de opbouwende host zelf.<br> De server moet het volgende doen: * Beschikken over een werkende dhcp service * Een tftpd-hpa service * Een netboot kernel en initrd aanbieden Informatie: * http://cmrg.fifthhorseman.net/wiki/debirf Debirf biedt de simpelste manier voor het bouwen van een webboot linux. <pre> root@host:~# apt-get install fuse-utils psmisc debootstrap fakeroot build-essential lsof debirf root@host:/home/martin/netboot/minimal# cat debirf.conf # DEBIRF configuration file: this will be sourced by bash DEBIRF_LABEL="webboot" DEBIRF_BUILDD=/home/martin/netboot DEBIRF_SUITE=squeeze DEBIRF_DISTRO=debian DEBIRF_MIRROR=http://mirror.webhuis.nl:3142/${DEBIRF_DISTRO} root@host:~# debirf make -c minimal </pre> Na uitvoering van dit uiterst ingewikkelde commando heeft de host na korte tijd het volgende opgebouwd. <pre> root@host:/home/martin/netboot# ls -al -rw-r--r-- 1 root root 33415 Sep 14 00:33 .bootstrap.log -rw-r--r-- 1 root root 578312 Sep 14 00:35 .fakeroot-state.webboot drwxr-xr-x 3 martin martin 4096 Sep 14 00:28 minimal drwxr-xr-x 20 root root 4096 Sep 14 00:34 root -rw-r--r-- 1 root root 2301440 May 6 09:50 vmlinuz-2.6.32-5-686 -rw-r--r-- 1 root root 64092140 Sep 14 00:35 webboot_squeeze_2.6.32-5-686.cgz </pre> Het is verstandig om het image en de bijbehorende kernel bij elkaar te houden voor later gebruik. ==== De boot server ==== Op de bootserver is pxe-boot geconfigureerd. <pre> martin@dom0-153:/var/lib/tftpboot$ ls -al -rw-r--r-- 1 tftp tftp 68 Jan 6 2011 boot.txt drwxr-xr-x 3 tftp tftp 4096 Sep 13 22:44 debian -rw-r--r-- 1 tftp tftp 26816 Nov 28 2010 pxelinux.0 drwxr-xr-x 2 tftp tftp 4096 Sep 14 00:38 pxelinux.cfg </pre> De directory pxelinux.cfg bevat het bestand default: <pre> martin@boot-server:/var/lib/tftpboot$ cat pxelinux.cfg/default # Configuratie voor pxe-boot DISPLAY boot.txt DEFAULT webboot LABEL webboot kernel debian/squeeze/i386/vmlinuz-2.6.32-5-686 append vga=791 initrd=debian/squeeze/i386/webboot_squeeze_2.6.32-5-686.cgz -- </pre> In de directory debian/squeeze/ staan de kernel en het webboot image. De diskless machine doet er vanaf de start van pxe ongeveer 60 seconden over om operationeel te zijn. === Installatie voorbereiding === Een webboot installatie vondt plaats op een andere host dan op de machine waarop de installatie uiteindelijk draait. De installatie verloopt in stappen: * Met debootstrap in een installatie directory * Chroot naar de installatie directory Noodzakelijke programmatuur: <pre> # apt-get install debootstrap fakeroot # debootstrap --arch i386 wheezy webboot-wheezy http://mirror.webhuis.nl:3142/debian # chroot webboot-wheezy/ </pre> ==== chrooted ==== <pre> :/# cat /etc/fstab # UNCONFIGURED FSTAB FOR BASE SYSTEM LABEL=webboot / ext2 defaults,errors=remount-ro,noatime 0 1 proc /proc proc defaults 0 0 tmpfs /tmp tmpfs defaults,noatime 0 0 tmpfs /var/lock tmpfs defaults,noatime 0 0 tmpfs /var/log tmpfs defaults,noatime 0 0 tmpfs /var/run tmpfs defaults,noatime 0 0 tmpfs /var/tmp tmpfs defaults,noatime 0 0 :/# mount -t proc proc /proc && mount -t sysfs sysfs /sys :/# mount -a :/# echo "127.0.0.1 localhost" > /etc/hosts :/# echo "webboot" > /etc/hostname :/# cat /etc/network/interfaces auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp :/# cat /etc/resolv.conf nameserver 10.68.71.187 :/# apt-get install linux-image-3.2.0-3-686-pae :/# apt-get install locales-all :/# addgroup --system admin :/# useradd -s /bin/bash -g admin -m -k /dev/null martin :/# passwd root :/# passwd martin :/# apt-get install ntfsprogs scrounge-ntfs dosfstools rsync localepurge gddrescue rungetty sshfs sudo </pre> ==== Bouwen diskless ram image ==== === dhcp === De dhcp service biedt voor een of meerdere werkstations of de volgende wijze een pxe optie: <pre> host webboot.webhuis.nl { hardware ethernet 00:68:84:e2:ea:a1; next-server 10.99.99.11; option root-path "10.99.99.11:/var/lib/tftpboot"; option host-name "webboot"; fixed-address 10.99.99.19; filename "pxelinux.0"; </pre> De dhcp service (op 10.99.99.1) geeft hier aan dat het werkstation voor de volgende stap van het bootproces naar de service tftpboot op de server 10.99.99.11. === tftpboot === Op de server 10.99.99.11 is het bestand pxelinux.0 geinstalleerd. Dit bootprogramma instrueert het werkstation om het bestand pxelinux.cfg/default op te vragen. ==== pxelinux.cfg/default ==== Onderstaande pxe default configuratie geeft drie boot mogelijkheden. * webboot, een diskless Linux, die volledig in RAM draait. * amd64-minimal, een minimale 64 bits Linux * i386-minimal, een minimale 32 bits Linux <pre> # Configuratie voor pxe-boot DISPLAY boot.txt DEFAULT webboot LABEL webboot kernel debian/squeeze/i386/vmlinuz-2.6.32-5-686 append vga=791 initrd=debian/squeeze/i386/webboot_squeeze_2.6.32-5-686.cgz -- LABEL start_amd64_minimal kernel debian/squeeze/amd64/vmlinuz-2.6.32-5-amd64 append vga=791 initrd=debian/squeeze/amd64/debirf-minimal_squeeze_2.6.32-5-amd64.cgz -- LABEL start_i386_minimal kernel debian/squeeze/i386/vmlinuz-2.6.32-5-686 append vga=791 initrd=debian/squeeze/i386/debirf-minimal_squeeze_2.6.32-5-686.cgz -- PROMPT 1 TIMEOUT 30 </pre> De default aktie is het starten van webboot na 5 seconden.
Summary:
Please note that all contributions to Webhuis wiki are considered to be released under the GNU Free Documentation License 1.3 or later (see
Project:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Voorpagina
Cobol and PostgreSQL
PostgreSQL
CFEngine
Proxmox
Webhuis Kennisbank
Basale infra
Webhuis bouwstenen
Webhuis configuratie
Webhuis Infra
Webhuis Support
Webhuis Raspberry
Opzet Applicaties
Business Applicaties
Community portal
Current events
Recent changes
Random page
Help
sitesupport
Tools
What links here
Related changes
Special pages
Page information