[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian Installer support for Chromebooks



Hi!

Alper Nebi Yasak <alpernebiyasak@gmail.com> (2022-12-03):
> I've been trying to make Debian easier to install and use on Chromebooks
> by adding integration to support their stock firmware/bootloader. The
> major part of that work is 'depthcharge-tools' which manages
> bootloader-specific stuff and kernel/initramfs upgrade hooks, recently
> sponsored and now in the archive.

That's great! I've only discovered this recently and haven't managed to
catch up with your talk just yet. I'm hoping to be spending more time on
Debian work in the next few weeks/months, don't hesitate to ping me if you
need help/input.

> Another part of this is making d-i install a bootable system, where we
> need to create a custom partition and then write a special image to it.
> For these I have two udeb packages: 'partman-cros' [1] that does partman
> integration and 'depthcharge-tools-installer' [2] which installs and
> runs depthcharge-tools in-target.
> 
> I'd like these two udebs to be sponsored. I know I'm quite late with
> these, but hoping it's not too late for bookworm installer changes. They
> are somewhat small, `cat **/* | wc -l` gives around 400-600 lines each.
> I tested them on the two Chromebooks I have (one arm64, one x86).

I don't think that's going to be an issue timing-wise. To be fair, if they
aren't perfect yet by the time the release happens, we could always fix
stuff in unstable and backport a few things to stable.

The only thing I'll probably want to make extra sure of is that
introducing those packages doesn't have any nasty side effects for other
machines.

> Here are the salsa links for the packages (I'd welcome moving them to
> the installer-team namespace), they are on mentors.debian.net as well if
> anyone prefers a dsc + tarball:
> 
> [1] https://salsa.debian.org/alpernebbi/partman-cros
> [2] https://salsa.debian.org/alpernebbi/depthcharge-tools-installer

I'm happy to have those moved under installer-team/ whenever is most
convenient for you and your potential sponsor.

I can't promise to do the reviewing/uploading right away (I'd like to tie
up some loose ends first), but hopefully I can try and have a look once
I'm done with updating crowdsec and its huge bunch of new dependencies. :)

Feel free to hit me up next week-end if you haven't seen anything move.

> They can be tested on non-ChromeOS devices as well (a VM or actual UEFI
> hardware), by roughly doing:
> 
> - Build both my packages above and save the two resulting udeb files
> - Clone https://salsa.debian.org/installer-team/debian-installer
> - Place the newly built udebs in build/localudebs
> - Create a build/pkg-lists/local file with contents:
>     partman-cros
>     depthcharge-tools-installer
>     live-installer -
> - (without indents, and the '-' on the last line is intentional)
> - Build that as a Debian package (or see its README for build details)
>   - Check the resulting debian-installer-images tar.gz file for images
>   - Extract netboot/gtk/mini.iso
> - Boot a QEMU VM with it as cdrom, and a disk image to install to
> - Prepend "cros_secure" to the kernel cmdline in the GRUB menu
> - Follow the installer prompts (ideally everything should be obvious)
>   - There's a warning if you don't create ChromeOS Kernel partitions
>   - Create one big enough (512MB is great) or get error at the very end
> - (The GRUB installation step will be skipped, manually run it
> afterwards if you want to UEFI boot into the resulting system)
> 
> That should go through the most likely case. There's custom logic to ask
> to make initramfs smaller if it doesn't fit the board's size limit, but
> never triggered on x86 due to arch differences. If you do an arm64 build
> you can test that by adding "depthcharge-tools-installer/board=kevin" to
> the kernel cmdline.
> 
> It's harder to test on chromebooks the native way. On the boards I have,
> the d-i netboot builds either doesn't fit the board's size limit (arm64)
> or doesn't show any graphics (x86). But using a secondary bootloader and
> adding the 'cros_secure' via GRUB works well to bootstrap their native
> boot flow. (I can try to provide instructions if anyone wants, but this
> email's already rather long.)

All of this is very interesting, I'm not sure where it would be best to
keep all relevant documentation. Maybe some dedicated wiki page?

> There are some more details and screenshots of the whole thing at my
> DebConf22 talk [3], though I've changed some things a bit since then.
> AFAICT the next steps after this are modifying the debian-installer repo
> to build custom images bootable this way and
> kernel/initramfs/modules-udebs changes for more boards as needed...
> 
> [3] Solving "How Can I Run Debian on My Chromebook?" For Good
> https://debconf22.debconf.org/talks/87-solving-how-can-i-run-debian-on-my-chromebook-for-good/

I'll definitely catch up with it at some point!


Cheers,
-- 
Cyril Brulebois (kibi@debian.org)            <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant

Attachment: signature.asc
Description: PGP signature


Reply to: