28.08.2015 Views

The Design and Implementation of the Anykernel and Rump Kernels

1F3KDce

1F3KDce

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

B–8<br />

Our goal is to add ano<strong>the</strong>r partition after <strong>the</strong> existing ones to contain <strong>the</strong> cgdencrypted<br />

data. This will require extending <strong>the</strong> file containing <strong>the</strong> image, <strong>and</strong>,<br />

naturally, a large enough USB mass storage device onto which <strong>the</strong> new image file<br />

can be copied.<br />

First, we create a file system image out <strong>of</strong> our data directory using <strong>the</strong> st<strong>and</strong>ard<br />

makefs comm<strong>and</strong> from <strong>the</strong> NetBSD base system:<br />

golem> makefs unencrypted.ffs preciousdir<br />

Calculated size <strong>of</strong> ‘unencrypted.ffs’: 12812288 bytes, 696 inodes<br />

Extent size set to 8192<br />

unencrypted.ffs: 12.2MB (25024 sectors) block size 8192, fragment size 1024<br />

using 1 cylinder groups <strong>of</strong> 12.22MB, 1564 blks, 768 inodes.<br />

super-block backups (for fsck -b #) at:<br />

32,<br />

Populating ‘unencrypted.ffs’<br />

Image ‘unencrypted.ffs’ complete<br />

<strong>The</strong>n, we calculate <strong>the</strong> image size in disk sectors by dividing <strong>the</strong> image size with <strong>the</strong><br />

disk sector size (512 bytes):<br />

golem> expr ‘stat -f %z unencrypted.ffs‘ / 512<br />

25024<br />

We <strong>the</strong>n edit <strong>the</strong> existing image label so that <strong>the</strong>re is a spare partition large enough<br />

to hold <strong>the</strong> image. We need to edit ”total sectors”, <strong>and</strong> <strong>the</strong> ”c” <strong>and</strong> ”d” partition.<br />

We also need to create <strong>the</strong> ”e” partition. Make sure you use ”unknown” instead <strong>of</strong><br />

”unused” as <strong>the</strong> fstype for for partition e. In <strong>the</strong> following image <strong>the</strong> edited fields<br />

are denotated with a red color.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!