Crouton with Fedora (chroot)
Update 28th January 2016 #
A new much improved version is now available:
Crouton is a chroot utility for ChromeOS devices which allows you to run a Linux distro alongside ChromeOS. Currently it supports Debian, Ubuntu and Kali linux and there is a fork for Arch Linux and Mageia. Now there is something missing from this sentence, and you probably already know what it is. Yep, I’ve managed to install Fedora alongside my ChromeOS because, hey why not, and because I kinda install Fedora on everything, which you already know if you ever checked my blog. I recently bought a Toshiba Chromebook (used) and I’m really happy with it. It’s fast, it’s pretty, it’s light and it runs Fedora. :)
First some important stuff:
- my work is based on the official latest (at the moment of writing) version of Crouton project
- it is also heavily based on the old fork of a user called divx118 who tried to run Fedora inside Crouton, which can be found here
- my version is really ugly, and stupid, but hey, it works
- this version of Crouton will break all existing versions of Crouton you might have on your device so please backup your data (I had to modify some of the Crouton scripts so that Fedora can work sadly, and that is the reason why I didn’t even bother putting the code on github since it can’t ever be merged) :( If (when) this breaks your installations, you should be able to download the latest official Crouton and update your chroots to unbreak them.
- I will try to keep this updated once or twice a year (when new Fedora is released)
- I’ve tested this on my chromebook (Toshiba Chromebook - Leon) but in theory it should work on any ChromeOS device (i386, x86_64 or ARM) as long as the Fedora mirror is available
- Everything you find here is open source! Please feel free to improve it and send it back to me, please!
Now, I have to warn you again. Its ugly, its stupid but it works. It may break in the future, but it runs pretty good so far on my machine with no bugs that I can report.
Prerequisites are that your device is in developer mode and that you have around 2GB of disk space.
FINAL WARNING: Use Crouton with Ubuntu, it’s great. This probably isn’t… #
How it works:
- We unpack some base RPM’s from Fedora 20 Heisenbug repository (yes you read that correctly, last version known to work)
- We get yum to run
- We get the Fedora 23 GPG key
- We do a distro-sync against the Fedora 23 repository (20 -> 23 is only possible in a chroot)
- We clean up
You don’t actually have to do any of this since I created a modified version of Crouton which will do all this for you out of the box.
Get the modified Crouton archive from my Google Drive like this:
cd ~/Downloads wget http://bit.ly/1PNQxm6 -O crouton-fedora.tar.gz
2016-01-28 - There is a newer version available now, you shouldn’t be installing this version, check the link on the top
And unpack it:
tar xvf crouton-fedora.tar.gz
After this it really simple as in normal Crouton:
sudo sh ./crouton-fedora/installer/main.sh -r fedora23 -t core
After a while it will ask you about your username and password. And if no errors are shown you should be able to enter the Fedora installation with:
You can delete the chroot like in normal Crouton with:
sudo delete-chroot fedora23
Some important stuff:
- only use core target
- the mirror for the fc20 files is in the crouton-fedora/installer/fedora/defaults file, if it breaks or if it is slow it’s a good idea to change it
- the link for the fc23 keys package is in the crouton-fedora/targets/post-common if it 404’s change it
- you can even try to go for rawhide, let me know if it works!
After the installation you are in Fedora chroot, it’s great, dnf works, everything works!
My crosh is running in a window, thanks to this.
Pretty easy, right? :)
DE, what DE??? #
Now, CLI is cool but I wanted a desktop environment. Normal Crouton users are spoiled for choice and have xiwi which is fantastic and seamless, but I think this is pretty similar to xiwi actually. So, since you have Fedora now, getting a DE installed is pretty simple. I like LXDE so:
sudo dnf install @lxde
Now, X server on ChromeOS is replaced with Freon (please forgive me if I’m mistaken, I only got my Chromebook two days ago) if I understood correctly, so the Crouton team put some witchcraft into their scripts to make it work. I’m not nearly as smart or pretty as them, but I thought about it and realized, why can’t we just get the VNC server running similar like we did with our GNURoot on Android? And we can!
sudo dnf install tigervnc-server vncpasswd
and enter your password. After this create the xstartup file:
echo '/usr/bin/startlxde' > ~/.vnc/xstartup && chmod +x ~/.vnc/xstartup
This obviously depends on the DE you chose.
After this you can run the VNC server like so:
vncserver :1 -geometry 1360x768 -depth 24
Change the resolution if you need.
After this your Chromebook is listening for connection on port 5901 (5900 + the number you wrote after ‘:’). Hop over to the Chrome Web Store and install RealVNC. Start it up and enter the address:
set quality to high, and connect.
When prompted for password, remember that it is the password which you set with the vncpasswd command and not your user password.
And then what happens? Not much really. :)
You can go full-screen, copy-paste works etc. Don’t expect it to run 3D stuff or demanding stuff. For normal applications it’s great actually!
So, there you have it, a proof of concept that you can run Fedora on everything. :)
Hit me on Twitter if you have problems! (@nmilosev)
All the code is in the mentioned archive, so you can modify it and play with it. :)
Finally, HUGE PROPS to the Crouton team for this brilliant piece of software!