View Single Post
  #2   (View Single Post)  
Old 25th December 2014
jggimi's Avatar
jggimi jggimi is online now
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,989
Default

Quote:
I aim at mounting the whole system, copy it into the new encrypted partition and setup the boot after. But I can't copy it currently.

What do I do wrong ?
Lets start with your failure to mount /dev/sd2d. I am guessing you either did not format the filesystem, or you do not have a pre-existing /mnt/target directory. See newfs(8) if you neglected to format, or mkdir(1) if you do not have the mount point created in advance.

Operating your laptop with full disk encrypt is much, much, much easier if you set up your softraid device at install time, not after you have complete your installation. Afterwards, you must create five separate filesystems in sd2, copy the filesystems one at a time, and install bootblocks manually. But it is much easier to start over, and re-install using full-disk encryption.

This "howto" assumes sd0 is your hard drive.
  1. Boot the ramdisk kernel, from your installation media or by selecting bsd.rd at the boot> prompt.
  2. Select the shell instead of install or upgrade.
  3. Only sd0 is preconfigured in /dev. Add sd1 and (if needed) sd2.
    Code:
    # cd /dev
    # sh MAKEDEV sd1 sd2
  4. Create an MBR on sd0, with a default single MBR partition for OpenBSD.
    Code:
    # fdisk -iy sd0
  5. Create a single disklabel partition, type RAID, on sd0. In this example, partition sd0a is created:
    Code:
    # disklabel -E sd0
    Label editor (enter '?' for help at any prompt)
    > a
    partition: [a]
    offset: [nn]
    size: [nnnnnnnnnn]
    FS type: [4.2BSD] raid
    > q
    Write new label?: [y] y
  6. Create your softraid(4) CRYPTO device:
    Code:
    # bioctl -c C -l /dev/sd0a softraid0
  7. Begin your installation, and install onto the newly created device.
    Code:
    # install
Disclaimer: I've installed onto bootable softraid devices: but they've been RAID 1 arrays, never CRYPTO discipline. I use softraid crypto on a laptop, but only /home is encrypted, rather than full disk encryption.

Last edited by jggimi; 25th December 2014 at 11:52 AM. Reason: typos
Reply With Quote