From Fedora Project Wiki

There's currently a number of ARM (currently all are ARMv7) based Chromebooks base on a few specific SoCs.

They are:

Samsung Exynos:

  • Snow (Exynos 5240)
  • CB2 (Exynos 5800, 1080p, microSD)

NVIDIA Tegra K1:

  • Acer nyan-big (1080p HD version, and non-HD variant)
  • HP nyan-blaze (discontinued)

Rockchips:

  • Asus flip


Preparing Fedora

Start by downloading your Fedora, here we use the XFCE variant, but you can choose another at the download site:

http://download.fedoraproject.org/pub/fedora/linux/releases/22/Images/armhfp/

$ cd /tmp

$ wget http://download.fedoraproject.org/pub/fedora/linux/releases/22/Images/armhfp/Fedora-Xfce-armhfp-22-3-sda.raw.xz

$ unxz -v Fedora-Xfce-armhfp-22-3-sda.raw.xz


Next you mount the raw disk image, and extract the rootfs. (Note the loop devices in the output)

$ sudo kpartx -av /tmp/Fedora-Xfce-armhfp-22-3-sda.raw

$ sudo dd if=/dev/mapper/loop0p3 of=/tmp/Fedora-22-Xfce-rootfs.ext4 conv=fsync

$ sudo kpartx -d /tmp/Fedora-Xfce-armhfp-22-3-sda.raw


At this point you may optionally shrink ext4 rootfs. (It will be expanded in a later step)

$ sudo e2fsck -f /tmp/Fedora-22-Xfce-rootfs.ext4

$ sudo resize2fs -fM /tmp/Fedora-22-Xfce-rootfs.ext4


Label the rootfs, and apply a new UUID

$ UUID=$(uuidgen)

$ LABEL='ROOTFS'

$ sudo tune2fs -U "$UUID" -L "$LABEL" /tmp/Fedora-22-Xfce-rootfs.ext4


Create the partitions

$ truncate --size=7GiB /tmp/chromebook-xfce.raw

$ sgdisk -a 8192 -n 1:0:+30M -t 1:7F00 -c 1:"KERN-A" -A 1:=:0x011F000000000000 \
                 -n 2:0:+30M -t 2:7F00 -c 2:"KERN-B" -A 2:=:0x011A000000000000 \
                 -n 3:0:+30M -t 3:7F00 -c 3:"KERN-C" -A 3:=:0x0115000000000000 \
                 -n 4:0:+1G  -t 4:8300 -c 4:"BOOT"   \
                 -n 5:0:+1G  -t 5:8200 -c 5:"SWAP"   \
                 -n 6:0:0    -t 6:8300 -c 6:"ROOTFS" /tmp/chromebook-xfce.raw


Write the Xfce rootfs to the partition.

$ sudo kpartx -avg /tmp/chromebook-xfce.raw

$ dd if=/tmp/Fedora-22-Xfce-rootfs.ext4 of=/dev/mapper/loop0p6 bs=2M conv=fsync

$ sudo resize2fs -f /dev/mapper/loop0p6


Setup the swap device

$ UUID_SWAP=$(uuidgen)
$ sudo swapon -v -U "$UUID_SWAP" -L 'SWAP' /dev/mapper/loop0p5


Setup the Fedora boot partition

$ UUID_BOOT=$(uuidgen)
$ sudo mkfs.ext4 -m0 -U "$UUID_BOOT" -L 'BOOT' /dev/mapper/loop0p4


Mount the filesystems

$ sudo mount /dev/mapper/loop0p6 /mnt

$ sudo mount /dev/mapper/loop0p4 /mnt/boot

Configure the filesystem table

cat <<-EOF > /mnt/etc/fstab
UUID=$UUID / ext4 defaults 1 1
UUID=$UUID_SWAP swap swap defaults 0 0
UUID=$UUID_BOOT /boot ext4 defaults 0 2
EOF

(to be continued)