[Lxc-users] LXC- ARM6 RaspberryPI Fedora core 14

Michael H. Warfield mhw at WittsEnd.com
Wed Apr 3 21:10:12 UTC 2013


Cross posting over to the developers list, since this is definitely a
developer issue...

On Wed, 2013-04-03 at 11:29 +0200, Benito wrote:
> Hi There
> 
> I've been working on a project on the Raspberry PI , where we want to 
> run a 32-bit /64-bit fedora 14 container
> on the RaspberryPi . I've had success with LXC on a Mint14 64-bit (which 
> is Ubuntu 12 based I believe) host  with Fedora 14 - 64bit container  ( 
> Downloaded FC14 with the template -t parameter below..,, It was as easy 
> as running :
> 
> apt-get install yum
> lxc-create -t fedora -n fedora14

Ok...  Got the latest lxc compiled on my Raspberry Pi.  There seem to be
4 things broken with the "fedora" template on the RPi, two of which are
peculiar to running on the Fedora Remix but one big one will bite
Raspbian as well.  One is a version/config issue with the Fedora
container for supporting systemd in a container.

1) The architecture is reported by the OS as armv6l but this fails.  The
arm processors should be mapped to arch = arm.  That means adding an if
check in the template.  That applies to both Raspbian and Fedora Remix
hosts.  I don't know of other architechtures are similarly affected.

2) Running under Fedora Remix 17, the template can not find the release
information and doesn't recognize it as a Fedora family.  Instead of
being in /etc/fedora-release, it's
in /etc/raspberrypi-fedora-remix-release but could also be extracted
from /etc/redhat-release, which is a symlink.

3) On Fedora Remix, if it finds the release (I added a symlink to test),
it's extracting the wrong field for the version number from the release
file.

This is vanilla Fedora 17:

Fedora release 17 (Beefy Miracle)

This is the RPi Fedora Remix 17:

Fedora remix release 17 (Raspberrypi Fedora Remix)

The template script is extracting the third field (word) and is one off
in this case.  That also causes the yum downloads to bomb.

Both points 2 & 3 can be circumvented by including the -R release to the
template like this:

lxc-create -t fedora -n Fedora17 -- -R 17

But that still leaves the bad architecture which then causes the yum
downloads to blow up.  I added this to the template to get it to work
and it's building a container now.

  if [ "$arch" = "i686" ]; then
      arch=i386
  fi

+ if [ "$arch" = "armv6l" ]; then
+     arch=arm
+ fi

That should probably be turned into a case statement.

Detecting the correct release file is probably going to be a little ugly
and, maybe, should fall back to /etc/redhat-release if fedora-release is
not present, detect the keyword "Fedora" and skip the optional word
"Remix".

4) Finally, there's going to need to be a version check in there to add
"autodev = 1" to container configs for versions greater than 14 or
systemd in the container will cause problems for the host system.

Regards,
Mike

> Now I've been struggling with this for a few weeks , Compiled an LXC 
> friendly kernel on the Raspbian OS, - Debian wheezy ARM , also tried 
> with Fedora ARM remix.
> Is it even possible to run a fedora14 container on ARM (raspberry pi) 
> architecture ?
> If so can anyone point me in the right direction ?
> 
> Regards
> Benito
> 
> 
> 
> ------------------------------------------------------------------------------
> Minimize network downtime and maximize team effectiveness.
> Reduce network management and security costs.Learn how to hire 
> the most talented Cisco Certified professionals. Visit the 
> Employer Resources Portal
> http://www.cisco.com/web/learning/employer_resources/index.html
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users
> 

-- 
Michael H. Warfield (AI4NB) | (770) 985-6132 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130403/7fb2a2f2/attachment.pgp>


More information about the lxc-users mailing list