paint-brush
Ubuntu 16 installer boot image for Dell Chromebook 13 (Lulu)by@gdm85
1,580 reads
1,580 reads

Ubuntu 16 installer boot image for Dell Chromebook 13 (Lulu)

by Giuseppe D.M.February 7th, 2018
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

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.

People Mentioned

Mention Thumbnail

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Ubuntu 16 installer boot image for Dell Chromebook 13 (Lulu)
Giuseppe D.M. HackerNoon profile picture

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.

Don’t rush to Dell website: it’s out of production. Only student versions are available now

Legacy boot

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*:

https://johnlewis.ie/custom-chromebook-firmware/rom-download/

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!

gfxboot problems

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 failledError setting up gfxbootboot: 

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:


Index of /ubuntu/dists/xenial-updates/main/installer-amd64/current/images/netboot_Edit description_archive.ubuntu.com

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:

  1. create a list of all the module files already present inside the initrd
  2. 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
  3. 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
  4. 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)
  5. 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.

Success

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# exit

And continue the installation after finally being able to configure wireless network.

First boot

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 update-grub.

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.