diff --git a/site/docs/install/chromebooks.md b/site/docs/install/chromebooks.md index 279f433..f7df43e 100644 --- a/site/docs/install/chromebooks.md +++ b/site/docs/install/chromebooks.md @@ -162,22 +162,31 @@ To flash the entire ROM image internally, run within ChromeOS: If you can already boot a conventional Linux distro on your Chromebook, you may be able to use `flashrom -p linux_mtd` on that system instead. -Install an operating system +Install an operating system (experimental research) =========================== Successful installations: +------------------------- + +Libreboot currently hosts a guide on how to install ArchLinuxARM on RK3399-based Chromebooks running U-boot, which can be found [here](../uboot/uboot-archlinux.md). + +There is also this page which refers installing Debian on the Asus C201: * [ArchLinuxARM on RK3399-based Chromebooks](../uboot/uboot-archlinux.md). * [Debian on Asus Chromebook C201](https://wiki.debian.org/InstallingDebianOn/Asus/C201). Unsuccessful installations: +--------------------------- * [OpenBSD on Samsung Chromebook Plus XE513C24](../uboot/uboot-openbsd.md). Other promising ARM-compatible distros: +--------------------------------------- * [Armbian](https://www.armbian.com/uefi-arm64/). +In general, ARM-compatible distros targeting U-boot (such as [armbian](https://www.armbian.com/uefi-arm64/)) can be used. + See also ======== diff --git a/site/docs/uboot/uboot-archlinux.md b/site/docs/uboot/uboot-archlinux.md index 3b99e18..5996faa 100644 --- a/site/docs/uboot/uboot-archlinux.md +++ b/site/docs/uboot/uboot-archlinux.md @@ -3,18 +3,22 @@ title: Installing ArchLinuxARM on a Chromebook with U-Boot installed x-toc-enable: true ... +Background +========== + ArchLinuxARM Latest (as of May 1st 2023) boots and can be installed successfully using libreboot 20230319 on a gru_bob chromebook. -The following process should theoretically be applicable to other U-Boot devices, but the focus here is specifically on ArchLinuxARM. +The following process should theoretically be applicable to other U-Boot devices and GNU/Linux distributions, but the focus here is specifically on ArchLinuxARM. -Sources used for this guide include the following guide to install ArchLinuxARM on a RockPro64: -https://jforberg.se/blog/posts/2023-02-19-rockpro64/rockpro64.html +Sources used for this guide include the [following guide to install ArchLinuxARM on a RockPro64,](https://jforberg.se/blog/posts/2023-02-19-rockpro64/rockpro64.html) -And the the instructions from the ArchLinuxARM wiki here: -https://archlinuxarm.org/platforms/armv8/rockchip/asus-chromebook-flip-c101pa +And the the instructions from the ArchLinuxARM wiki [here](https://archlinuxarm.org/platforms/armv8/rockchip/asus-chromebook-flip-c101pa) (Be aware that there will be overlap in my documentation with these guides, so some of this information will be very close to verbatim.) -The purpose of this guide is to instruct users on how to install an ArchLinuxARM on an external disk that will boot on a gru_bob chromebook, and optionally on the internal eMMC. +The purpose of this guide is to instruct users on how to install an ArchLinuxARM on an external disk that will boot on a gru_bob chromebook, and optionally on the internal eMMC. Many concepts covered in this guide may be familiar to prospective and veteran Libreboot users, with the scope being comprehensive. + +Boot Method +=========== There are (at least) three methods that can be used to boot into a Linux distribution from u-boot: 1) EFI - common, modern boot method for amd64 architecture machines. This is not distribution-specific, so if you intend to make a portable drive that is compatible across multiple systems, you may have a use case. @@ -25,14 +29,16 @@ This is an unlikely use-case, so it's a bit odd to use an EFI partition when not Despite still being distributed by some distros, boot.scr is a legacy boot method according to the u-boot docs: "Typically we expect extlinux.conf to be used, but execution of boot.scr is maintained for backwards-compatibility." -For more information about what actually goes into a boot.scr script: -https://u-boot.readthedocs.io/en/latest/usage/cmd/source.html?highlight=boot.scr#fit-image +For more information about what actually goes into a boot.scr script, check [this page in the u-boot documentation](https://u-boot.readthedocs.io/en/latest/usage/cmd/source.html?highlight=boot.scr#fit-image) 3) extlinux.conf - a flat, bootloader-spec text file that lives in /boot/extlinux/extlinux.conf. That's all. Not a binary blob in sight! Since extlinux.conf is supported by multiple bootloaders, making your system more portable, is natively supported by u-boot, and requires no binary blobs or extra software, it seems to be the best choice for a chromebook. -Here is an example template of extlinux.conf, similar examples are found in the u-boot docs (https://u-boot.readthedocs.io/en/latest/develop/distro.html): +Creating extlinux.conf +====================== + +Here is an example template of extlinux.conf, [similar examples are found in the u-boot docs](https://u-boot.readthedocs.io/en/latest/develop/distro.html): ``` default arch @@ -56,9 +62,14 @@ label archfallback append root=PARTUUID=$PARTUUID rw console=tty1 console=ttyS2,115200 earlycon rootwait LANG=en_US.UTF-8 ``` +Formatting and Partitioning Your External Media +=============================================== + Now it's time partition the boot disk. During testing, a microSD card was used in the microSD card slot of the gru-bob chromebook. The libreboot configuration (in the 20230319 release) will boot the microSD card above the onboard eMMC if both are present and bootable. This is useful because it means no knowledge or use of the u-boot console is required. +Since the eMMC is 16GB of storage space, it's advisable to choose an external storage disk of less than 16GB if you intend to install onto the onboard storage, or to create a root partition of less than 15.8GB. + Find your device with my favourite command, `lsblk` and open it with `fdisk` ``` @@ -72,7 +83,7 @@ In the fdisk tui, create two partitions on a Master Boot Record: - create boot partition of approx. 200MB or greater - set bootable flag on this partition - set type to fat32 (ext2 is also supported by extlinux I believe, but I used fat32) -- create second partition using the rest of the available bytes +- create a second partition of up to 15.8GB You will find the appropriate options by typing `m` when using the fdisk tui on GNU/Linux distros. @@ -94,6 +105,9 @@ append console=ttyS0,115200 console=tty1 rw root=PARTUUID=fc0d0284-ca84-4194-bf8 ``` in the template provided above, replace `$PARTUUID` with your own. It's possible to specify root in other ways - check the u-boot docs for more examples. +Boot-Disk Creation +================== + Now that we've got an extlinux.conf file, copy it to your /tmp directory, and we'll begin. ``` cd /tmp @@ -120,18 +134,21 @@ With that, you should now have a (kind of) working boot disk - insert your insta Extensive testing with ArchLinuxARM-latest release, showed that booting the fallback initramfs image will work, but the main image won't. If you create an extlinux.conf file with paths to both images - like in the template above - you can select either by number at boot. +Going Live - Necessary Tweaks +============================= + Once you're at the login prompt, the fun isn't over! Login & password for root are both `root` by default. Most Arch users will likely try to update their system now - don't update just yet. Run `lsblk` and you'll see that the boot partition is not mounted by default. -Updating with `pacman -Syu` will cause driver problems if you update without your boot partition mounted, likely meaning you cannot connect to the internet with a USB peripheral. +Updating with `pacman -Syu` at this stage will cause driver problems if you update without your boot partition mounted, likely meaning you cannot connect to the internet with a USB peripheral. -To resolve the problem: +To prevent this becoming a problem: ``` mkdir /boot mount /dev/sdX1 /boot ``` -Yes you may now update. +With that out of the way, yes, you may now update. It's worth creating a basic filesystem table to automate mounting at boot - it's blank by default so here's another template: ``` @@ -145,13 +162,16 @@ UUID=$UUID1 / ext4 rw,relatime 0 1 # /dev/mmcblk1p1 boot UUID=$UUID0 /boot vfat rw,relatime 0 2 ``` -It should go without saying that you'll replace `$UUID0` and `UUID1` with your boot and root filesystem UUID -to get the right information in there: +It should go without saying that you'll replace `$UUID0` and `UUID1` with your boot and root filesystem UUID. +To get the right information in there: ``` lsblk -o NAME,UUID,FSTYPE,SIZE ``` `NAME` and `SIZE` are not necessary, but they will help you tell which partition is which. +Final Steps +=========== + At this stage, you now have a fully functional ArchLinuxARM system on an external disk, and are ready to configure your system. If you intend to install onto the eMMC module, you can make your changes permanent with: ```