Re: how to mount encription volume

2016-03-12 Thread freeunix

Thanks for good messages!

Example A: Create encryption volume and decryption by bioctl
bioctl -c C -l /dev/sd0a softraid0

Example B: Create encryption volume and decryption by vnconfig
vnconfig -ck vnd0 /dev/sd0a

almost I use

Example C:
dd if=/dev/urandom of=.vnode bs=512M count=1
vnconfig -ck vnd0 .vnode
newfs vnd0c
mount /dev/vnd0c /mnt
umount /mnt
vnconfig -u vnd0

softraid encryption needs bioctl.
bioctl needs device name with disklabel.

Example D:
dd if=/dev/urandom of=.vnode.bio bs=512M count=1
vnconfig -ck vnd0 .vnode.bio #actually no needs encrytion
echo -n "a d\n0\n512M\nRAID\np\nw\nq" | disklabel -E vnd0

bioctl -c C -l vnd0d softraid0 #softraid0: CRYPTO volume attache as sd2
newfs /dev/rsd2c #it will be make other disklabel on sd2
dd if=/dev/zero of=/dev/sd2c bs=32k
echo -n "a e\n0\n256M\n4.2BSD\np\nw\nq" | disklabel -E sd2
echo -n "a i\n\n\nMSDOS\np\nw\nq" | disklabel -E sd2
newfs sd2e
newfs_msdos -F 32 sd2i
mount /dev/sd2e /mnt
mount_msdos /dev/sd2i /mnt2
umount /mnt2
umount /mnt
bioctl -d sd2

vnconfig -u vnd0

The OpenBSD "Full disk encryption" is actually no need tinking as Air.

And Any people (like a Rookie) didn't know how to solve the problems.
Who forget or confuse it. Need good suggestion.

in this case, I could get a good sugguestion.



Re: how to mount encription volume

2016-03-12 Thread dan mclaughlin
On Sat, 12 Mar 2016 12:19:59 + freeu...@ruggedinbox.com wrote:
> hi, I use the bioctl encryption on boot volume.
> 
> example A:
> fdisk -iy sd0
> echo -n "a a\n64\n\nRAID\np\nw\nq\n\n" |disklabel -E sd0
> bioctl -c C -l /dev/sd0a softraid0
> 
> then, OpenBSD detect sd1 and I install the OpenBSD on sd1a.
> It's OK. X and any process are running on these drive[call A:].
> 
> 
> I have problem. I tried mount this dirve[A:] on other OpenBSD machine.
> (other OpenBSD machine uses drive wd0a[call B:])
> 
> but, I can't mount the encrytion volume[A:].
> 
> example B:
> vnconfig -ck vnd0 /dev/sd0a
> Encryption key:[any words]
> vnconfig -l
> vnd0: covering /dev/sd0a on wd0a, inode [any number]
> mount /dev/vnd0a /mnt
> mount_ffs: /dev/vnd0a on /mnt: Device not configured
> 
> any ideas?
> 

softraid and vnconfig are completely separate systems. if you want to mount
the softraid, you need to use the bioctl command you used above (it's not
just for creation, it also configures it). check out bioctl(8) (check under
EXAMPLES), and the archives at https://marc.info/?l=openbsd-misc=1=2
(search "softraid crypto").



Re: how to mount encription volume

2016-03-12 Thread Robert
On Sat, 12 Mar 2016 12:19:59 +
freeu...@ruggedinbox.com wrote:
> hi, I use the bioctl encryption on boot volume.
It's called "softraid crypto".

> example A:
> bioctl -c C -l /dev/sd0a softraid0

> example B:
> vnconfig -ck vnd0 /dev/sd0a
This is a "vnode pseudo disk device", in this case with crypto.
This is not softraid.

Those two mechanisms are not compatible.

On machine B: you also need to do the "bioctl" command. Then you get sd1 (or 
similar), and that you can mount.

regards,
Robert



how to mount encription volume

2016-03-12 Thread freeunix

hi, I use the bioctl encryption on boot volume.

example A:
fdisk -iy sd0
echo -n "a a\n64\n\nRAID\np\nw\nq\n\n" |disklabel -E sd0
bioctl -c C -l /dev/sd0a softraid0

then, OpenBSD detect sd1 and I install the OpenBSD on sd1a.
It's OK. X and any process are running on these drive[call A:].


I have problem. I tried mount this dirve[A:] on other OpenBSD machine.
(other OpenBSD machine uses drive wd0a[call B:])

but, I can't mount the encrytion volume[A:].

example B:
vnconfig -ck vnd0 /dev/sd0a
Encryption key:[any words]
vnconfig -l
vnd0: covering /dev/sd0a on wd0a, inode [any number]
mount /dev/vnd0a /mnt
mount_ffs: /dev/vnd0a on /mnt: Device not configured

any ideas?