Saturday, April 30, 2022

Re: creating new partition has corrupted the disklabel ("bad super block")

On 4/30/22 5:16 AM, Sylvain Saboua wrote:
> Hello
>
> I have recently got an upgrade for my laptop with a 1TB SSD drive.
> I successfully managed to install a dual boot between archlinux and
> openbsd, both on encrypted partitions.
>
> Everything was fine with both systems, until the final act of the
> dual boot which consists in setting a partition for file sharing> between the two operating systems, using encfs on ext2.

So...you want to share an encrypted partition between two unrelated
operating systems.

Pretty sure that's not going to work. And since you haven't provided
any details of what you did, I'm guessing you don't have a plan to
get around the problems. Linux and OpenBSD use very different
encryption mechanisms.

> Creating this partition in archlinux works fine, but has seemingly
> corrupted the disklabel for openbsd : openbsd boots fine until the
> disk-checking step comes, whereupon I am informed that the j and k
> partitions on the sd1 disklabel are somewhat corrupted:>
> /dev/sd1k (/home): BAD SUPER BLOCK: MAGIC NUMBER WRONG
> /dev/sd1j (/usr/obj): BAD SUPER BLOCK: VALUES IN SUPER BLOCK DISAGREE
> WITH THOSE IN LAST ALTERNATE
>
> UNEXPECTED INCONSISTENCY; RUN fsck_ffs MANUALLY
>
> Automatic file system check failed: help!
> Enter pathname of shell or RETURN for sh:

This absolutely does not imply a corrupted disklabel. This is a
corrupted partition. Or an encrypted partition that OpenBSD doesn't
know how to decrypt.

> (this is an approximate copy of the error messages, I cannot properly
> access the system to copy the logs or a full disklabel/fdisk)
>
> How could I solve this ? For now trying a few things with fsck or newfs
> didn't work but perhaps I looked in the wrong direction.
>
> Also, this is on an install before the last openbsd 7.0 release.

not sure what that means, but OpenBSD is up to 7.1 now.

> I don't know how I can upgrade an encrypted install using the usb
> medium, but perhaps if I would this would be a way to solve my problem?

again, not sure what you are asking, but pretty sure the answer is "no".

Encrypted disk OpenBSD systems upgrade very much like unencrypted disk
systems, except you have to type your passphrase a few times (and maybe
say, "Boot THIS OS" a few times for a multiboot system). An upgrade
may improve hardware support and add new features, but is unlikely to
fix a bad configuration.

If you want to have a common disk space between multiple OSs with full
disk encryption, you will need a non-encrypted space to work with.

But if your goal is a fully encrypted disk, creating a non-encrypted
chunk of disk seems to be defeating a purpose here. Maybe you should
look at some other ideas:
* Use a USB flash drive or SD flash card. Put it in when you need to
move files, remove it when you are done.
* External NFS server
* External SFTP server (could be a small VPS, so you could bounce
files between OSs literally anywhere. Or between users!)

But as I and others have said in the past, multiboot systems are
complicated.

Nick.

No comments:

Post a Comment