On 6/15/26 21:39, dan wrote:
As I think that b comes reserved, I would play around g eventually.
Starting by an other system is undubtly more easy and without using g you can
fix the broken system by paxing a by pax -w, fixing the disklabel, then newfs
a, and paxing back by pax -r -pe to a.
If you have only that system, more or less (at your own risk only after dbl
checked the suggested list):
1. I would pax -w all the content of a to /home/mya.pax;
2. I would umount /usr/X11R6
3. I would copy content of g to /usr/X11R6/;
4. I would free g;
5. I would pax -r -pe content of mya.pax into g;
6. I would edit /etc/fstab: mounting g to /, commenting the mount of a;
7. I would restart the system;
8. I would fix the label of a and free a;
9. I would pax -r -pe content of /home/mya.pax into a;
10. I would edit /etc/fstab: uncommenting the mount of a to /, commenting the
mount of g;
11. I would restart the system;
12. I would free g;
13. I would move content of f/X11R6 back to g.
There is one little problem with this approach: OpenBSD hardcodes 'a' partition
as /, so it is not possible to use 'g' instead of it.
But thank you, and Nick and LLoyd, for the ideas.
I did the following:
1. Made a backup of / filesystem (used dump/restore instead of pax).
Stored it in /home.
2. Wrote down the layout of disklabel (which OpenBSD partition started
at which sector).
3. Rebooted the system from installation CD and entered the shell.
4. Used fdisk to make a proper/modern MBR partition spanning the whole disk,
which this time started on sector 64, in contrast with the old one which
started outright at sector 0.
5. Used disklabel program to recreate the OpenBSD partitions, with / ('a')
being 64 sector shorter, and all other ocupying exactly the same
space as before.
6. Formated 'a' partition and restored its contents from the backup.
7. Initialized MBR with fdisk -i, and installed boot blocks with
installboot -v -r /mnt sd0. It is crucial to mount / partition somewhere
and pass it as -r argument to installboot... which was not immediately
obvious to me... So I spent some time reading man pages until it became
clear. :) One more thing: as disklabel was re-created, its DUID changed,
so I had to edit /etc/fstab in order to be able to boot the system.
No data on partitions other then 'a' (some 120 MB) had to be moved.
The system is working fine, and it was upgraded to 7.8 and 7.9
normally.
Ž.