doc/en_US.ISO8859-1/books/handbook/basics/disk-layout.ps
Warren Block ef8b01d795 Update the disk organization section of the very old Basics chapter.
This chapter referred to images from the retired Install chapter, which
were missing from the Makefile.  Some of the information was out of
date.  The original disk organization diagram had been created in an
application that has not existed for over a decade, so I wrote a new
diagram in PostScript.  This addresses the PR below.  This needs to be
extended to add a GPT version.

PR:             203821
Submitted by:   ryan@englandacademy.org
2015-10-27 02:43:23 +00:00

165 lines
4 KiB
PostScript

%!PS
% Warren Block, October 2015
% $FreeBSD$
% use ps2epsi or ps2eps to convert to EPS:
% ps2epsi disk-layout.ps disk-layout.eps
% copy the EPS file to doc/share/images/books/handbook/basics
% Sizes for the entire diagram are parametric based on the font
% size. Change it here (only) to change the whole thing.
/fontsize 12 def
/gutter fontsize def
/pagemargin 36 def
/textmargin fontsize 3 div def
% disk
/diskwidth fontsize 22 mul def
/diskcolor { .53 .81 .98 } def
% partitions
/partcount 5 def
/partwidth diskwidth gutter 4 mul sub def
/partheight fontsize 3 mul def
/partcolor { .88 1 1 } def
% slices
/slice1height partheight 2 mul fontsize add def
/slice2height partheight partcount mul fontsize add gutter partcount 1 add mul add def
/slicewidth diskwidth gutter 2 mul sub def
/slicecolor { .94 1 .94 } def
/diskheight fontsize gutter add slice1height add gutter add
slice2height add gutter add def
/linewidth 0.5 def
/boxpath { % x y width height
/dheight exch def
/dwidth exch def
/dy exch def
/dx exch def
dx dy moveto
0 dheight rlineto
dwidth 0 rlineto
0 dheight neg rlineto
dwidth neg 0 rlineto
closepath
} def
/colorbox { % x y width height r g b
/db exch def
/dg exch def
/dr exch def
/dheight exch def
/dwidth exch def
/dy exch def
/dx exch def
dx dy dwidth dheight boxpath dr dg db setrgbcolor fill
0 setgray dx dy dwidth dheight boxpath stroke
} def
/colorlabelbox { % x y width height r g b desc devname
/ddevname exch def
/ddesc exch def
/db exch def
/dg exch def
/dr exch def
/dheight exch def
/dwidth exch def
/dy exch def
/dx exch def
dx dy dwidth dheight dr dg db colorbox
dx textmargin add
dy dheight add textmargin sub fontsize sub moveto
/Helvetica findfont fontsize scalefont setfont
ddesc show
(: ) show
/Courier-Bold findfont fontsize scalefont setfont
ddevname show
} def
/colorpartbox { % x y width height r g b desc devletter devname mountdesc mountpt
/dmountpt exch def
/dmountdesc exch def
/ddevname exch def
/ddevletter exch def
/ddesc exch def
/db exch def
/dg exch def
/dr exch def
/dheight exch def
/dwidth exch def
/dy exch def
/dx exch def
dx dy dwidth dheight dr dg db colorbox
dx textmargin add
dy dheight add textmargin sub fontsize sub moveto
/Helvetica findfont fontsize scalefont setfont
ddesc show
( ) show
/Courier-Bold findfont fontsize scalefont setfont
ddevletter show
/Helvetica findfont fontsize scalefont setfont
(, ) show
/Courier-Bold findfont fontsize scalefont setfont
ddevname show
dx textmargin add
dy dheight add textmargin sub fontsize 2 mul sub moveto
/Helvetica findfont fontsize scalefont setfont
dmountdesc show
( ) show
/Courier-Bold findfont fontsize scalefont setfont
dmountpt show
} def
linewidth setlinewidth
pagemargin pagemargin diskwidth diskheight
diskcolor (250 GB Hard Disk) (ada0) colorlabelbox
% slices
pagemargin gutter add
pagemargin diskheight add fontsize sub gutter sub slice1height sub
slicewidth slice1height
slicecolor (Slice 1, Windows NTFS, 80GB) (ada0s1) colorlabelbox
pagemargin gutter add pagemargin gutter add
slicewidth slice2height
slicecolor (Slice 2, FreeBSD, 170GB) (ada0s2) colorlabelbox
% partitions
pagemargin gutter 2 mul add
pagemargin gutter 6 mul add partheight 4 mul add
partwidth partheight
partcolor
(FreeBSD partition) (a) (ada0s2a) (mounted as) (/) colorpartbox
pagemargin gutter 2 mul add
pagemargin gutter 5 mul add partheight 3 mul add
partwidth partheight
partcolor
(FreeBSD partition) (b) (ada0s2b) (swap) () colorpartbox
pagemargin gutter 2 mul add
pagemargin gutter 4 mul add partheight 2 mul add
partwidth partheight
partcolor
(FreeBSD partition) (d) (ada0s2d) (mounted as) (/var) colorpartbox
pagemargin gutter 2 mul add
pagemargin gutter 3 mul add partheight add
partwidth partheight
partcolor
(FreeBSD partition) (e) (ada0s2e) (mounted as) (/tmp) colorpartbox
pagemargin gutter 2 mul add
pagemargin gutter 2 mul add
partwidth partheight
partcolor
(FreeBSD partition) (f) (ada0s2f) (mounted as) (/usr) colorpartbox
showpage