Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jan 2011 02:12:29 +0100
From:      Luigi Rizzo <rizzo@iet.unipi.it>
To:        "Andrey V. Elsukov" <bu7cher@yandex.ru>
Cc:        Tom Judge <tom@tomjudge.com>, freebsd-hackers@freebsd.org
Subject:   Re: Boot0cfg bug redux (Re: sys/boot/boot0/boot0.S - r186598)
Message-ID:  <20110111011229.GA10711@onelab2.iet.unipi.it>
In-Reply-To: <4D2BA67F.8050801@yandex.ru>
References:  <4D295820.20807@tomjudge.com> <20110110233330.GA9190@onelab2.iet.unipi.it> <4D2BA67F.8050801@yandex.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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.
> <skip>
> > 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

cheers
luigi



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110111011229.GA10711>