fosslinux / live-bootstrap

Use of a Linux initramfs to fully automate the bootstrapping process
490 stars 34 forks source link

Boot Fiwix and Linux without serial console on bare metal #305

Closed pder closed 1 year ago

pder commented 1 year ago

That seems to only change Fiwix kernel options. Or does it also propagate to Linux?

kexec_cmdline are the parameters passed to Linux.

kexec_cmdline=\"init=/init console=ttyS0\"

pder commented 1 year ago

Similar change to go_sysb would be good (so that console=ttyS0 is not used for sysc).

OK, so would this be for the case we are using the bare-metal option and providing a kernel?

stikonas commented 1 year ago

No, just the different transition. You updated builder-hex0 to fiwix but there is Fiwix to Linux here: https://github.com/fosslinux/live-bootstrap/blob/master/sysa/run2.sh#L38

pder commented 1 year ago

No, just the different transition. You updated builder-hex0 to fiwix but there is Fiwix to Linux here: https://github.com/fosslinux/live-bootstrap/blob/master/sysa/run2.sh#L38

The Fiwix to Linux transition happens here: https://github.com/fosslinux/live-bootstrap/blob/master/sysa/run2.sh#L29

rickmasters created kexec-linux that is what sets up Linux for kexecing from Fiwix

stikonas commented 1 year ago

No, just the different transition. You updated builder-hex0 to fiwix but there is Fiwix to Linux here: https://github.com/fosslinux/live-bootstrap/blob/master/sysa/run2.sh#L38

The Fiwix to Linux transition happens here: https://github.com/fosslinux/live-bootstrap/blob/master/sysa/run2.sh#L29

rickmasters created kexec-linux that is what sets up Linux for kexecing from Fiwix

Oh indeed, we have a different path for bootstrapping. That other kexec only happens if we start with another linux kernel.

fosslinux commented 1 year ago

Huh, but where is the cmdline for sysc in kernel bootstrap mode? Does it exist?

stikonas commented 1 year ago

Huh, but where is the cmdline for sysc in kernel bootstrap mode? Does it exist?

Yes, see irc logs on #bootsrappable. On Fiwix future kexec cmdline has to be set in advance inside Fiwix cmdline (kexec_cmdline parameter)

stikonas commented 1 year ago

https://github.com/mikaku/Fiwix/issues/29 documents this a bit.

pder commented 1 year ago

I updated go_sysb to adjust kexec parameters based on if bare metal option is chosen.

I verified that ./rootfs.py -q -qk mykernel still works.

I am not sure how to test this set of options: ./rootfs.py -b -qk mykernel -p

The instructions provided are: Please:

  1. Take tmp/sysa/initramfs and your kernel, boot using this.
  2. Take tmp/sysc/disk.img and put this on a writable storage medium.

Any ideas on how to test this?

fosslinux commented 1 year ago

You would use GRUB or something similar and then linux path/to/kernel and initrd path/to/initramfs.

stikonas commented 1 year ago

Hmm, it's probably fine to just test this in qemu... We never really tested GRUB before anyway. Though if you can, that would be an interesting test.

fosslinux commented 1 year ago

I have once before, but it's been a fair while since I've tested it..