fosslinux / live-bootstrap

Use of a Linux initramfs to fully automate the bootstrapping process
416 stars 31 forks source link

Call for (bare metal) testing! #477

Open fosslinux opened 1 month ago

fosslinux commented 1 month ago

Testing would be appreciated for the 1.0 branch - of all kinds is great, but particularly;

Please post a report below for any bare metal tests at all, any interesting other tests, or tests that fail.

An associated bug report for failures would be appreciated, as long as you can tell where it failed and what the error was.

A good report format follows:

Kind of bootstrap: (chroot/bwrap/qemu/bare metal) Success or Failure: ... Machine/OS Information: (for bare metal, hardware information, including laptop model or motherboard model, CPU, amount of RAM, boot device; for others, Linux distribution, etc) Failure information: (if relevant) Additional Information:

eduardosm commented 1 month ago

I have been able to successfully run the build on chroot, bwrap and qemu modes.

Done on Fedora 40.

However, I have not been able to complete the build on bare metal. I used kernel bootstrapping with --external-sources.

The laptop I used is a PackardBell Easynote ML65, which is quite old (~16 years).

The builds goes through the builder-hex0 and Fiwix stages, but it freezes while booting the Linux kernel.

Here is a recording of the moment it freezes.

linux-boot.webm

mid-kid commented 2 weeks ago

Can we get some better instructions on how to do this? In particular, I'd like to know:

fosslinux commented 2 weeks ago

Sure!

What are the system requirements for the full bootstrap?

In case my system isn't fully supported, can I bootstrap using a prebuilt linux kernel?

Yes, but we would love to know about any cases where the full kernel bootstrap doesn't work!

The way to do this is by using the (I have only just noticed, poorly named) -qk argument to rootfs.py, which will instruct rootfs.py to NOT use the kernel bootstrap and rather generate an initramfs.

Regarding the kernel, I haven't tried to figure out a minimal Linux kernel requirement recently - been focusing more on the full kernel bootstrap. I know the requirements are fairly minimal though, so I'd recommend just giving it a go with a kernel you have around. An important point: you should build in any modules that are needed! Modules are not supported for the bootstrap kernel.

What bootstrap.py commands would I use for any of this? I'm a bit confused wrt those, as I haven't managed to use a linux kernel for bootstrapping, but I find the "full" bootstrap equally confusing.

At a minimum, you want the -b option (bare metal), so at minimum, you'd need ./rootfs.py -b. This will then give you a path to a disk image after a little bit, that you can write to some mass storage device and attempt to boot off.

Thank you for pointing out some deficiencies in documentation :)

Googulator commented 2 weeks ago

3GB RAM is sufficient, if you use swap (-qs 4G option), or limit parallelism to 1 core (-c 1 option).