Boot from image file

Hi all,

I've device (cubietruck/Allwiner A20 processor, not so important) with SD card, which runs latest FreeBSD (12.0) compiled with nanoBSD and using uboot.
SD card have one FAT16 partition, one "cfg" partition and one root partition.

What I need is just one partition (FAT or else), in which I can upload FreeBSD OS images.
Images will contain all "stuff" needed to boot entire distribution (world, kernel else), format of image file is irrelevant for me. I just want to be able to boot from one image or another.

I'll probably be able to load kernel from image file, since u-boot have a lot of options.
But is there a way to instruct kernel to load "world/root" from image file, say located in a FAT partition ?

I was looking to "vfs.root.mountfrom" kernel parameter, but from what I can tell, you can only specify filesystem type and device. Not a file onto that device, with its own filesystem type.

Regards,
Filip
 
It might be possible if you use an md(4) device to load the image and then boot from the resulting md0 device. If I recall correctly that's how the old floppy images used to boot.
 
  • Thanks
Reactions: fil
Back
Top