Building a live ISO: Difference between revisions

From FAIWiki
Jump to navigation Jump to search
(fix dracut version)
 
(34 intermediate revisions by the same user not shown)
Line 1: Line 1:
= How to turn the FAI nfsroot into a file system for diskless clients =
= How to build a live ISO for running diskless clients =


Someone asked me about using the FAI nfsroot for a diskless
Building a live ISO:
client setup. The clients should PXE boot and have /tmp and /var as
tmpfs (means writable).


It's pretty easy. (Tested with FAI 4.1 and dracut 034-2).
You can create a live ISO using two FAI commands. First, you need to
build your own live environment, containing all software including
configuration that you like to use. Using the command "fai dirinstall"
you do an installation using the FAI config space into a directory
which will become your live system. After that you create a bootable
ISO which includes this directory tree using fai-cd.


First add all packages you like to have for your
<pre>
diskless clients to /etc/fai/NFSROOT.
  Define the FAI classes:
 
  cl="DEBIAN,BOOKWORM64,AMD64,FAIBASE,XFCE,XORG,DHCPC,DEMO,LIVEISO,LAST"


Create the FAI nfsroot
  Build the live environment directory tree:


<code>fai-make-nfsroot -v</code>
    # LC_ALL=C fai -v dirinstall -u xfce33 -c $cl -s file:///srv/fai/config /srv/xfce


Then disable some FAI specific things inside the nfsroot:
  Then create the live ISO:


<pre>
    # fai-cd -s500 -MH -d none -g /etc/fai/grub.cfg.live -n /srv/xfce live.iso
chroot /srv/fai/nfsroot bash
rm -f /etc/init.d/rcS
dpkg-divert --package fai-nfsroot --remove --rename /etc/init.d/rcS
insserv -r fai-abort
exit
</pre>
</pre>
That's it. Now, boot your client.
Hint: The FAI nfsroot is not needed when building a live ISO.






That's it. Now, boot your client.
You can download an ISO image, for and example of this Live CD
Since FAI is using aufs (advanced multi layered unification filesystem version 3.x), the whole filesystem is writeable for the client, even it's mounted read-only.
https://fai-project.org/fai-cd/debian12-live-xfce.iso

Latest revision as of 13:33, 30 January 2024

How to build a live ISO for running diskless clients

Building a live ISO:

You can create a live ISO using two FAI commands. First, you need to build your own live environment, containing all software including configuration that you like to use. Using the command "fai dirinstall" you do an installation using the FAI config space into a directory which will become your live system. After that you create a bootable ISO which includes this directory tree using fai-cd.

  Define the FAI classes:

  cl="DEBIAN,BOOKWORM64,AMD64,FAIBASE,XFCE,XORG,DHCPC,DEMO,LIVEISO,LAST"

  Build the live environment directory tree:

    # LC_ALL=C fai -v dirinstall -u xfce33 -c $cl -s file:///srv/fai/config /srv/xfce

  Then create the live ISO:

    # fai-cd -s500 -MH -d none -g /etc/fai/grub.cfg.live -n /srv/xfce live.iso

That's it. Now, boot your client.


Hint: The FAI nfsroot is not needed when building a live ISO.


You can download an ISO image, for and example of this Live CD https://fai-project.org/fai-cd/debian12-live-xfce.iso