Encrypted CD/DVDs via gbde or otherwise

R. W. list-freebsd-2004 at morbius.sent.com
Tue Aug 17 14:27:37 PDT 2004


On Tuesday 17 August 2004 14:14, Dag-Erling Smørgrav wrote:
> "R. W." <list-freebsd-2004 at morbius.sent.com> writes:
> > I have some data in an encrypted gbde partition. I'd like to be
> > able to move some of it out to CD-R or DVD in an encrypted,
> > mountable form (as opposed to simply encrypting a tar file and
> > burning that).
> >
> > Most other encryption schemes support this through container files.
> > You create a 650MB container, mount/attach it, copy the data,
> > unmount/detach the container, and burn it to CD as a single file on
> > a data disk.
> >
> > AFAIK gbde doesn't support container files. Is it on the roadmap?
> > Or is there any alternative.
>
> (untested)
>
> # dd if=/dev/zero of=container bs=1048576 count=650
> # mdconfig -a -t vnode -f container
> # gbde init /dev/md0
> # gbde attach /dev/md0
> # newfs /dev/md0.bde
> # mount /dev/md0.bde /mnt
> # <copy files to /mnt>
> # umount /mnt
> # gbde detach /dev/md0
> # mdconfig -d -u 0
> # burncd data container fixate
>
> you should then be able to 'gbde attach /dev/acd0' and mount
> /dev/acd0.bde wherever you like.

Nice Idea, but it didn't quite work, there was no /dev/acd0.bde after 
attaching /dev/acd0.

However, what did work was converting the container to an iso image 
before burning, then using 

# mount  /cdrom
# mdconfig -a -t vnode -f  /cdrom/containe
# gbde init /dev/md0
# gbde attach /dev/md0 
# mount /dev/md0.bde /mnt 

to access the encrypted data.


Thanks for your help.


More information about the freebsd-geom mailing list