The Dell Chromebook 13" 7310 (Lulu model) makes for a nice chromebook, and the first thing we want to do is install Ubuntu on it.
It is not necessary to remove the write-protect switch to boot Linux on this device. I will give here for reference some instructions on the procedure I followed.
First step is to switch the chromebook to developer mode; you can use Arch Linux’ documentation for this. All steps including “Enabling SeaBIOS” should be followed, but do not reboot the machine yet.
Flashing the right SeaBIOS
To install SeaBIOS on this model I used the script provided by John Lewis, you can find documentation and instructions here*:
The matrix there confirms that for this model it is not necessary to remove the write-protect switch, since RW_LEGACY mode is supported.
*= Please donate to the author to support his work, we would not be here enjoying Ubuntu on this device otherwise.
You can download and check the script to see what it does; it will detect the model and then download the right ROM file and offer you options to install it on the RW_LEGACY slot of the disk.
Run this script (after reading/changing it if you like) on the chromebook root shell started at previous step; once it has completed, congratulations, you now have unlocked a working SeaBIOS for your device!
After flashing an Ubuntu 16 installer ISO (desktop or server) to an USB device and booting with Ctrl+L you will unfortunately be blocked by the dreadful gfxboot error:
graphics initialization failled
Error setting up gfxboot
You can read online many desperate calls to write “help” and get going to next stage, but that is not helpful nowadays. The bug is explained in detail at the upstream Launchpad issue here.
Basically this means that the bootloader stage cannot setup a valid video mode, but bear in mind: this is just the bootloader, not the actual installer.
FAT boot (netboot)
The easiest solution would have been to change the isolinux.cfg file so that it would pick the first entry (installer) and do not bother displaying a menu, however that proved to be a dead end as I was not successful in modifying the ISO and flashing it again as bootable.
I decided to change approach and try a FAT boot disk from USB, which is commonly referred to as netboot/boot.img.gz for Debian/Ubuntu.
You can download the Ubuntu netboot image from the alternate downloads section:
This image is a plain FAT16 partition with a bootable MBR, so no partition table in there. It was probably created with makeboot (could not find instructions online about how Debian/Ubuntu actually creates it) and I was not able to create a larger one from scratch (you will see later why this matters).
You can flash the image to the correct USB device with:
gunzip < boot.img.gz | dd of=/dev/sdX bs=16M
Replace /dev/sdX with the actual USB mass storage device (try to not flash your main disk in this process).
Intel Wireless network
The netboot image will nicely boot and allow us to reach the textual installer, however you will soon realize that the wireless network interface is not recognized. This seems to be due to a single module missing, iwlmvm.
Just copying the iwlmvm.ko from the linux-image-extra package inside the initrd will not work, because the kernel symbols do not match; also, adding all the modules from linux-image-extra is not an option because of size constraints (the boot.img is quite small), so I had to patch the existing initrd with the following procedure:
- create a list of all the module files already present inside the initrd
- copy such modules and boot/vmlinuz-4.4.0–101-generic (renamed as simply linux) from http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-image-4.4.0-101-generic_4.4.0-101.124_amd64.deb
- copy the missing iwlmvm.ko from http://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-image-extra-4.4.0-101-generic_4.4.0-101.124_amd64.deb
- put all the copied files (except the linux kernel) inside the initrd.gz (I removed other unused modules in the process to free up some space)
- copy the kernel (/linux) and the updated initrd.gz on the mounted boot.img
While I was at it I also fixed the vga= line to use the correct value for the chromebook’s display, which is 0x340.
The end result is that the installer boots almost flawlessly, you will receive a network not detected error and then you have to go back to the installation menu and choose “Execute a shell”. From the prompt, simply run:
# rmmod iwlwifi
# modprobe iwlwifi
And continue the installation after finally being able to configure wireless network.
After completing the installation you will not see the GRUB boot menu; re-use the boot image to enter the root partition in rescue mode (it will setup a chroot), enable the
GRUB_TERMINAL=console line in
/etc/default/grub and then run
While you’re at it, you can copy
/etc/network/interfaces from the installer environment into your new root filesystem so that on next boot the wireless network will be configured as well.
The boot image
You can repeat the steps above yourself to fix the boot image or download the files I changed from this gist:
The most important files are linux and initrd.gz; mount the USB storage as you would regularly (Ubuntu will allow you to do this without issues even from GUI) and overwrite the files in it with those provided in the gist.