I wanted to be able to netboot debian-live and also save the changes of /home to a network share.
Similar to a RW USB stick with debian-live on it (I think it is called "home-rw" in casper), but the writes are on a server.

Note that it is different from the second approach which is to copy data into the RAM at startup and from the RAM at shutdown. (also snapshotting)
I prefer the mount approach mostly because it is more scalable (RAM usage), and because there is no data loss on crashes.

This is my implementation:

1. First of all, you'll need portmap and nfs-common on the client (the netboot image).

2: Create a dedicated directory on the server for the clients' "homes" (i.e /srv/home)

3. Create an NFS export on the server - mine is 192.168.0.10:/srv/home

4. Add this export to casper-bottom/12fstab :

cat > $FSTAB <<EOF
unionfs / unionfs rw 0 0
tmpfs /tmp tmpfs nosuid,nodev 0 0
192.168.0.10:/srv/home /home nfs rsize=8192,wsize=8192,timeo=14,intr 0 0

EOF

This will not be hard coded into casper of course :)

5. 10adduser also needs some care, but i'm not sure about it. i just deleted the /home related stuff, cause we about to mount /home and changes at this stage won't do anything...

6. 23networking was changed thoroughly, I'm attaching it - comments are inside.
the change is that interfaces are declared also on netboot with the "manual" label and not dhcp.
this allows nfsmounts on /etc/fstab to be mounted by ifup on the startup (quite complex).

7. Netboot... now it will fail to login cause there is no /home/casper. create it and chown to casper.

8. From now it should work ... ctrl+alt+F7 > casper, live and there you go casper on the server.

You can also boot from different computers and continue your session... cool! I wonder what happens when 2 people work simultaneously with the same user :)

That's it, feel free to comment.

Hadar,
https://vamos.bountysource.com




Attachment: 23networking
Description: Binary data

_______________________________________________
Debian-live-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel

Reply via email to