Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I boot from a root filesystem (maybe squashfs or dd image)?
2017-10-01, 22:39
Post: #4
RE: How can I boot from a root filesystem (maybe squashfs or dd image)?
(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.

Use GitHub Discussions
VRAM bin
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: How can I boot from a root filesystem (maybe squashfs or dd image)? - NiKiZe - 2017-10-01 22:39



User(s) browsing this thread: 1 Guest(s)