Samsung’s latest Chromebook is the first model to feature an ARM-based processor. It’s also one of the first devices to hit the market with a chip based on the new ARM Cortex-A15 design. But since Ubuntu (and many other Linux-based operating systems) already support ARM Architecture, it’s not that difficult to get the Chromebook to run a different operating system.
The first thing you have to do is to prepare a reasonably-sized SD card. A 4GB SanDisk Ultra was used to test this procedure.
Start by inserting an SD card in a reader on your Ubuntu PC, the below instructions reflects the process done in a 16 GB card.
So, your SD card needs a GPT partition table, so to create a blank partition table:
# sudo parted /dev/sdd
(parted) mktable gpt
(parted) quit
Then edit it with gdisk (apt-get install gdisk. The first part sets the sector alignment to 4M based on the recommendation from Arnd in the comments below:
sudo gdisk /dev/sdd
x
l
8192
m
n
1
<enter>
+16M
7f00 (ChromeOS kernel)
n
2
<enter>
+16M
7f00
n
3
<enter>
<enter>
<enter>
This creates three partitions; two kernel ones and one for the root filesystem.
Then, create a filesystem on the root partition:
sudo mkfs.ext4 /dev/sdd3
"
Once the filesystem is created, it needs to be mounted somewhere and the Fedora 17 filesystem extracted to it.
sudo mount /dev/sdd3 /mnt
sudo tar Jxvf ~/Downloads/Fedora-17-armhfp-xfce.tar.xz -C /mnt
Don’t forget to unmount the filesystem when you are finished.
sudo umount /mnt
Now enable developer mode on the Chromebook, if it is not already, as it seems to be required for the rest of the procedure. This is accomplished through booting into recovery mode first by holding both the escape and refresh keys on the keyboard and then striking the power key. While in recovery mode, you can safely ignore any messages indicating the installation is broken. Press Ctrl+D while in recovery mode to enable developer mode. The prompt will ask for permission to clear all local data from the system before removing OS verification. It is an automatic process that takes about ten minutes. Once it is finished there is a message indicating that OS verification is disabled. This message will now appear at every boot time to indicate your system is in developer mode. Press Ctrl+D to continue booting ChromeOS.
Once logged in and have the SD card inserted, press Ctrl+Alt+T to open a crosh prompt.
Subsequently executing “shell” grants the familiar bash shell. From here run “sudo -s” to switch to root user as the following steps require root access.
Now the only remaining piece is to put an actual kernel on the kernel partitions of the SD card.
Be VERY careful here, mmcblk1 and mmcblk0 are very easy to mistype, and you won’t like the results from doing it
The kernel command line is going to be different from what you use for Chrome OS, so you’ll need to repack the kernel blob manually first. To do that you can follow this:
cd /tmp
echo "console=tty1 debug verbose root=/dev/mmcblk1p3 rootwait rw" > /tmp/config
vbutil_kernel --pack /tmp/newkern --keyblock /usr/share/vboot/devkeys/kernel.keyblock --version 1 --signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk --config=/tmp/config --vmlinuz /boot/vmlinuz-3.4.0 --arch arm
Then move the SD card to the Chromebook and start writing out the kernel:
dd if=/tmp/newkern of=/dev/mmcblk1p1
dd if=/tmp/newkern of=/dev/mmcblk1p2
Now, enable boot from “USB” (which includes SD card on these systems):
crossystem dev_boot_usb=1
Final step is to mark the partitions on the SD card as known good so
that the firmware will try to boot them:
cgpt add -i 1 -S 1 -T 5 -P 10 -l KERN-A /dev/mmcblk1
cgpt add -i 2 -S 1 -T 5 -P 5 -l KERN-B /dev/mmcblk1
I.e. mark both as successful, first partition as priority 10, second as priority 5.
Also copy over the modules and firmware to the root filesystem that was added to the card earlier. The filesystem on the SD card used in this procedure automatically mounted as /media/removable/External Drive 2/. It might be different. Check with the ‘mount’ command if not sure.
cp -rf /lib/modules/* /media/removable/External Drive 2/lib/modules/
cp -rf /lib/firmware/* /media/removable/External Drive 2/lib/firmware/
There are also a couple things that needed to be fixed before it was possible to log in to the new Fedora 17 system.
First remount the filesystem with some extra permissions.
mount -o remount,suid,exec /media/removable/External Drive 2/
Run a shell on the new filesystem.
chroot /media/removable/External Drive 2/
Give root a password.
passwd
Give guest a home directory and proper group.
mkdir /home/guest
rsync -a /etc/skel/ /home/guest
chown -R guest:users /home/guest
usermod -d /home/guest -g users guest
Exit the chroot environment and unmount filesystem.
exit
umount /media/removable/External Drive 2/
Now reboot the Chromebook. Instead of pressing Ctrl+D, press Ctrl+U to boot from the SD card. If all went well, the Fedora 17 boot process should stream down the screen.
Nepal Budget 2081/82: Analysis of past FY budgets, What to Expect, and where to watch live #NepalBudget FY2024/25
The Government of Nepal is set to announce the budget for the fiscal year 2024/25 (Nepali year 2081-2082) on May...