Subject: port-i386/6823: Bootloader design ugly
To: None <gnats-bugs@gnats.netbsd.org>
From: Martin J. Laubach <mjl@emsi.priv.at>
List: netbsd-bugs
Date: 01/16/1999 14:41:51
>Number: 6823
>Category: port-i386
>Synopsis: Bootloader relies on coded in block numbers
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-i386-maintainer (NetBSD/i386 Portmaster)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jan 16 05:50:01 1999
>Last-Modified:
>Originator: Martin J. Laubach
>Organization:
>Release: 1.3.3
>Environment:
System: NetBSD asparagus 1.3.3 NetBSD 1.3.3 (ASPARAGUS) #5: Thu Jan 14 05:28:42 CET 1999 mjl@asparagus:/home/temp/devel/kernel/sys/arch/i386/compile/ASPARAGUS i386
>Description:
The new, improved 1.3 boot loader design is rather ugly. As I found
out the hard way, the second stage boot loader is contained in the
file /boot. That in itself would not be a problem, but the fact, that
installboot writes the block numbers somewhere in the first stage is.
This is certainly not the Right Thing, at most a temporary kludge.
In fact, this is almost as bad as LILO (does the same thing with the
linux kernel).
It also loses badly when restoring a backup over your root partition,
since the second stage boot file will be reallocated and overwritten.
Having to do an installboot after a restore is not really evident.
>How-To-Repeat:
>Fix:
Incorporate some part of the pre 1.3 bootloader that understood
a subset of ufs, and use that to find the correct block numbers
instead of relying on hard coded addresses.
>Audit-Trail:
>Unformatted: