Subject: Re: installboot problem
To: Ben Tober <firstname.lastname@example.org>
From: Chris G Demetriou <Chris_G_Demetriou@auchentoshan.pdl.cs.cmu.edu>
Date: 01/13/1997 18:12:26
> I find that even in single-user mode, at security level 0, installboot complains
> about "read-only filesystem" when writing the disklabel. This is when
> I invoke it as follows -
> /usr/mdec/installboot /boot /usr/mdec/bootxx /dev/rsd1a
> (note that this is on a system which has root mounted from sd1a)
> which seems to me ought to be the correct way to invoke it. As I said, this
> is with the machine in single-user mode and / mounted read/write. The
> installboot binary being used is that from the 11/27 snap.
Right. this is a simple, but serious, problem with all
installboot-like programs (i.e. the one used on the alpha, and the
ones used on other ports).
The problem is that 'installboot' needs read-write access to the
partition containing a mounted file system. That's a no-no.
The way to get around it (grab a trash can; you're going to vomit) is
to use the disk's c partition, i.e. '/dev/rsd1c' for the example given
above. That happens to work since the disk handling code doesn't
disallow read/write accesses to partitions overlapping mounted file
systems (at least in this case) and because both 'a' and 'c' start at
the same place on the disk.
If you had your 'a' partition start somewhere else on the disk, this
might not work, but then i'm not so sure that that NetBSD/alpha boot
block would work, either. 8-)