From Fedora Project Wiki
No edit summary
Line 79: Line 79:
$ truncate --size=7GiB /tmp/chromebook-xfce.raw
$ truncate --size=7GiB /tmp/chromebook-xfce.raw


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




(to be continued)
(to be continued)

Revision as of 18:10, 23 October 2015

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 hyperlink bellow: http://download.fedoraproject.org/pub/fedora/linux/releases/22/Images/armhfp/

cd /tmp
wget http://mirror.pnl.gov/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.

$ sudo kpartx -av /tmp/Fedora-Xfce-armhfp-22-3-sda.raw
add map loop0p1 (253:10): 0 999424 linear /dev/loop0 2048
add map loop0p2 (253:11): 0 1000482 linear /dev/loop0 1001472
add map loop0p3 (253:12): 0 6835937 linear /dev/loop0 2001954

$ sudo dd if=/dev/mapper/loop0p3 of=/tmp/Fedora-22-Xfce-rootfs.ext4 conv=fsync
6835937+0 records in
6835937+0 records out
3499999744 bytes (3.5 GB) copied, 6.73428 s, 520 MB/s

$ sudo kpartx -dv /tmp/Fedora-Xfce-armhfp-22-3-sda.raw
del devmap : loop0p3
del devmap : loop0p2
del devmap : loop0p1
loop deleted : /dev/loop0

At this point you may optionally shrink ext4 rootfs.

$ sudo e2fsck -f /tmp/Fedora-22-Xfce-rootfs.ext4
e2fsck 1.42.12 (29-Aug-2014)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
_/: 104380/213840 files (0.1% non-contiguous), 626133/854492 blocks

$ sudo resize2fs -fM /tmp/Fedora-22-Xfce-rootfs.ext4
resize2fs 1.42.12 (29-Aug-2014)
Resizing the filesystem on /tmp/Fedora-22-Xfce-rootfs.ext4 to 691002 (4k) blocks.
The filesystem on /tmp/Fedora-22-Xfce-rootfs.ext4 is now 691002 (4k) blocks long.


Label the rootfs, and apply a new UUID

UUID=$(uuidgen)
LABEL='ROOTFS'

$ sudo tune2fs -U "$UUID" -L "$LABEL" /tmp/Fedora-22-Xfce-rootfs.ext4
tune2fs 1.42.12 (29-Aug-2014)


Create


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

$ sgdisk -a 8192 -n 1:0:+30M -t 1:7F00 -c 1:"KERN-A" \
                 -n 2:0:+30M -t 2:7F00 -c 2:"KERN-B" \
                 -n 3:0:+30M -t 3:7F00 -c 3:"KERN-C" \
                 -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


(to be continued)