On Fri, Mar 25, 2022 at 10:28:55AM +0100, soko.tica wrote: > Hello list, > > I have tried to encrypt disk before the installation of OpenBSD 7.0 > according to the instructions here > https://www.openbsd.org/faq/faq14.html#softraid and managed to mess it.
First of all, if this is a fresh install onto an otherwise clean disk, I see no reason not to restart everything from scratch. > > I have performed > > # cd /dev && sh MAKEDEV sd0 > # fdisk -iy -g -b 960 sd0 > # disklabel -E sd0 > Label editor (enter '?' for help at any prompt) > sd0> a a > offset: [64] > size: [39825135] * > FS type: [4.2BSD] RAID > sd0*> w > sd0> q > No label changes. > # bioctl -c C -l sd0a softraid0 > > But I have failed to proceed before the installation with > > # cd /dev && sh MAKEDEV sd1 > # dd if=/dev/zero of=/dev/rsd1c bs=1m count=1 > > So i ended up with unbootable install. There is some missing information here. How did the installation proceed? Did it go all the way to the end? Did the installer create a disklabel? And if so, on which disk? If you boot the RAMDISK, exit to a shell, build the crypto volume (bioctl), create the dev node (MAKEDEV sd1) and check its disklabel (disklabel sd1) does it show anything? If there are partitions on the sd1 disklabel, can they be mounted and do they have anything in them? Again, if the disk was empty to begin with (and the information below seems to indicate so), there is nothing that needs to be salvaged, just restart the whole process. > The disk is shown > > # disklabel sd0 > # /dev/rsd0c: > type: SCSI > disk: SCSI disk > label: HGST HTS725050A7 > duid: f62d9ae29f67d326 > flags: > bytes/sector: 512 > sectors/track: 63 > tracks/cylinder: 255 > sectors/cylinder: 16065 > cylinders: 60801 > total sectors: 976773168 > boundstart: 1024 > boundend: 976773135 > drivedata: 0 > > 16 partitions: > # size offset fstype [fsize bsize cpg] > a: 976772111 1024 RAID > c: 976773168 0 unused > i: 960 64 MSDOS > > #fdisk sd0 > Disk: sd0 Usable LBA: 34 to 976773134 [976773168 Sectors] > #: type [ start: size ] > ------------------------------------------------------------------------ > 0: EFI Sys [ 64: 960 ] > 1: OpenBSD [ 1024: 976772111 ] > > > Is it safe to delete all somewhat encrypted partitions by > # fdisk -iy sd0 > ? > > Should I perhaps first delete somewhat encrypted partitions by > > # disklabel -E sd0 > > d a > d i > > ? > > Thank you in advance for your answers. --