Re: how to setup multiboot with a shared /home?
On 19.06.2016 05:59, Jonathan Thornburg wrote: I'm trying to set up a disk so that it can multiboot either of two distinct amd64 OpenBSD installations (I'll call them A and B). Reading the Fine FAQ suggests that a relatively straightforward way to do this is to put the two OpenBSD installations inside distinct fdisk partitions, and use the fdisk 'flag' command to select which fdisk partition (and hence OpenBSD installation) is booted by default. For example, I could put OpenBSD installation A inside fdisk partition 0, and OpenBSD installation B inside fdisk partition 1. What is target/reason for 2 separate OpenBSD installations on fdisk level? Way easier setup (even for multiboot thx to boot>) will be either 2 physical disks each one for 1 of installations or one install on host and second one inside vmm or qemu guest. [Of course, to make this work I need to ensure that both root filesystems are close enough to the start of the physical disk that I don't run into BIOS disk addressing limits.] My questions concern an extension of this setup: I'd like the two installations to share a (large) common /home filesystem. Because of BIOS disk addressing limits, the large /home filesysgtem must be *after* both the A and the B root filesystems on the physical disk. This suggests a disk layout like this: OpenBSD A OSOpenBSD B OS partitions partitions shared /home partition |---||--| disk w x y z disk start end My question is, what sort of fdisk partition layout do I want here? Separate physical disk or NFS shared /home if you really want to use it as something "production" ready. One possibility is to use overlapping fdisk partitions: * fdisk partition 0 = sectors 64 to disk-end * fdisk partition 1 = sectors x to disk-end (or maybe x+64 to disk-end) Here the disklabel partitions inside fdisk partition 0 are set up to contain the OpenBSD A OS filesystems and the shared /home, and the disklabel partitions inside fdisk partition 1 are set up to contain the OpenBSD B OS filesystems and the shared /home. Another possibility is to use non-overlapping fdisk partitions, and disklabel offsets which extend outside their fdisk "owners", as per /usr/src/distrib/amd64/common/install.md: The offsets used in the disklabel are ABSOLUTE, i.e. relative to the start of the disk, NOT the start of the OpenBSD MBR partition. That is, * fdisk partition 0 = sectors 64 to w * fdisk partition 1 = sectors x to y (or maybe x+64 to y) * fdisk partition 2 = sectors z to disk-end (or maybe z+64 to disk-end) Here the disklabel partitions inside fdisk partition 0 are set up to contain the OpenBSD A OS filesystems and the shared /home, with the latter having disklabel offsets pointing to fdisk partition 2. Similarly, the disklabel partitions inside fdisk partition 1 are set up to contain the OpenBSD B OS filesystems and the shared /home, with the latter having disklabel offsets pointing to fdisk partition 2. Clearly, both of these layouts require very careful setup of the disk offsets -- if I miscalculate then all bets are off. But, assuming that I calculate correctly Question: are there reasons why one or the other of these layouts is preferable? Or is there some other layout which would be better? What is size of your disk? Is it worth of complicating setup so much? Question: are there any unobvious obstacles to making any/all of the OpenBSD A OS partitions, the OpenBSD B OS partitions, and/or the shared /home partition, softraid-crypto? We do not know what you want to achieve in fact by this setup so hard to tell. thanks,
how to setup multiboot with a shared /home?
I'm trying to set up a disk so that it can multiboot either of two distinct amd64 OpenBSD installations (I'll call them A and B). Reading the Fine FAQ suggests that a relatively straightforward way to do this is to put the two OpenBSD installations inside distinct fdisk partitions, and use the fdisk 'flag' command to select which fdisk partition (and hence OpenBSD installation) is booted by default. For example, I could put OpenBSD installation A inside fdisk partition 0, and OpenBSD installation B inside fdisk partition 1. [Of course, to make this work I need to ensure that both root filesystems are close enough to the start of the physical disk that I don't run into BIOS disk addressing limits.] My questions concern an extension of this setup: I'd like the two installations to share a (large) common /home filesystem. Because of BIOS disk addressing limits, the large /home filesysgtem must be *after* both the A and the B root filesystems on the physical disk. This suggests a disk layout like this: OpenBSD A OSOpenBSD B OS partitions partitions shared /home partition |---||--| disk w x y z disk startend My question is, what sort of fdisk partition layout do I want here? One possibility is to use overlapping fdisk partitions: * fdisk partition 0 = sectors 64 to disk-end * fdisk partition 1 = sectors x to disk-end (or maybe x+64 to disk-end) Here the disklabel partitions inside fdisk partition 0 are set up to contain the OpenBSD A OS filesystems and the shared /home, and the disklabel partitions inside fdisk partition 1 are set up to contain the OpenBSD B OS filesystems and the shared /home. Another possibility is to use non-overlapping fdisk partitions, and disklabel offsets which extend outside their fdisk "owners", as per /usr/src/distrib/amd64/common/install.md: > The offsets used in the disklabel are ABSOLUTE, i.e. relative to the > start of the disk, NOT the start of the OpenBSD MBR partition. That is, * fdisk partition 0 = sectors 64 to w * fdisk partition 1 = sectors x to y (or maybe x+64 to y) * fdisk partition 2 = sectors z to disk-end (or maybe z+64 to disk-end) Here the disklabel partitions inside fdisk partition 0 are set up to contain the OpenBSD A OS filesystems and the shared /home, with the latter having disklabel offsets pointing to fdisk partition 2. Similarly, the disklabel partitions inside fdisk partition 1 are set up to contain the OpenBSD B OS filesystems and the shared /home, with the latter having disklabel offsets pointing to fdisk partition 2. Clearly, both of these layouts require very careful setup of the disk offsets -- if I miscalculate then all bets are off. But, assuming that I calculate correctly Question: are there reasons why one or the other of these layouts is preferable? Or is there some other layout which would be better? Question: are there any unobvious obstacles to making any/all of the OpenBSD A OS partitions, the OpenBSD B OS partitions, and/or the shared /home partition, softraid-crypto? thanks, -- -- "Jonathan Thornburg [remove -animal to reply]"Dept of Astronomy & IUCSS, Indiana University, Bloomington, Indiana, USA "There was of course no way of knowing whether you were being watched at any given moment. How often, or on what system, the Thought Police plugged in on any individual wire was guesswork. It was even conceivable that they watched everybody all the time." -- George Orwell, "1984"