On 06/27/2011 08:32 AM, Anand Buddhdev wrote:
On 27 June 2011 04:46, Nick Holland<n...@holland-consulting.net>  wrote:

Hello Nick,

I then did a second installation, and setup OpenBSD 4.9 on wd0d, also with
a
single / partition.

bad.


Why is this bad? What's wrong with having 2 OpenBSD installations on a
single disk?

it isn't supported.

The developers make (and document) certain assumptions about how a system is to be used. You violated those assumptions. That simple.

it's an unsupported configuration -- OpenBSD boots from the 'a'
partition.  Anything else...you are pretty much on your own, and your
results will probably not be portable across platforms.  Things may break.
...

My scenario is that I have a small Soekris board running an older OpenBSD
(installed on a CF card).

I'd like to upgrade to a newer OpenBSD without overwriting the current setup
(to use as a fallback in case something is wrong with the new install). This
is why I did the second installation in wd0d. If I manually boot 4.9 from
wd0d, everything just works. Why do you say that this is an unsupported
configuration? I know that the convention is to use 'a' for / and the other
partitions for other things, but it can't be a crime to use a 'd' partition
as the root for another OpenBSD installation.

I say it is unsupported because it is. I get to hang around with the developers (a very special privilege, I must tell you). I get yelled at if I suggest something that isn't fully supported.

It's not a legal crime to do things wrong with OpenBSD (hey, OpenBSD defends your right to do anything you want with it far more than most other OSs), but it isn't just a "convention" -- it's how you do things properly. If you do things improperly and things don't work as you imagine, you are 100% on your own, and we will assume things WILL BREAK.


Ok, so your goal is rollback from a failed upgrade. There are better ways of doing this, a few of them:
1) Alternate flash cards.
2) image the existing disk to another machine (flash cards are relatively small, relatively fast to do this), revert the image if needed. 3) don't sweat it -- practice on a different machine, and just do your upgrade. Soekris are popular machines in the OpenBSD world, and the upgrade process works well. Likelihood of a problem when just using it as intended is very low.

All these are supported processes.

Now, you have to look at the risks of having the system fail BECAUSE you are doing unsupported things with it. I've played with multibooting OpenBSD systems. Can be done, but FAR more likely to blow out your system trying to "protect" it from upgrade failures than an upgrade failure itself is to occur.

I.e., by trying to avoid one unlikely problem, you are much more likely to create downtime by creating new problems that never should have existed. Some people call that "job security", I call that bad system administration.

Simple systems have simple problems. Complex systems blow their guts all over the place and take hours or days to repair.

...
Actually, I know of a way to make this work, which involves moving the new
'd' partition into the place of 'a', and moving the old 'a' partition into
the place of 'd'. This works, and allows for auto booting into the new
installation while still preserving the old one for fallback.

You just think you know how this is working.
Read faq14, 'specially the section on how i386/amd64 boots, pay special attention to the PBR. You are using PARTS of one system, parts of another. Maybe that's good enough...sometimes.

However, it involves the ugly step of moving partitions around inside the
disklabel. Surely the ability to boot off another partition would be
elegant, no?

Maybe (not likely), but the developers have spent their time on more real issues, like making sure upgrades go smoothly and the system can boot properly and Just Work on many different kinds of machines, rather than trying to support bad solutions to non-problems.

What you propose has complexities you don't seem to appreciate. Making it all work properly and perfectly on all the buggy BIOSs of the PC world is non-trivial...and when you get done with it, "so what?".


If you really want to have multiple versions of OpenBSD on one physical
i386/amd64 machine, use some kind of boot manager program which "hides"
inactive partitions.  You can do this manually using bsd.rd and fdisk,
changing the desired partition to type 'a6' and flagged active, and the
unwanted partition as some other type and NOT flagged active.  However,
I've tried this, I know exactly what needs to be done, and I've made a
lot of mistakes trying to do what I know needed to be done.  Mistakes
result in unbootable disks to corrupt file systems (big lesson: boot
from bsd.rd, don't try to use fdisk to change the ID of a running
system.  That's the corrupted FS).


Ok, so just to be clear: you're suggesting that I create *two* OpenBSD
slices on a disk using fdisk, and then hide the one I don't want to boot
from?

no, I'm not suggesting that, but it has better odds of working the way you expect than changing the disklabel. Change the disklabel, you end up using the same PBR and /boot being used, unless you update them, in which case you can't revert easily. Two complete fdisk partitions gives you what you think you want -- two complete and revertible systems, only "shared" code is the MBR (which is rarely updated).

Of course, a lot of boot managers probably won't work with the Soekris's serial console.

Nick.

Reply via email to