[elbe-devel] Getting arbitrary files from a project using 'elbe initvm'

Lukasz Walewski lwalewski at s-can.at
Wed Mar 22 12:55:23 CET 2017


>On Tue, Mar 21, 2017 at 05:00:06PM +0000, Lukasz Walewski wrote:
>>
>> My question: is it possible to extract arbitrary files from <build-
>dir>/target without resort to 'elbe control get_file' but rather by
>extending list [1] (e.g. by specifying the additional files/paths in the
>XML file) and using the convenient 'elbe initvm submit'?
>
>This would already be possible with ubi binary volumes.
>However, that would be a pretty bad hack.
>I would support a patch which allows to extract arbitrary files to the
>img list via an xml tag, if i understood the usecase.
>
>Why are you trying to extract an initrd ?
>Please explain.

That sounds like a key question indeed ;) I inherited the project from someone else and it simply used to be done that way. I think it was inspired by the x86_32-squashfs.xml example from the official Debian/jessie package, which contains the following usage instructions (see also https://elbe-rfs.org/docs/elbe-examples.html):

<description>
i386 squashfs image with a squashfs aware initramfs

usage:
------
$ elbe buildchroot --skip-cdrom -t ~/sfs-example squashfs-root.xml
$ cd ~/sfs-example
$ mkdir your_disk
$ cp root.sfs your_disk/
$ cp chroot/initramfs.cpio.gz your_disk/
$ cp target/boot/vmlinuz-3.2.0-4-686-pae your_disk/
# testing: root= is the partition with your squashfs images.
# root_sfs= is the image file within root.
$ qemu-system-i386 -kernel your_disk/vmlinuz-3.2.0-4-686-pae -initrd your_disk/initramfs.cpio.gz \
-append "root=/dev/sda1 root_sfs=root.sfs console=ttyS0" --nographic -hda fat:your_disk/ -m 512M
</description>

My current use case involves copying the generated squashfs image along with the kernel image and the initramfs to the /live directory on the target device and booting the system in a similar way as in the example above but using extlinux bootloader and the following configuration entry:

LABEL my_linux
        MENU LABEL my production system
        LINUX /live/vmlinuz
        APPEND quiet loglevel=3 splash root=/dev/sda1 root_sfs=live/rootfs noexec=off panic=30 vga=786
        INITRD /live/initrd

(The above also explains, why I was initially looking for the 'buildchroot' command in the packaged v1.1 release - see my earlier posts here)

I conclude from your question that there should be no need to extract the kernel and initramfs from the initvm in addition to the RFS itself. Could you please suggest a better solution for my setup?

Best regards,
Lukasz



----------------------------------------

scan Messtechnik GmbH
Brigittagasse 22-24
A-1200 Wien/Vienna
tel. +43 1 219 73 93 - 0
fax +43 1 219 73 93 - 12
http://www.s-can.at
office at s-can.at

Geschaeftsfuehrer/President: DI Andreas Weingartner
Firmenbuchnummer/Incorporation No: FN178880i
Gerichtsstand/Court of Jurisdiction: Wien/Vienna

----------------------------------------

s::can - intelligent, optical, online

i::scan - compact, precise and affordable!
UV254::NTU::FTU::TOC::DOC::COD::BOD::Colour ...and many more to come!
http://www.i-scan.at
----------------------------------------
"YES WE SCAN !"




More information about the elbe-devel mailing list