[elbe-devel] mostly solved: converting image to run in RAM only

ew.foe at nassur.net ew.foe at nassur.net
Mon Apr 24 14:26:23 CEST 2017


Hello all,

answering my own question (searching for *other* keywords on google  
got me there :-)

Quoting ew.foe at nassur.net:

> Hello all,
>
> I'm able to build an image for xilinx-zynq using elbe,
> Debian jessie, and the vanilla 4.9.18-rt kernel from
> kernel.org :-) This boots from sdcard.
>
> Next step: I want to boot the target system via PXE/bootp
> (the booting part does work) and the downloaded root file system
> should run in RAM (no sdcard involved any more)
>

I ran elbe to create an image for sdcard. I then converted that (as root):

# name="image name goes here"
# gzip -cd $name.img.gz > $name.img
# mkdir t
# kpartx -av ./$name.img # watch for the number of the loop mount
# N=0
# mount /dev/mapper/loop${N}p2 ./t # partition p1 is /boot and was ignored!

# # --- edit any files in the tree below ./t now ---

# cd ./t
# set -o pipefail
# find . | grep -v -e '^run/' -e 'lost+found' | cpio --create -H newc  
| gzip -9 > ../$name.initrd.gz
# umount t
# kpartx -dv ./$name.img
# mkimage -A arm -T ramdisk -C gzip -d $name.initrd.gz u.$name.initrd.gz

This mostly works, however, I have to fix /etc/fstab (and possibly  
more) in order to make
it work all the way. I also need to make a smaller image in elbe to  
begin with.

This message is "for the records".

Are there any plans to make this output format a feature of elbe?

Cheers,
Erich







More information about the elbe-devel mailing list