1

I have an Acer Chromebook 314. I've used this tutorial for my goal.

For my boot stick I used this Ubuntu version (I've used the ...aarch-jammy-img.gz)

I flashed my stick with BalenaEtcher. Everything works fine, but I want to boot from the internal drive and not from the Thumb Drive.

I've seen an installation mode that you can select while booting, but I can't. I can select my Boot stick with Ctrl+U Then there is a sequence in a Terminal like interface, and then I have to enter my password. In the official tutorial there are like installation steps, but I don't have that.

What do I do now? I only have one USB port and no SD or MicroSD port. I have tried using an ARM server variant for my Chromebook, but it didn't Boot with Ctrl+U.

I have almost no disk space left, but I think this is because my OS is on my thumb drive, and it doesn't really access my internal memory, although I can find it as 54GB Volume in my File manager.

So, in summary, I have to manually Take the OS from the thumb drive to my internal Drive but don't know how also I would like to remove Chrome OS but at this point I don't really care anymore.

nash
  • 13
  • 3

1 Answers1

1

First read this for overall details to get prepared to install Ubuntu on Chromebook internal storage.

The following is copy-pasted from the instructions posted in this GitHub repo. I have verified that this method works.

For more details, see this.

Note that this will automatically get rid of ChromeOS. To reinstall ChromeOS, you need to load ChromeOS recovery image on a USB and boot from it.


Note. Before proceeding with installation it is recommended to first set gbb flags

Remember, these steps have to be done from linux booted from usb, not chromeos

Time to just do it

  1. gaining root access

    sudo -i
    

    Note. Password is same as for your user account

  2. start by listing all available disks

    lsblk
    

    the output should look like this

    NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
    mtdblock0     31:0    0     8M  0 disk 
    sda          179:0    0 116,5G  0 disk <- this is the booted drive
    ├─sda1       179:1    0    64M  0 part <- this is a partition
    ├─sda2       179:2    0    64M  0 part 
    ├─sda3       179:3    0   512M  0 part /boot
    ├─sda4       179:4    0 107,9G  0 part / <- it has current root partition
    └─sda5       179:5    0     8G  0 part 
    mmcblk1      179:0    0 116,5G  0 disk <- this is an internal disk
    ├─mmcblk1p1  179:1    0    64M  0 part <- this is a partition
    ├─mmcblk1p2  179:2    0    64M  0 part 
    ├─mmcblk1p3  179:3    0   512M  0 part
    ├─mmcblk1p4  179:4    0 107,9G  0 part
    └─mmcblk1p5  179:5    0     8G  0 part 
    mmcblk1boot0 179:32   0     4M  1 disk 
    mmcblk1boot1 179:64   0     4M  1 disk
    

    Tip. The chromebook partition will be the one without partition with "/"

    emmc disks can usually easily identified by the fact that there are also the following two (not to be used) devices for them as well: mmcblkxboot0, mmcblkxboot1

    Note. the internal memory is often (but not always) mmcblk1 or mmcblk0 but don't be thrown off if it's something else

  3. Export the target disk

    if you want to install onto mmcblk0 or mmcblk1 (number is different on different chromebooks)

    export disk=mmcblk0
    export part=mmcblk0p
    

    or

    export disk=mmcblk1
    export part=mmcblk1p
    

    respectively

    if you want to install on sda or similar

    export disk=sda
    export part=sda
    
  4. Export the source disk

    if the booted device is mmcblk0 or mmcblk1 (number is different on different chromebooks)

    export srcPart=mmcblk0p
    

    or

    export srcPart=mmcblk1p
    

    respectively

    if the booted device is sda or similar

    export srcPart=sda
    
  5. Wipe the partition table on the target disk

    sgdisk -Z /dev/$disk
    partprobe /dev/$disk
    sgdisk -C -e -G /dev/$disk
    partprobe /dev/$disk
    
  6. Create a new partition table

    cgpt create /dev/$disk
    
  7. Create the two kernel partitions

    cgpt add -i 1 -t kernel -b 8192 -s 65536 -l KernelA -S 1 -T 2 -P 10 /dev/$disk
    cgpt add -i 2 -t kernel -b 73728 -s 65536 -l KernelB -S 0 -T 2 -P 5 /dev/$disk
    

    For veyron ONLY the following four lines should be used instead of the two above

    cgpt add -i 1 -t kernel -b 73728 -s 32768 -l KernelA -S 1 -T 2 -P 10 /dev/$disk
    cgpt repair /dev/$disk
    cgpt add -i 2 -t kernel -b 106496 -s 32768 -l KernelB -S 0 -T 2 -P 5 /dev/$disk
    cgpt repair /dev/$disk
    
  8. Create remaining partitions

    wget https://raw.githubusercontent.com/hexdump0815/imagebuilder/main/systems/chromebook_veyron/gpt-partitions.txt
    

    Note. But in theory, all arm chromebooks should use the same setup here.

    fdisk /dev/$disk < gpt-partitions.txt
    
  9. Create the boot and root filesystems and mount them

    mkfs -t ext4 -O ^has_journal -m 0 -L bootemmc /dev/${part}3
    mkfs -t btrfs -m single -L rootemmc /dev/${part}4
    mount -o ssd,compress-force=zstd,noatime,nodiratime /dev/${part}4 /mnt
    mkdir -p /mnt/boot
    mount /dev/${part}3 /mnt/boot
    

    _Note: If deploying for the 3.10 kernel for the early Chromebook Snow releases, you must add -O ^extref,^skinny-metadata,^no-holes,^zoned -R ^free-space-tree to mkfs to disable features not supported by Linux 3.10. You also must omit compress-force=zstd when mounting.

  10. copy the kernel partition to the target emmc

    dd if=/dev/${srcPart}1 of=/dev/${part}1 bs=1024k status=progress
    

    Note. The second kernel partition is by default unused initially.

  11. sync over the boot and root filesystems

    rsync -axADHSX --no-inc-recursive --delete /boot/ /mnt/boot
    rsync -axADHSX --no-inc-recursive --delete --exclude='/swap/*' / /mnt
    
  12. create a new 2gb swapfile (optional)

    rm -rf /mnt/swap
    btrfs subvolume create /mnt/swap
    chmod 755 /mnt/swap
    chattr -R +C /mnt/swap
    btrfs property set /mnt/swap compression none
    cd /mnt/swap
    truncate -s 0 ./file.0; btrfs property set ./file.0 compression none; fallocate -l 2G file.0; chmod 600 ./file.0; mkswap -L file.0 ./file.0
    

    Note. You can also create a swap partition.

  13. Adjust the filesystem labels in the new etc/fstab

    sed -i 's,bootpart,bootemmc,g;s,rootpart,rootemmc,g' /mnt/etc/fstab
    
  14. Do the same in the u-boot config file if it exists (on 32bit arm chromebooks only)

    sed -i 's,rootpart,rootemmc,g' /mnt/boot/extlinux/extlinux.conf
    
  15. umount everything

    umount /mnt/boot /mnt
    

    Now after a shutdown the SD card/USB can be taken out/disconnected and the system should boot into Linux from emmc on the next boot.

What now?

Now after the system is installed onto memory you might want to tweak it a little bit