Skip to content

Instantly share code, notes, and snippets.

@ryanj
Last active August 29, 2015 14:15
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanj/ec734b00f7f781c92650 to your computer and use it in GitHub Desktop.
Save ryanj/ec734b00f7f781c92650 to your computer and use it in GitHub Desktop.
How to get Fedora21 minimal runing on the RaspberryPi 2.0

Fedora21 minimal on RPi-2

This guide assumes that your SD slot is available at /dev/sdb. Make sure to substitute the correct value for your own SD device (or you might wipe out one of your hard disks)!! USE AT YOUR OWN RISK

  1. Download the experimental Fedora spin:
curl -O http://www.digitaldreamtime.co.uk/Fedora/Pi2B-Minimal-armhfp-21-5-20150211-1.img.xz
  1. Extract the image
xz -d Pi2B-Minimal-armhfp-21-5-20150211-1.img.xz
  1. Write the image to an SD card:
sudo dd if=Pi2B-Minimal-armhfp-21-5-20150211-1.img of=/dev/sdb bs=1M
  1. Resize the target partition
sudo sync
sudo gparted /dev/sdb # use it to resize the partition
sudo resize2fs /dev/sdb3 # to expand the fs
sudo sync
  1. Put that disk in your Pi

Plug it in and turn it on!

Ethernet, HDMI, and keyboard should all be working. Login with root:fedora and run initial-setup to change the root password, add user accounts, and set your timezone. Your hostname can be set with hostnamectl set-hostname --static mypi.localdomain.

Next steps? Help me figure out how to install Docker and Go!

@ryanj
Copy link
Author

ryanj commented Feb 18, 2015

I installed the F22 docker packages from koji http://koji.fedoraproject.org/koji/buildinfo?buildID=610075

Updated Go packages are also available: http://koji.fedoraproject.org/koji/buildinfo?buildID=612641

The packages seem to install cleanly, but SELinux isn't available, and when I try to start Docker it fails with FATA[0000] Error running DeviceCreate (CreatePool) dm_task_run failed, as described here : moby/moby#6325

I checked to see if my kernel has support for DM_THIN_PROVISIONING and found the following:

info: reading kernel config from /proc/config.gz ...

Generally Necessary:
- cgroup hierarchy: properly mounted [/sys/fs/cgroup]
- CONFIG_NAMESPACES: enabled
- CONFIG_NET_NS: enabled
- CONFIG_PID_NS: enabled
- CONFIG_IPC_NS: enabled
- CONFIG_UTS_NS: enabled
- CONFIG_DEVPTS_MULTIPLE_INSTANCES: enabled
- CONFIG_CGROUPS: enabled
- CONFIG_CGROUP_CPUACCT: enabled
- CONFIG_CGROUP_DEVICE: enabled
- CONFIG_CGROUP_FREEZER: enabled
- CONFIG_CGROUP_SCHED: enabled
- CONFIG_MACVLAN: enabled
- CONFIG_VETH: enabled
- CONFIG_BRIDGE: enabled
- CONFIG_NF_NAT_IPV4: enabled
- CONFIG_IP_NF_FILTER: enabled
- CONFIG_IP_NF_TARGET_MASQUERADE: enabled
- CONFIG_NETFILTER_XT_MATCH_ADDRTYPE: enabled
- CONFIG_NETFILTER_XT_MATCH_CONNTRACK: enabled
- CONFIG_NF_NAT: enabled
- CONFIG_NF_NAT_NEEDED: enabled
- CONFIG_POSIX_MQUEUE: enabled

Optional Features:
- CONFIG_MEMCG_SWAP: missing
- CONFIG_RESOURCE_COUNTERS: enabled
- CONFIG_CGROUP_PERF: missing
- Storage Drivers:
  - "aufs":
    - CONFIG_AUFS_FS: missing
    - CONFIG_EXT4_FS_POSIX_ACL: enabled
    - CONFIG_EXT4_FS_SECURITY: enabled
  - "btrfs":
    - CONFIG_BTRFS_FS: enabled
  - "devicemapper":
    - CONFIG_BLK_DEV_DM: enabled
    - CONFIG_DM_THIN_PROVISIONING: missing
    - CONFIG_EXT4_FS: enabled
    - CONFIG_EXT4_FS_POSIX_ACL: enabled
    - CONFIG_EXT4_FS_SECURITY: enabled
  - "overlay":
    - CONFIG_OVERLAY_FS: missing

It sounds like I may need to find an updated kernel (or find updated modules to match my current kernel), or rebuild my kernel to include CONFIG_DM_THIN_PROVISIONING (and possibly CONFIG_OVERLAY_FS as well).

@ryanj
Copy link
Author

ryanj commented Feb 22, 2015

STATUS UPDATE:
A partial fix for Docker support is available:
You'l need to upgrade to a newer kernel that includes modules for CONFIG_OVERLAY_FS and CONFIG_DM_THIN_PROVISIONING by running sc-cleanUpdate-testing-pi from your Pi2B:

sudo sc-cleanUpdate-testing-pi
sudo reboot

After the reboot, I was able to start the Docker daemon, and docker pull an image. But I hit another error when I attempt to docker run the container:

$ docker run ryanj/gist-reveal.it
INFO[2631] POST /v1.17/containers/create                
INFO[2631] +job create()                                
INFO[2632] +job log(create, e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb, ryanj/gist-reveal.it:latest) 
INFO[2632] -job log(create, e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb, ryanj/gist-reveal.it:latest) = OK (0) 
INFO[2632] -job create() = OK (0)                       
INFO[2632] POST /v1.17/containers/e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb/attach?stderr=1&stdout=1&stream=1 
INFO[2632] +job container_inspect(e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb) 
INFO[2632] -job container_inspect(e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb) = OK (0) 
INFO[2632] +job attach(e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb) 
INFO[2632] POST /v1.17/containers/e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb/start 
INFO[2632] +job start(e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb) 
INFO[2632] +job allocate_interface(e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb) 
INFO[2632] -job allocate_interface(e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb) = OK (0) 
INFO[2632] +job log(start, e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb, ryanj/gist-reveal.it:latest) 
INFO[2632] -job log(start, e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb, ryanj/gist-reveal.it:latest) = OK (0) 
INFO[2632] +job release_interface(e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb) 
INFO[2632] -job release_interface(e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb) = OK (0) 
INFO[2632] -job attach(e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb) = OK (0) 
INFO[2632] +job release_interface(e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb) 
INFO[2632] -job release_interface(e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb) = OK (0) 
ERRO[2632] Warning: error unmounting device e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb: UnmountDevice: device not-mounted id e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb 
INFO[2632] +job log(die, e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb, ryanj/gist-reveal.it:latest) 
INFO[2632] -job log(die, e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb, ryanj/gist-reveal.it:latest) = OK (0) 
Cannot start container e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb: mountpoint for cpuset not found
INFO[2632] -job start(e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb) = ERR (1) 
ERRO[2632] Handler for POST /containers/{name:.*}/start returned error: Cannot start container e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb: mountpoint for cpuset not found 
ERRO[2632] HTTP Error: statusCode=500 Cannot start container e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb: mountpoint for cpuset not found 
FATA[0001] Error response from daemon: Cannot start container e6bc672640868fcccb798eacbb770c36881e024482a35f1f37a985e0a3ed8efb: mountpoint for cpuset not found 
[ryanj@whypi ~]$ sudo docker run ryanj/gist-reveal.it
[sudo] password for ryanj: 
INFO[2659] POST /v1.17/containers/create                
INFO[2659] +job create()                                
INFO[2660] +job log(create, 97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42, ryanj/gist-reveal.it:latest) 
INFO[2660] -job log(create, 97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42, ryanj/gist-reveal.it:latest) = OK (0) 
INFO[2660] -job create() = OK (0)                       
INFO[2660] POST /v1.17/containers/97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42/attach?stderr=1&stdout=1&stream=1 
INFO[2660] +job container_inspect(97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42) 
INFO[2660] -job container_inspect(97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42) = OK (0) 
INFO[2660] +job attach(97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42) 
INFO[2660] POST /v1.17/containers/97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42/start 
INFO[2660] +job start(97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42) 
INFO[2661] +job allocate_interface(97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42) 
INFO[2661] -job allocate_interface(97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42) = OK (0) 
INFO[2661] +job log(start, 97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42, ryanj/gist-reveal.it:latest) 
INFO[2661] -job log(start, 97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42, ryanj/gist-reveal.it:latest) = OK (0) 
INFO[2661] +job release_interface(97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42) 
INFO[2661] -job release_interface(97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42) = OK (0) 
INFO[2661] -job attach(97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42) = OK (0) 
INFO[2661] +job release_interface(97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42) 
INFO[2661] -job release_interface(97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42) = OK (0) 
ERRO[2661] Warning: error unmounting device 97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42: UnmountDevice: device not-mounted id 97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42 
INFO[2661] +job log(die, 97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42, ryanj/gist-reveal.it:latest) 
INFO[2661] -job log(die, 97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42, ryanj/gist-reveal.it:latest) = OK (0) 
Cannot start container 97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42: mountpoint for cpuset not found
INFO[2661] -job start(97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42) = ERR (1) 
ERRO[2661] Handler for POST /containers/{name:.*}/start returned error: Cannot start container 97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42: mountpoint for cpuset not found 
ERRO[2661] HTTP Error: statusCode=500 Cannot start container 97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42: mountpoint for cpuset not found 
FATA[0001] Error response from daemon: Cannot start container 97f2550c918c6ea129aa609fdd375917b43bb9d5e6e4f301577f3c8e57ef8c42: mountpoint for cpuset not found 

I'm not sure, but mountpoint for cpuset not found sounds like an issue with cgroups.

To be continued...

@ryanj
Copy link
Author

ryanj commented Mar 10, 2015

good stuff here - http://blog.hypriot.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment