(2017-10-01 22:39)NiKiZe Wrote: (2017-10-01 22:20)ajr Wrote: To answer your questions:
- No, I don't need it to work when the network is unplugged - I only want my disk image stored on a server for the client to fetch
- Yes, I want the image mounted read-only and changes saved in RAM - AFAIK this is default behavior?
- No, I don't need to store any data on the client
- Yes, ideally I want it to work for multiple clients at once
Multiple clients make iSCSI for a bad option, with your approach of http fetching it will only need network at boot and then it can go offline.
We haven't gotten to what is default yet, but yes with initrd or fetch over http it will be all in RAM.
My question about storing data was supposed to be in regards to iSCSI as permanent storage, but that was a bad stated question.
(2017-10-01 22:20)ajr Wrote:
Code:
#!ipxe
kernel http://10.0.0.2/ipxe/vmlinuz
module http://10.0.0.2/ipxe/initrd.img
imgargs vmlinuz boot=live config console=ttyS0 username=aj fetch=http://10.0.0.2/ipxe/sdc.squashfs
boot
This results in iPXE 'freezing': https://i.imgur.com/6DDgmng.png
The only reason for it to freeze there should be that iPXE is done, kernel is executing but something fails.
So more likely it's your kernel that freezes rather then iPXE.
Try to only do
Code:
kernel http://10.0.0.2/ipxe/vmlinuz
boot
And you should see the same thing - that means that you will need to kernel working.
Are you sure that that same kernel works when you are booting from disk?
The concept that you have here does work.
As an example of systemrescuecd working via iPXE you can test this script: http://b800.org/sysr/sysrcd.ipxe
In regards to your username= and fetch= those are not handled by the kernel, so you will need to have scripts in your initrd that handles those, and also something that mounts the squashfs etc.
If you want to do all this scripting on your own, that's lots of work.
Another approach that I totally forgot is to use legacy nfsroot, but with that you will still need scripts that creates a local ramfs overlay, unless you want to store files on the NFS share, but that causes issues with multiple clients.
Here is what happens with only the kernel and boot options:
https://i.imgur.com/Jhssl4q.png
I don't care about the username and fetch flags, I only included them because they were in the examples I found.