Re: creating new partition has corrupted the disklabel ("bad super block")
On 2022-04-30, Nick Holland wrote: > 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. encfs runs on top of other filesystems and works on various OS. it is in packages. As far as the problems experienced here are concerned I think it can be ignored what exactly is stored on the ext2fs partition, the same probably would probably occur with plain stored files. (btw if I wanted to share between OpenBSD and another OS I would go with FAT32, it's more likely that others will have already found the worst bugs with FAT32 than with the less-used ext2fs support). >> 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. If the partition table now points to the wrong place then it seems likely that could result in a "magic number wrong" too. I did wonder if adding it in Arch would cause OpenBSD to update the "constructed" disklabel entries for non-OpenBSD filesystems, which start from 'i', but disklabel(8) says that these are "not dynamic, they are fixed at the time disklabel is run. That means that subsequent changes that affect non-OpenBSD partitions will not be present in the default label" - which suggests it's something else. So corrupted partition due to creating another filtesystem on top of an OpenBSD one does seem more likely here. >> 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? simplest way is to boot an upgrade kernel (bsd.rd) on a softraid-crypted filesystem from the OpenBSD boot loader. You should be able to do it from USB storage too but probably need to run bioctl by hand to "create" the softraid device in that case. > But as I and others have said in the past, multiboot systems are > complicated. Yes multiboot is the fiddly bit here. I would suggest maybe creating the "fdisk style" (MBR) paritition table first, with a chunk for OpenBSD, a chunk for $other_OS, and the shared space, then install OpenBSD so that those "disklabel style" partition entries are automatically constructed for those, and install onto the other partitions, avoiding those two. My preference for dualbooting would be, if possible, to use an entirely separate disk (in the same machine). There's far less risk of error that way.
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.
creating new partition has corrupted the disklabel ("bad super block")
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. 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 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. 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? Thanks, -- Sylvain Saboua from webmail
Re: bwfm0 no networking when combined with trunk (Raspberry Pi 4)
On 2022-04-30, David Demelier wrote: > I have setup a trunk combination on my Pi 4 to aggregate the ethernet > port (bse0) with the wireless port (bwfm0) using the examples in the > documentation: trunk changes the MAC address to that of the first port, and there's a fair chance that changing MAC might not work with bwfm. You could try "lladdr (mac address of bwfm interface)" in hostname.trunk0 and see if that helps.
Re: vlan autoconf fails to conf at boot
On 2022-04-30 00:49 -04, Josh Grosse wrote: > On Fri, Apr 29, 2022 at 09:33:50PM -0700, George Morgan wrote: >> I created a hostname.vlan10 file which has a single line: >> >> inet autoconf parent vge0 vnetid 10 lladdr ... >> >> At boot the interface fails to configure but after boot I can login to the >> console and run "doas sh /etc/netstart" and the interface will configure. >> >> What am I doing wrong? Do I need to add something to rc.conf.local to force >> the parent to configure first? The parent (vge0) has a static IPv4 address. > > The vlan has to be created and assigned parentage before autoconfiguration. > Craft your hostname.vlan10 file in two lines: > > vnetid 10 parent vge0 addrr ... > inet autoconf > > This information brought to my attention via Reddit: > > https://www.reddit.com/r/openbsd/comments/ua0wqd/no_longer_able_to_connect_to_the_internet_after/i5z24fj/ > The explanation on reddit is not quite correct though. You are trying to configure a vlan interface before setting vlan parameters, i.e: # ifconfig vlan10 destroy # ifconfig vlan10 inet 192.0.2.23/24 ifconfig: SIOCAIFADDR: Device not configured # ifconfig vlan10 destroy # ifconfig vlan10 inet autoconf ifconfig: SIOCSIFXFLAGS: Device not configured It has nothing to do with requesting a dhcp lease. I think this kinda maybe worked previously but IIRC dlg shuffled some code around and tightened the requirements. This has fewer surprises and works correctly. -- I'm not entirely sure you are real.