Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: help setting up encrypted partition

On Sat, Oct 18, 2014 at 12:51:21AM -0700, scar wrote:
> i am trying to setup an encrypted partition on my disk by following the
> guide[1] but i am a bit lost and not quite understanding the way NetBSD
> partitions disks
> /dev/wd1 is the disk i want to use (entirely) and it has been zeroed out
> with dd but i guess needs to be labeled and partitioned first before i
> can proceed to section " 14.3.2. Scrubbing the disk "?  i was able to
> enter this command:
> # cgdconfig -s cgd0 /dev/wd1e aes-cbc 128 < /dev/urandom
> but when i try the next command this happens:
> # dd if=/dev/zero of=/dev/rcgd0c bs=32k
> dd: /dev/rcgd0c: Read-only file system
> (note that i'm not using NetBSD/i386 (but sparc64) so that's why i
> changed it to rcgd0c)
> is wd1e even the right partition i want to use?  wouldn't i want wd1c so
> i can use the whole disk?  but when i try that with the cgdconfig i get
> "Operation not supported by device"
> if i try to use 'disklabel -i /dev/wd1' i get a "could not read existing
> label" error, and here[2] is the output of fdisk.
> so anyway i guess if could get a little more help preparing the disk so
> i can get the encrypted partition setup, would appreciate it!

I suspect that it's because we are trying to zap the initial blocks of
the disk where the disklabel lives. Options seem to be:
1) disklabel the disk with a partition not starting at 0 and zap that, or
2) allow overwriting of the disklabel with "disklabel -W"



Home | Main Index | Thread Index | Old Index