Skip to content

Commit 43a3e81

Browse files
committed
improve docs and release 1.0.0
1 parent d973bc1 commit 43a3e81

3 files changed

Lines changed: 33 additions & 5 deletions

File tree

README.md

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Chrome OS RMA shims are bootable disk images which are designed to run a variety
77

88
Simply replacing the shim's rootfs doesn't work, as it boots in an environment friendly to the RMA shim, not regular Linux distros. To get around this, a separate bootloader is required to transition from the shim environment to the main rootfs. This bootloader then does `pivot_root` to enter the rootfs, where it then starts the init system.
99

10-
Another problem is encountered at this stage: the Chrome OS kernel will complain about systemd's mounts, and the boot process will hang. A simple workaround is to [apply a patch](https://github.com/ading2210/chromeos-systemd) to systemd, and then it can be recompiled and hosted at a [repo somewhere](https://shimboot.ading.dev/debian/).
10+
Another problem is encountered at this stage: the Chrome OS kernel will complain about systemd's mounts, and the boot process will hang. A simple workaround is to [apply a patch](https://github.com/ading2210/chromeos-systemd) to systemd, and then it can be recompiled and hosted at a [repo somewhere](https://github.com/ading2210/shimboot-repo).
1111

1212
After copying all the firmware from the recovery image and shim to the rootfs, we're able to boot to a mostly working XFCE desktop.
1313

@@ -101,17 +101,43 @@ Alternatively, you can run each of the steps manually:
101101
#### I want to use a different Linux distribution. How can I do that?
102102
Using any Linux distro is possible, provided that you apply the [proper patches](https://github.com/ading2210/chromeos-systemd) to systemd and recompile it. Most distros have some sort of bootstrapping tool that allows you to install it to a directory on your host PC. Then, you can just pass that rootfs dir into `build.sh`.
103103

104+
Debian Sid (the unstable rolling release version of Debian) is also supported if you just want newer packages, and you can install it by passing an argument to `build_rootfs.sh`:
105+
```bash
106+
sudo ./build_rootfs.sh data/rootfs unstable
107+
```
104108
#### How can I install a desktop environment other than XFCE?
105-
You can pass another argument to the `build_rootfs.sh` script, like this: `sudo ./build_rootfs.sh data/rootfs bookworm custom_packages=task-lxde-desktop`. The `custom_packages` argument is a list of packages that will be installed in the place of XFCE.
109+
You can pass another argument to the `build_rootfs.sh` script, like this: `sudo ./build_rootfs.sh data/rootfs bookworm custom_packages=task-lxde-desktop`. The `custom_packages` argument is a list of packages (separated by spaces) that will be installed in the place of XFCE.
106110

107111
#### Will this prevent me from using Chrome OS normally?
108112
Shimboot does not touch the internal storage at all, so you will be able to use Chrome OS as if nothing happened. However, if you are on an enterprise enrolled device, booting Chrome OS again will force a powerwash due to the attempted switch into developer mode.
109113

110114
#### Can I unplug the USB drive while using Debian?
111-
By default, this is not possible. However, you can simply copy your Debian rootfs onto your internal storage by first using `fdisk` to repartition it, using `dd` to copy the partition, and `resize2fs` to have it take up the entire drive. In the future, loading the OS to RAM may be supported, but this isn't a priority at the moment.
115+
By default, this is not possible. However, you can simply copy your Debian rootfs onto your internal storage by first using `fdisk` to repartition it, using `dd` to copy the partition, and `resize2fs` to have it take up the entire drive. In the future, loading the OS to RAM may be supported, but this isn't a priority at the moment. You can also just blindly copy the contents of your Shimboot USB to the internal storage without bothering to repartition:
116+
```bash
117+
#assuming the usb drive is on sda and internal storage is on mmcblk1
118+
sudo dd if=/dev/sda of=/dev/mmcblk1 bs=1M oflag=direct status=progress
119+
sudo growpart /dev/mmcblk1 4
120+
sudo resize2fs /dev/mmcblk1p4
121+
```
112122

113123
#### GPU acceleration isn't working, how can I fix this?
114-
If your kernel version is too old, the standard Mesa drivers will fail to load. Instead, you must download and install the `mesa-amber` drivers. Download this zip file (https://shimboot.ading.dev/mesa-amber.zip), extract it, and install all of the `.deb` files.
124+
If your kernel version is too old, the standard Mesa drivers will fail to load. Instead, you must download and install the `mesa-amber` drivers. Run the following commands:
125+
```
126+
sudo apt install libglx-amber0 libegl-amber0
127+
echo "MESA_LOADER_DRIVER_OVERRIDE=i965" >> /etc/environment
128+
```
129+
You may need to change `i965` to `i915` (or `r100`/`r200` for AMD hardware), depending on what GPU you have.
130+
131+
#### Can the rootfs be compressed to save space?
132+
Compressing the Debian rootfs with a squashfs is supported, and you can do this by running the regular Debian rootfs through `./build_squashfs.sh`. For example:
133+
```bash
134+
sudo ./build_rootfs.sh data/rootfs bookworm
135+
sudo ./build_squashfs.sh data/rootfs_compressed data/rootfs path_to_shim
136+
sudo ./build.sh image.bin path_to_shim data/rootfs_compressed
137+
```
138+
Any writes to the squashfs will persist, but they will not be compressed when saved. For the compression to be the most effective, consider pre-installing most of the software you use with `custom_packages=` before building the squashfs.
139+
140+
On the regular XFCE4 image, this brings the rootfs size down to 1.2GB from 3.5GB.
115141

116142
## Copyright:
117143
Shimboot is licensed under the [GNU GPL v3](https://www.gnu.org/licenses/gpl-3.0.txt). Unless otherwise indicated, all code has been written by me, [ading2210](https://github.com/ading2210).

bootloader/bin/bootstrap.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ move_mounts() {
8080

8181
print_license() {
8282
cat << EOF
83+
Shimboot v1.0.0
84+
8385
ading2210/shimboot: Boot desktop Linux from a Chrome OS RMA shim.
8486
Copyright (C) 2023 ading2210
8587

build_complete.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ trap sigint_handler SIGINT
3535

3636
base_dir="$(realpath -m $(dirname "$0"))"
3737
board="$1"
38-
shim_url="https://dl.osu.bio/api/raw/?path=/SH1mmer/$board.zip"
38+
shim_url="https://dl.darkn.bio/api/raw/?path=/SH1mmer/$board.zip"
3939
boards_url="https://chromiumdash.appspot.com/cros/fetch_serving_builds?deviceCategory=ChromeOS"
4040

4141
echo "downloading list of recovery images"

0 commit comments

Comments
 (0)