old-www/HOWTO/Hard-Disk-Upgrade/partition.html

279 lines
4.2 KiB
HTML

<HTML
><HEAD
><TITLE
>Partition the new disk</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.56"><LINK
REL="HOME"
TITLE="Hard Disk Upgrade Mini How-To"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Unmount non-Linux partitions and network drives"
HREF="unmount.html"><LINK
REL="NEXT"
TITLE="Format the new disk"
HREF="format.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Hard Disk Upgrade Mini How-To</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="unmount.html"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="format.html"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="PARTITION"
>4. Partition the new disk</A
></H1
><P
>Use this command to partition the new disk:
<TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
>fdisk /dev/hdb</PRE
></TD
></TR
></TABLE
></P
><P
><SPAN
CLASS="ACRONYM"
>EIDE</SPAN
> devices are identified as
<TT
CLASS="FILENAME"
>hda</TT
>,
<TT
CLASS="FILENAME"
>hdb</TT
>,
<TT
CLASS="FILENAME"
>hdc</TT
>, and
<TT
CLASS="FILENAME"
>hdd</TT
> in the
<TT
CLASS="FILENAME"
>/dev</TT
> directory. Partitions on these
disks can range from 1 to 16 and are also in the
<TT
CLASS="FILENAME"
>/dev</TT
> directory. For example,
<TT
CLASS="FILENAME"
>/dev/hda4</TT
> refers to partition 4 on
hard disk a (first <SPAN
CLASS="ACRONYM"
>EIDE</SPAN
> hard disk).</P
><P
><SPAN
CLASS="ACRONYM"
>SCSI</SPAN
> devices are listed as devices
<TT
CLASS="FILENAME"
>sda</TT
>,
<TT
CLASS="FILENAME"
>sdb</TT
>,
<TT
CLASS="FILENAME"
>sdc</TT
>,
<TT
CLASS="FILENAME"
>sdd</TT
>,
<TT
CLASS="FILENAME"
>sde</TT
>,
<TT
CLASS="FILENAME"
>sdf</TT
>, and
<TT
CLASS="FILENAME"
>sdg</TT
> in the
<TT
CLASS="FILENAME"
>/dev</TT
> directory. Similarly,
partitions on these disks can range from 1 to 16 and are also in the
<TT
CLASS="FILENAME"
>/dev</TT
> directory. For example,
<TT
CLASS="FILENAME"
>/dev/sda3</TT
>
refers to partition 3 on <SPAN
CLASS="ACRONYM"
>SCSI</SPAN
> disk a (first
<SPAN
CLASS="ACRONYM"
>SCSI</SPAN
> hard disk).</P
><P
>For Linux partitions with the ext2 file system, use system ID 83. For
swap partitions, use system ID 82.</P
><P
>For more information on partitioning, see the Installation How-To and
the Partition Mini How-To.</P
><P
>If your new disk has over 1024 cylinders, see the Large Disk Mini
How-To. In brief, you should install all files required to boot Linux
within the first 1024 cylinders. One way to do this is to create a small
partition (5 Mb or so) just for the
<TT
CLASS="FILENAME"
>/boot</TT
> directory at the beginning of
the disk. (Slackware only: The kernel is at
<TT
CLASS="FILENAME"
>/vmlinuz</TT
> rather than
<TT
CLASS="FILENAME"
>/boot/vmlinuz</TT
>, so you should put both the
<TT
CLASS="FILENAME"
>/</TT
> directory and the
<TT
CLASS="FILENAME"
>/boot</TT
>
directory in this partition.)</P
><P
>Partitions for systems other than Linux should be created using their
own <B
CLASS="COMMAND"
>fdisk</B
> or equivalent command rather than with
Linux's <B
CLASS="COMMAND"
>fdisk</B
>.</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="unmount.html"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="format.html"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Unmount non-Linux partitions and network drives</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Format the new disk</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>