Replacing Chrome OS with Debian Jessie on the Samsung Series 3 Chromebook


Recommended Posts

Hi, xorangekiller.

 

My Chromebook is put on Developer Mode and i have "crossystem dev_boot_usb=1" set in Chrome OS in order to be able to boot self-signed kernels from USB/SD media.

If i'll set up Debian using your partition scheme, will USB/SD boot (with Ctrl+U) still work?

 

I'm asking because i've already tried a scheme with Debian on eMMC having just two partitions (one with self-signed kernel, second with rootfs), and while i was able to boot into Debian (with Ctrl+D), the USB/SD boot got broken.

 

Thank you!

Link to comment
Share on other sites

Excellent description, thank you.

I am writing this using my Chromebook, debian installed.

Maybe the preparation of the internal ssd can be shortened by the following script:

 

#!/bin/sh

target_disk=/dev/mmcblk0
cgpt create ${target_disk}
cgpt add -i 11 -b 64 -s 16384 -S 1 -P 5 -l RWFW -t "firmware" ${target_disk}
cgpt add -i 6 -b 16448 -s 1 -S 1 -T 15 -P 0 -l KERN-C -t "kernel"  ${target_disk}
cgpt add -i 7 -b 16449 -s 1  -l ROOT-C -t "rootfs"   ${target_disk}
cgpt add -i 9 -b 16450 -s 1  -l reserved -t "reserved"   ${target_disk}
cgpt add -i 10 -b 16451 -s 1  -l reserved -t "reserved"   ${target_disk}
cgpt add -i 2 -b 16452 -s 32768 -S 1 -T 15 -P 15 -l KERN-A -t kernel ${target_disk}
cgpt add -i 4 -b 49220 -s 32768 -S 1 -T 15 -P 0 -l KERN-B -t kernel ${target_disk}
cgpt add -i 8 -b 81988 -s 32768  -l OEM -t data   ${target_disk}
cgpt add -i 12 -b 114756 -s 32768 -S 1 -P 5 -l EFI-SYSTEM -t "efi" ${target_disk}
cgpt add -i 5 -b 147524 -s 4096  -l ROOT-B -t rootfs ${target_disk}
cgpt add -i 3 -b 151620 -s 28870622 -S 1 -P 5 -l ROOT-A -t rootfs ${target_disk}

cgpt add -i 1 -b 29022242 -s 1755069  -l STATE -t data ${target_disk}
sync

mkfs.ext4 ${target_disk}p3
mkswap ${target_disk}p1

Norbert

Link to comment
Share on other sites

  • 2 weeks later...

Karl L.,

 

Firstly kudos for your excellent work so far.  :D

 

I'd like to understand how booting works, after one has followed your instructions.  Am I right that:

  1. The default "verified" uboot bootloader is not used (nor is the alternate "non-verified" nv-uboot bootloader? For more details on nv-uboot, please see "Appendix A: Using nv-U-Boot on the Samsung ARM Chromebook":
    http://www.chromium.org/chromium-os/u-boot-porting-guide/using-nv-u-boot-on-the-samsung-arm-chromebook ).  It seems you somehow use "firmware-linux" and "firmware-libertas" instead.  I've never heard of those (as I'm only familiar with how GRUB works, on PC's).  What are those?  What do they do?
  2. "firmware-linux" and "firmware-libertas" somehow boots a "stock" linux kernel that you compiled and packaged yourself, called "linux-image-exynos5" (as opposed to "borrowing" and "signing" the ChromeOS kernel, which is what one must unfortunately do using the current instructions found on "InstallingDebianOn Samsung ARMChromebook":
    https://wiki.debian.org/InstallingDebianOn/Samsung/ARMChromebook
  3. When future versions of your "linux-image-exynos5" are released (say, because there was an important security update released for the kernel), they'll "just work" (at boot time), when one installs them with "sudo apt-get update && sudo apt-get upgrade"?

If I'm correct on these 3 points, then how were you able to "get away with" not using the nv-uboot bootloader?  That is to say, why couldn't the Debian folks follow suit and boot their own stock linux kernels with "firmware-linux" and "firmware-libertas" like you do?

 

Note: The Debian folks are currently stuck on how to boot a stock linux kernel from nv-u-boot, as seen on
"InstallingDebianOn Samsung ARMChromebook":

https://wiki.debian.org/InstallingDebianOn/Samsung/ARMChromebook


  "Three partitions are created on the disk. In time, the intention is that these be used for:
   - a copy of nv-uboot that is chainloaded by the standard firmware,
   - a /boot filesystem containing the standard (non-ChromeOS) kernel, read by nv-uboot,
   - the root filesystem.

  Currently nv-uboot is *not* used, and so the arrangement is:
   - a copy of the ChromeOS kernel that is loaded by the standard firmware,
   - a /boot filesystem that is used only to contain the ChromeOS kernel (which is not used during booting, just during the preparation of the previous partition),
   - the root filesystem."

 

I would appreciate any clarification, as you seem to understand these things really well.  GPT and "verified" bootloaders are tough to understand, especially when it comes to how to boot stock linux kernels.

Link to comment
Share on other sites

Karl L.,

 

Your work is much appreciated.   :woot:   I write this posting from my new Debian Jesse install on my Samsung ARM Chromebook.

 

A few things could be filled into your procedure:

  • Before doing step 2.3, you didn't mention how to get the Chromebook connected to one's wifi network.  Here's how I did that (well, I'm pretty sure these were the minimal steps that succeeded):
    • ifconfig mlan0 down
    • ifconfig mlan0 essid MySSIDsNameHere key s:MyWifiPasswordHere
    • ifconfig mlan0 up
    • (wait about 15 seconds for the wifi authentication to work)
    • dhclient mlan0
    • (wait a few seconds for a DHCP lease to be assigned)
    • ifconfig mlan0
    • (you should now see a valid DHCP-assigned IP address for "inet addr" on the second line)
  • Before you can do step 2.3, gdisk needs to be installed on the Debian-formatted SD card.  I installed it with:
  • Later in step 2.6, when I tried to run the command "umount /mnt/rar/dev/pts", it wouldn't unmount, as it was "busy".  Nothing except a reboot could clear this up.

I also answered my own questions above as to how booting works:

  • You've left the default uboot "verified" bootloader in place.
  • Your package linux-image-exynos5 provides a kernel which will work with that bootloader
  • To get the bootloader to boot that kernel, the "update-chromebook-vboot" had to be run, which came from your package "chromebook-kernel-vboot"
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...

 

Karl L.,

 

Your work is much appreciated.   :woot:   I write this posting from my new Debian Jesse install on my Samsung ARM Chromebook.

 

A few things could be filled into your procedure:

  • Before doing step 2.3, you didn't mention how to get the Chromebook connected to one's wifi network.  Here's how I did that (well, I'm pretty sure these were the minimal steps that succeeded):
    • ifconfig mlan0 down
    • ifconfig mlan0 essid MySSIDsNameHere key s:MyWifiPasswordHere
    • ifconfig mlan0 up
    • (wait about 15 seconds for the wifi authentication to work)
    • dhclient mlan0
    • (wait a few seconds for a DHCP lease to be assigned)
    • ifconfig mlan0
    • (you should now see a valid DHCP-assigned IP address for "inet addr" on the second line)

 

 FWIW I also had to use wpa_supplicant here at some point.

 

Also, to OP: I'm getting a weird issue where I can't activate swap space, like at all. When I try to swapon the one we made during the partitioning via (using gparted to swapon) I get:

 

swapon: /dev/mmcblk0p1: found swap signature: version 1, page-size 4, same byte order

swapon: /dev/mmcblk0p1: pagesize = 4096

swapsize = 2251292672, devsize = 2251293184

swapon: /dev/mmcblk0p1: swapon failed: invalid argument

 

Thinking I may have set something up wrong in the partitioning I took a flash drive and formatted it as swap space, plugged it in, and got the same error except with different numbers in line three.

 

Any advice?

Link to comment
Share on other sites

  • 5 months later...

Hey Karl (or anybody else),

 

Could you please upload a image of the environment setup in the first post?

 

I've been spending so much time trying to get Mali drivers for OpenGL working in a Ubuntu/Debian environment for my ARM chromebook but everywhere is either out of date or has broken links.

 

Karl/xorangekiller is the only one who seems to have a good setup.

Link to comment
Share on other sites

Your a linux god lol

 

After reading your reply first and then the rest of the posts, I'm totally flabbergasted!

 

So much so that my eyes are all messed up like this emoticon! :s

 

I couldn't fathom all that stuff!!

 

Amazing job!!

Link to comment
Share on other sites

  • 3 years later...

Excellent work! I know it's been nearly four years since the last post, and the 2012 Samsung 3 Chromebook is nearly an antique by computing standards, but I would very much like to try to install Debian Stretch following your very detailed instructions. Sadly, after all this time, the Dropbox links appear to be in 404 country. Any chance you might update your instructions with fresh links and perhaps some info on installing Stretch instead of Jessie? It should be fairly sraight-forward, but I'm still using Linux training wheels with my little Raspberry Pi, so nothing comes quite as easy to me as it might. Thanks!  :@)

Link to comment
Share on other sites

Topic closed.

 

Karl has not been active on Neowin for many years now, and many of the replies were made by passersby who are also no longer active. Unfortunately I do not believe anyone will have a copy of the files to share with you.

Link to comment
Share on other sites

  • DrunknMunky locked this topic
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.