Boot0cfg bug redux (Re: sys/boot/boot0/boot0.S - r186598)
rizzo at iet.unipi.it
Tue Jan 11 00:58:07 UTC 2011
On Tue, Jan 11, 2011 at 03:38:23AM +0300, Andrey V. Elsukov wrote:
> On 11.01.2011 02:33, Luigi Rizzo wrote:
> > As a consequence, if we reboot without pressing an F-key, the system
> > boots from partition s1 even though the boot loader indicates F2.
> > So, to summarize, I guess that a possible fix (that does not involve
> > using gpart, or even worse, modifying boot0.S, which probably does
> > not have any spare space) is to modify boot0cfg so that it sets the
> > 'active' flag for the partition corresponding to the default entry.
> > What do people think ?
> I don't remember which behavior was before, but it seems that users
> want to change "active" attribute when they use "boot0cfg -s".
more than "what was before" the issue is whether the 0x80 flag
means ACTIVE (hence is should be set only for one partition)
or it means BOOTABLE (so it is ok to have it set for multiple
partitions, and bootloaders should ignore partitions with
the flag clear, no matter what the selection is).
boot0.S' behaviour is closer to ACTIVE than BOOTABLE.
Same for fdisk, and the change i was proposing is in line
with this interpretation.
> And i think it is not so hard to add several lines of code to pass
> "set" command to PART class.
i don't know how this would help, because i believe the code at the
origin of the bug is (or at least used to be) in boot2.c
More information about the freebsd-hackers