Hi,

On Thu Oct 24, 2024 at 9:08 PM CEST, Holger Wansing wrote:
> "Diederik de Haas" <didi.deb...@cknow.org> wrote (Sun, 20 Oct 2024 16:28:41 
> +0200):
> > The 'cs21' device is a (different) Rock64 (rk3328):
> > 
> > And now the partition stuff:
> > 
> > ```
> > root@cs21:~# parted -s /dev/mmcblk1 print
> > Model: MMC NCard (sd/mmc)
> > Disk /dev/mmcblk1: 61.9GB
> > Sector size (logical/physical): 512B/512B
> > Partition Table: gpt
> > Disk Flags:
> > 
> > Number  Start   End     Size    File system  Name     Flags
> >  1      32.8kB  16.8MB  16.7MB               primary
> >  2      16.8MB  256MB   239MB   fat16        primary  boot, esp
> >  3      256MB   61.9GB  61.6GB  ext4         primary
> > 
> > ```
> > 
> > And 'quartz64a' is a Pine64 Quartz64 Model A (rk3566):
> > 
> > ```
> > root@quartz64a:~# parted -s /dev/mmcblk1 print
> > Model: MMC A3A562 (sd/mmc)
> > Disk /dev/mmcblk1: 124GB
> > Sector size (logical/physical): 512B/512B
> > Partition Table: gpt
> > Disk Flags:
> > 
> > Number  Start   End     Size    File system  Name          Flags
> >  1      32.8kB  3670kB  3637kB               loader1_part
> >  2      8389kB  12.6MB  4194kB               loader2_part
> >  3      12.6MB  16.8MB  4194kB               trust_part
> >  4      16.8MB  134MB   117MB                efi_part
> >  5      134MB   124GB   124GB   ext4         root_part     legacy_boot
> > 
> > ```
> > 
> > And I just changed the 'legacy_boot' flag to 'boot' on the SDcard with
> > which I did my test, which then (apparently) also triggers the 'esp'
> > flag and it booted with that too.
> > So it looks like it just needs some indication (flag) of what the boot
> > device is, but it doesn't (seem to) matter which one.
>
> Hmm, I'm irritated now:
> here you have a device|installation, which has the legacy_boot flag
> installed, but it did not work|boot despite of this. And you changed that
> legacy_boot flag into a boot flag, and that made the problem go away?
> (so the device boots fine).

There are 3 devices under discussion:
1) `cs21`: Rock64 running Stable and apparently using EFI and it looks
   like I installed that with d-i, but then manually made sure the first
   16 MiB remained free
2) `quartz64a`: Quartz64 Model-A, running Testing/Sid and I manually
   created that system (no d-i), including all its partitions
3) `debian-di-rock64`: This is *another* Rock64 device (I have 4 in
   total) with which I performed the test with a very recent d-i.
   On this system everything seemed to go well, but it still didn't boot
   into it. So that's when I started to experiment with the
   'legacy_boot' flag as I was pretty sure that was the problem ... and
   it was. I then went comparing with system '1' and '2' and that's when
   I noticed 'legacy_boot' vs 'boot'/'esp'.
   But without some 'boot' flag set, the device would NOT boot.

> So, why should we then do some work to implement the setting of the
> legacy_boot flag on arm64?

I do not know what the details are between 'boot' and 'legacy_boot'.
So I can't tell if setting 'boot' would be sufficient (in all cases).

> And here, from another mail:
> "Diederik de Haas" <didi.deb...@cknow.org> wrote (Mon, 21 Oct 2024 10:26:28 
> +0200):
> > On Sun Oct 20, 2024 at 8:49 PM CEST, Pascal Hambourg wrote:
> > > > So it looks like it just needs some indication (flag) of what the boot
> > > > device is, but it doesn't (seem to) matter which one.
> > >
> > > Weird. Does it have to be on the boot/root partition or can it be on any 
> > > other partition ?
> > 
> > It appears to not matter if it's 'boot' or 'legacy_boot', but it (ofc?)
> > needs to be set on the partition with the kernel as that needs to be
> > started for the rest of the boot process.
> > My guess is that on the tested system it tried to do something with TFTP
> > as it couldn't find a kernel as the '[legacy_]boot' flag was not set,
> > thus couldn't find a kernel thus tried another option (tftp).
>
> Here you also imply, that both boot or legacy_boot flag do the job.

That's what my (semi) random tests seemed to show.
But as said above, I don't know for sure.

> So, can I understand this, as there is no need to set the legacy_boot flag,
> but just adjust the situations, where the 'boot' flag is being set?
>
> Or do we explicitely want to support both the legacy_boot and the boot flag,
> because we know that some systems are buggy and one needs the first
> and other need the latter flag?

I DON'T KNOW.
I did several tests on one Rock64 that I have and compared that with
some other devices that I have in the hope that it would be useful.

But apparently it only pissed you off.

Attachment: signature.asc
Description: PGP signature

Reply via email to