chiark / gitweb /
nspawn: add support for limited dissecting of MBR disk images with nspawn
authorLennart Poettering <lennart@poettering.net>
Wed, 14 Jan 2015 23:47:10 +0000 (00:47 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 14 Jan 2015 23:47:10 +0000 (00:47 +0100)
commitada4799ac5ad2e6c0fe11dc5c096faca8a85876b
tree42532e2fab672f0aef39ae768c73eb596e859a69
parent733d15ac7a23c80f2e447f6c2fca0406bc9960db
nspawn: add support for limited dissecting of MBR disk images with nspawn

With this change nspawn's -i switch now can now make sense of MBR disk
images too - however only if there's only a single, bootable partition
of type 0x83 on the image. For all other cases we cannot really make
sense from the partition table alone.

The big benefit of this change is that upstream Fedora Cloud Images can
now be booted unmodified with systemd-nspawn:

 # wget http://download.fedoraproject.org/pub/fedora/linux/releases/21/Cloud/Images/x86_64/Fedora-Cloud-Base-20141203-21.x86_64.raw.xz
 # unxz Fedora-Cloud-Base-20141203-21.x86_64.raw.xz
 # systemd-nspawn -i Fedora-Cloud-Base-20141203-21.x86_64.raw -b

Next stop: teach the import logic to automatically download these
images, uncompress and verify them.
src/nspawn/nspawn.c