-------- Forwarded Message --------
Subject:        Re: howto verify keydisk backup
Date:   Wed, 19 Jun 2019 09:23:53 +0100
From:   shadrock uhuru <niyal...@gmail.com>
To:     noah pugsley <noah.pugs...@gmail.com>





On 6/19/19 5:25 AM, noah pugsley wrote:
> On Tue, Jun 18, 2019 at 5:37 PM shadrock uhuru <niyal...@gmail.com> wrote:
>> hi everyone
>> my keydisk is on a compactflash sandisk ultra 2 card,
>> which was created during disk encryption
>>
>> doas disklabel sd1
>> # /dev/rsd1c:
>> type: SCSI
>> disk: SCSI disk
>> label: USB CARD READER
>> duid: ea53e532b5ae2a0f
>> flags:
>> bytes/sector: 512
>> sectors/track: 63
>> tracks/cylinder: 255
>> sectors/cylinder: 16065
>> cylinders: 31
>> total sectors: 501760
>> boundstart: 64
>> boundend: 498015
>> drivedata: 0
>>
>> 16 partitions:
>> #       size           offset  fstype [fsize bsize   cpg]
>>   a:    16001          64      RAID
>>   c:    501760         0       unused
>>
>>
>> i boot my laptop  (samsung np300e5A) with this connected to a card
>> reader  connected to a usb port and i'm able to boot without a problem
>>
>> I HAVE A cruzer memory stick to use as a BACKUP keydisk
>>
>> doas disklabel sd3
>> # /dev/rsd3c:
>> type: SCSI
>> disk: SCSI disk
>> label: Cruzer Fit
>> duid: 7fe58412fc668f9e
>> flags:
>> bytes/sector: 512
>> sectors/track: 63
>> tracks/cylinder: 255
>> sectors/cylinder: 16065
>> cylinders: 972
>> total sectors: 15630336
>> boundstart: 64
>> boundend: 15615180
>> drivedata: 0
>>
>> 16 partitions:
>> #                size           offset  fstype [fsize bsize   cpg]
>>   a:            16001               64    RAID
>>   c:         15630336                0  unused
>>
>> using the backup instruction on the openbsd faq i create an image of the 
>> keydisk
>>
>> dd bs=8192 skip=1 if=/dev/rsd1a of=backup-keydisk.img
>>
>> 999+1 records in
>> 999+1 records out
>> 8184320 bytes transferred in 2.251 secs (3634754 bytes/sec)
>>
>> i restore the image to the backup usb memory stick using
>>
>> dd bs=8192 seek=1 if=backup-keydisk.img of=/dev/rsd3a
>>
>> 999+1 records in
>> 999+1 records out
>> 8184320 bytes transferred in 1.744 secs (4690370 bytes/sec)
>>
> I might be speaking out of turn here, but I'm pretty sure you want to
> dd rsdXc, that images the entire disk, not just the a partition.
i don't think that would work,
the two memory sticks areĀ  different sizes with the compactflash being
256mb and the cruzer being 8gb,
if i am wrong let me know,
this is why i dd the partition with the keydisk data on.

shadrock
>> when i try to boot off the backup usb memory stick i get
>> using drive 0 partition 3
>> no os
>>
>> i tried to verify the keydisk image  with diff using
>>
>> doas diff /dev/rsd1a backup-keydisk.img
>> Binary files /dev/rsd1a and backup-keydisk.img differ
>> ---
>>
>> is there a problem with the hardware combination of usb sticks i use for 
>> keydisk backup
>> or the commands i use especially the diff command to try and verify the 
>> image file ?
>>
>> shadrock
>>

Reply via email to