%% $Header: /cvsroot/lcdp/lpic/general-linux-2/slides/gl2.102.1.slides.tex,v 1.4 2003/05/30 06:03:32 waratah Exp $

\input{gl2.slide-header.tex}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%----10->|-----20->|-----30->|-----40->|-----50->|-----60->|-----70->|-----80->
\begin{slide} %================================================================
\begin{center} \LARGE \textsf{-- General Linux 2 -- \\
Design Hard Disk Layout }
\LARGE \textsf{[2] } \\[2mm]
\large  \textsf{(Linux Professional Institute Certification)}\\[1mm]

\normalsize\end{center}

\footnote{Copyright \copyright\ 2002 Geoffrey Robertson. Permission is granted to make and distribute verbatim copies or modified versions of this document provided that this copyright notice and this permission notice are preserved on all copies under the terms of the GNU General Public License as published by the Free Software Foundation---either version 2 of the License or (at your option) any later version.}
 
\scriptsize
\begin{verbatim}
   .~.    
   /V\     by: geoffrey robertson        
  // \\        geoffrey@zip.com.au
  @._.@ 
\end{verbatim} 
\tiny
\begin{verbatim}
$Id: gl2.102.1.slides.tex,v 1.4 2003/05/30 06:03:32 waratah Exp $ 
\end{verbatim} 
\normalsize  
\vfill \end{slide} %-----------------------------------------------------------
%----10->|-----20->|-----30->|-----40->|-----50->|-----60->|-----70->|-----80->

%==============================================================================
\begin{slide} %ghr
  \listofslides
\vfill \end{slide}
%------------------------------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
\Slidecontents
\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================
%==============================================================================
\begin{slide} %ghr
\slideheading{(2.2) 102 Installation \& Package Mgt. [24]}
\begin{description}
  \item[2.102.1] {\bf \underline{Design hard disk layout [2]}}
  \item[2.102.2] Install a boot manager [3]
  \item[2.102.3] Make and install programs from source [5]
  \item[2.102.4] Manage shared libraries [3]
  \item[2.102.5] Use Debian package management [5]
  \item[2.102.6] Use Red Hat Package Manager (RPM) [6] 
\end{description}
\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================
\begin{slide}{} %ghr
\Slidecontents
\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================
%==============================================================================
\begin{slide} %ghr
\slideheading{ Design hard disk layout [2]}
\slidesubheading{Objective} 

Candidates should be able to design a disk partitioning scheme for a
Linux system. This objective includes allocating filesystems or swap
space to separate partitions or disks, and tailoring the design to the
intended use of the system. It also includes placing \texttt{/boot} on
a partition that conforms with the BIOS' requirements for booting.

\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================
\begin{slide} %ghr
\Slideheading{Design hard disk layout [2]}
\slidesubheading{Key files, terms, and utilities}
\begin{alltt}
/ (root) filesystem
/var filesystem
/home filesystem
swap space
mount points
partitions
cylinder 1024
\end{alltt}

\slidesubheading{Resources of interest}
Linux Partitioning Mini-FAQ
\small
\begin{alltt}
http://pw1.netcom.com/~kmself/Linux/FAQs/partition.html
\end{alltt} 

\vfill \end{slide} %-----------------------------------------------------------
 
%==============================================================================
\begin{slide}{} %ghr
\Slidecontents
\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
%==============================================================================
\begin{slide}{}
\slideheading{IA32 Disk Partitions}
\slidesubheading{Primary Partitions}

On \textsf{i386} systems disks may be sliced up into to 15 partitions.
\begin{itemize}

\item The disk must have at least 1 \textsf{primary} partition.
\begin{alltt}
/dev/hda1   
\end{alltt}

\item There may be up to 4 \textsf{primary} partitions.
\begin{alltt}
/dev/hda1  (primary)   
/dev/hda2  (primary)   
/dev/hda3  (primary)   
/dev/hda4  (primary)   
\end{alltt}

\end{itemize}
\vfill \end{slide} %-----------------------------------------------------------


%==============================================================================
%==============================================================================
\begin{slide}{}
\Slideheading{IA32 Disk Partitions}
\slidesubheading{Logical Partitions}

On \textsf{i386} systems disks may be sliced up into to 15 partitions.
\begin{itemize}
  \item One of the 4 primary partitions may be made into an
  \textsf{extended} partition.
  \item The one \textsf{extended} partition must hold between 1 and 12
  \textsf{logical} partitions.
\begin{alltt}
/dev/hda1  (primary)   
/dev/hda2  (extended)   
/dev/hda5  (logical) 
/dev/hda6  (logical)
...
/dev/hda16 (logical)  
\end{alltt}

\end{itemize}
\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{} %ghr
\Slidecontents
\vfill \end{slide} %-----------------------------------------------------------


%==============================================================================
%==============================================================================
\begin{slide}{}
\slideheading{Linux Partitioning mini-FAQ}
\slidesubheading{Basic Recommendation}
\begin{alltt}
/                   50 - 100 MB
/tmp                50 - 100 MB
/var                200 - 500 MB
/usr                1 - 2+  GB
/usr/local          1 - 2+  GB
/home               remainder
 
\end{alltt}

\vfill \end{slide} %-----------------------------------------------------------


%==============================================================================
%==============================================================================
\begin{slide}{}
\Slideheading{Linux Partitioning mini-FAQ}
\slidesubheading{Swap}
\begin{itemize}
  \item Linux currently has a maximum of 2GB
\overlay{1}
  \item VA Linux configures its servers with 1x physical RAM
\overlay{2}
  \item Traditional recommendation is 2x physical RAM
\overlay{3}
  \item Karsten M. Self uses 3x physical RAM
\overlay{4}
  \item Large amounts of swap should be divided across several
  partitions and preferably across several spindles.
\end{itemize}

\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{}
\Slideheading{Linux Partitioning mini-FAQ}
\slidesubheading{Root partition}
The root partition must have:
\begin{itemize}
  \item \texttt{/bin}
  \item \texttt{/dev}
  \item \texttt{/etc}
  \item \texttt{/initrd}
  \item \texttt{/lib}
  \item \texttt{/root}
  \item \texttt{/sbin}
\end{itemize}

Other directory trees may be distributed on other partitions/spindles.
\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{}
\Slideheading{Linux Partitioning mini-FAQ}
\slidesubheading{Directories on separate partitions}
\begin{description}
  \item[/tmp] highly variable. Don't risk your root partition, isolate
  this content. Mount noexec and/or nosuid for added protection.
\overlay{1}
  \item[/var] likewise, highly variable. Mount noexec and/or nosuid
  for added protection.
\overlay{2}
  \item[/usr] Largely stable. Can be mounted read-only except for
  package upgrades.
\overlay{3}
  \item[/usr/local] Largely stable, and not part of the packaging
  system. Can be mounted read-only, possibly nosuid.
\overlay{4}
  \item[/home] Variable content, usually most sensitive data both in
  terms of security and integrity. Can be mounted nosuid.
\end{description}

\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{}
\Slideheading{Linux Partitioning mini-FAQ}
\slidesubheading{Typical Desktop}
\small
\begin{alltt}
 Filesystem 1k-blocks    Used Available Use% Mounted on
/dev/hda3     152247   33526   110859  24% /
/dev/hda6     249871    2004   234967   1% /tmp
/dev/sda7     585008  457456    97836  83% /var
/dev/hda5     495960   87588   382772  19% /var/spool/news
/dev/sdb2    1929100 1518288   312816  83% /usr
/dev/sda5    1209572  574152   573976  51% /usr/local
/dev/hda7     378711  213496   145662  60% /usr/local/data
/dev/hda2    1007992  584132   372656  62% /home
/dev/hda1     157044  119252    37792  76% /mnt/dos 
\end{alltt}

\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{}
\Slideheading{Linux Partitioning mini-FAQ}
\slidesubheading{Typical Desktop \texttt{fdisk /dev/hda}}
\scriptsize
\begin{alltt}
Disk /dev/hda: 128 heads, 63 sectors, 620 cylinders
Units = cylinders of 8064 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hda1             1        39    157216+   6  FAT16
/dev/hda2            40       293   1024128   83  Linux
/dev/hda3   *       294       332    157248   83  Linux
/dev/hda4           333       620   1161216    5  Extended
/dev/hda5           333       459    512032+  83  Linux
/dev/hda6           460       523    258016+  83  Linux
/dev/hda7           524       620    391072+  83  Linux
\end{alltt}
\vfill \end{slide} %-----------------------------------------------------------
%==============================================================================
\begin{slide}{}
\Slideheading{Linux Partitioning mini-FAQ}
\slidesubheading{Typical Desktop \texttt{fdisk /dev/sda}}
\scriptsize
\begin{alltt}
Disk /dev/sda: 255 heads, 63 sectors, 261 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sda1             1        17    136521   82  Linux swap
/dev/sda2            18       261   1959930    5  Extended
/dev/sda5            18       170   1228941   83  Linux
/dev/sda6           171       187    136521   82  Linux swap
/dev/sda7           188       261    594373+  83  Linux
\end{alltt}
\vfill \end{slide} %-----------------------------------------------------------
%==============================================================================
\begin{slide}{}
\Slideheading{Linux Partitioning mini-FAQ}
\slidesubheading{Typical Desktop \texttt{fdisk /dev/sdb}}
\scriptsize
\begin{alltt}
Disk /dev/sdb: 255 heads, 63 sectors, 261 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/sdb1             1        17    136521   82  Linux swap
/dev/sdb2            18       261   1959930   83  Linux
\end{alltt}
\vfill \end{slide} %-----------------------------------------------------------

%==============================================================================
\begin{slide}{}
\Slideheading{Linux Partitioning mini-FAQ}
\slidesubheading{Typical Desktop \texttt{/etc/fstab}}
\scriptsize
\begin{alltt}                                           
/dev/hda3     /               ext2 defaults,errors=remount-ro         0 1
proc          /proc           proc defaults                           0 0
/dev/hda6     /tmp            ext2 defaults,nosuid,nodev              0 2
/dev/sda7     /var            ext2 defaults,nosuid,nodev              0 2
/dev/hda5     /var/spool/news ext2 defaults,nosuid,noexec,nodev       0 2
/dev/sdb2     /usr            ext2 defaults,rw,nodev                  0 2
/dev/sda5     /usr/local      ext2 defaults,rw,nosuid,nodev           0 2
/dev/hda7     /usr/local/data ext2 defaults,nosuid,nodev              2 2 
/dev/hda2     /home           ext2 defaults,nosuid,nodev              0 2

/dev/hdc      /mnt/cdrom      iso9660 noauto,user,ro,nodev,nosuid     2 2
/dev/fd0      /mnt/floppy     auto noauto,gid=disk,umask=007,rw,user  2 2
/dev/hda1     /mnt/dos    vfat auto,user,nosuid,nodev,gid=6,umask=002 2 2 

/dev/sda1     none            swap    sw          0       0
/dev/sdb1     none            swap    sw          0       0
/dev/sda6     none            swap    sw          0       0  
\end{alltt}

\vfill \end{slide} %-----------------------------------------------------------


%==============================================================================
\begin{slide}{} %ghr
\heading{The End}
 \Slidecontents
\vfill \end{slide} %-----------------------------------------------------------


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%==============================================================================
%==============================================================================
\begin{slide}{}
\slideheading{}


\vfill \end{slide} %-----------------------------------------------------------

=============================================================================
\begin{slide}{}

\end{slide} %------------------------------------------------------------------

