\documentclass[letterpaper]{article}
\nonstopmode
\bkai
\usepackage{linuxdoc-sgml}
\usepackage{qwertz}
\usepackage{url}
\usepackage[latin1]{inputenc}
\usepackage{t1enc}
\usepackage[english]{babel}
\usepackage{epsfig}
\usepackage{null}
\def\addbibtoc{
\addcontentsline{toc}{section}{\numberline{\mbox{}}\relax\bibname}
}%end-preamble
\setcounter{page}{1}
\title{Large Disk mini-HOWTO ¤¤Ä¶ª©}
\author{§@ªÌ: Andries Brouwer, {\ttfamily \onlynameurl{jaeb@cwi.nl}}\\ 
Ä¶ªÌ: Asd L. Chen, {\ttfamily \onlynameurl{asdchen@ms1.hinet.net}}}
\date{v1.0, 26 June 1996
Â½Ä¶¤é´Á: 10-13 November 1997}
\abstract{©Ò¦³¦³Ãö disk geometry ¤Î 1024 cylinder ªº­­¨î¡D}


\begin{document}
\maketitle
\tableofcontents

\section{°ÝÃD©Ò¦b}

°²¦p§AªººÏºÐ¶W¹L 1024 ­ÓºÏÁL(cylinders)¡D ÁÙ¦³, °²¦p§Aªº§@·~¨t²Î¨Ï¥Î°ò¥»¿é¥X¤J¨t²Î(BIOS)¡D¨º»ò§A·|¹J¨ì¤@­Ó°ÝÃD, ¦]¬°¤@¯ëºÏºÐ¿é¥X¤J¡þ¿é¤J©Ò¨Ï¥Îªº INT13 BIOS ¤¶­±¥H¤@­Ó 10 ¦ì¤¸(bit) ªºÄæ¦ì¨Ó¾Þ§@ºÏÁL, ©Ò¥HµLªk¦s¨ú²Ä 1024 ¤Î¤§«áªººÏÁL¡D

©¯¹Bªº¬O, Linux ¤£¨Ï¥Î BIOS,  ©Ò¥H¨S¦³°ÝÃD¡D

¸Ü¬O³o»ò»¡, ¦ý¦³¨â¥ó¨Æ¨Ò¥~:

(1) ·í§A¦b±Ò°Ê¨t²Î®É, Linux ÁÙ¨S¶}©l°õ¦æ©Ò¥HµLªkÅý§AÁ×§K³o­Ó°ÝÃD¡D³o¹ï LILO ¥H¤ÎÃþ¦üªº±Ò°Ê¸ü¤Jµ{¦¡(boot loaders)¦³¨Ç¼vÅT¡D

(2) ¨Ï¥ÎºÏºÐªº©Ò¦³§@·~¨t²Î¥²¶·¦P·N¤À³Î°Ïªº¦ì¸m¡D´«¥y¸Ü»¡, ¦pªG§A¦b¤@ÁûºÏºÐ¤W¨Ï¥Î Linux  ¥H¤Î, ¨Ò¦p DOS, ¨º»ò¨âªÌ¥²¶·¥H¬Û¦Pªº¤è¦¡¸ÑÅª¤À³Îªíªº¸ê®Æ¡D³o¹ï Linux  ®Ö¤ß¥H¤Î fdisk  ¦³¨Ç¼vÅT.

©³¤U¬O¹ï©Ò¦³¬ÛÃö²Ó¸`§ó¸Ô²Óªº´y­z¡Dª`·N, §Ú¨Ï¥Î 2.0.8  ª©®Ö¤ß­ì©lµ{¦¡°µ¬°°Ñ¦Ò¡D¨ä¥¦ªºª©¥»¥i¯à¦³¤@ÂIÂI¥X¤J¡D






\section{±Ò°Ê}

·í¨t²Î±Ò°Ê®É,  BIOS ±q²Ä¤@­ÓºÏºÐ(©Î±q³nºÐ)Åª¨úºÏ°Ï 0 (¤@¯ë³qºÙªº MBR - Master Boot Record, ¥D±Ò°ÊºÏ°Ï)¨Ã¸õ¦Ü¦b¸Ó³Bªºµ{¦¡½X - ³q±`¬O¤@¨Ç±Ò°Ê¸ü¤Jµ{¦¡(bootstrap loader)¡D
³o¨Ç¤p¤pªº±Ò°Êµ{¦¡¤@¯ë¤£·|¦³¦Û¤vªººÏºÐÅX°Êµ{¦¡¦Ó·|¨Ï¥Î BIOS ©Ò´£¨ÑªºªA°È¡D³o·N¿×µÛ¥u¦³¾ã­Ó Linux ®Ö¤ß³£¦ì©ó¶}ÀYªº 1024 ­ÓºÏÁL¤º®É¤~¯à°÷³Q±Ò°Ê¡D

³o­Ó°ÝÃD«Ü®e©ö¸Ñ¨M: ½T©w®Ö¤ß(¤]³\ÁÙ¥]¬A¨ä¥¦±Ò°Ê®É¥Î¨ìªºÀÉ®×,  ¹³¬O LILO map ÀÉ) ¬O©ñ¦b¤@­Ó BIOS ¥i¥H¦s¨úªº¨ì, ¥þ³£¦b¶}ÀYªº  1024 ­ÓºÏÁL¤ºªº¤À³Î°Ï¸Ì -  ³o¥i¥H(¥i¯à)¬O²Ä¤@­Ó©Î²Ä¤G­ÓºÏºÐ¡D

¥t¤@ÂI¬O±Ò°Ê¸ü¤Jµ{¦¡»P BIOS ¥²¶·¦P·N©¼¦¹¹ïºÏºÐÅÞ¿è(geometry)¤Wªº¬Ýªk¡D
µ¹ LILO `{\ttfamily linear}' ³o­Ó¿ï¶µ°Ñ¼Æ¥i¯à·|¦³¨ÇÀ°§U¡D²Ó¸`«á­z¡D






\section{ºÏºÐ geometry ¥H¤Î¤À³Î°Ï}

¦pªG§AªººÏºÐ¤W¦³¦n´XºØ§@·~¨t²Î, ¨C¤@ºØ¨Ï¥Î¤@­Ó©Î¦h­Ó¤À³Î°Ï¡D¨º»ò¹ï©ó¤À³Î°Ï¦ì©ó¦ó³B¤£¦Pªº¬Ýªk¥i¯à¾É­P¨aÃø©Êªº«áªG¡D

MBR ¤¤¥]§t¤@­Ó¤À³Îªí´y­z{\itshape ¤À³Î°Ï\/}(¥D¤À³Î°Ï: primary) ¦b¨º¸Ì¡D¦³¥|­Óªí®æµ¹¥|­Ó¥D­n¤À³Î°Ï¨Ï¥Î, ¥¦­Ì¬Ý°_¨Ó¹³
\begin{tscreen}
\begin{verbatim}
struct partition {
        char active;    /* 0x80: bootable, 0: not bootable */
        char begin[3];  /* CHS for first sector */
        char type;
        char end[3];    /* CHS for last sector */
        int start;      /* 32 bit sector number (counting from 0) */
        int length;     /* 32 bit number of sectors */
};
\end{verbatim}
\end{tscreen}

(¨ä¤¤ CHS ¬OºÏÁL¡þºÏÀY¡þºÏ°Ï: Cylinder/Head/Sector ªºÁY¼g)

¦]¦¹, ¦³¶µ¸ê°T¬O­«ÂÐªº: ¤À³Î°Ïªº¦ì¸m¥i¥H¥Ñ 24 ¦ì¤¸ªº {\ttfamily begin} ¥H¤Î {\ttfamily end} Äæ¦ì, ©M 32 ¦ì¤¸ªº {\ttfamily start} ¥H¤Î {\ttfamily length} Äæ¦ìµ¹©w¡D

Linux ¥u¨Ï¥Î {\ttfamily start} ¥H¤Î {\ttfamily length} Äæ¦ì, ¬G³Ì¦h¥i¥H³B²z¥]§t 2\^{}32 ­ÓºÏ°Ïªº¤À³Î°Ï, ¤]´N¬O, ³Ì¤j 2 TB ªº¤À³Î°Ï¡D³o¬O²{¤µºÏºÐ¾÷ªº¨â¦Ê­¿, ©Ò¥H¤]³\¨¬°÷©¹«á¤Q¦~ªº»Ý¨D¡D

¤£©¯ªº¬O, BIOS INT13  ©I¥s¨Ï¥Î¤T­Ó¦ì¤¸²Õªº CHS  ½s½X,  10 ­Ó¦ì¤¸§@¬°ºÏÁL¸¹½X, 8 ­Ó¦ì¤¸§@¬°ºÏÀY¸¹½X, ¤Î 6  ­Ó¦ì¤¸§@¬°ºÏ­y¤WªººÏ°Ï¸¹½X¡D
¥i¯àªººÏÁL¸¹½X¬O 0-1023,  ¥i¯àªººÏÀY¸¹½X¬O 0-255, ¦ÓºÏ­y¤W¥i¯àªººÏ°Ï¸¹½X¬° 1-63(¬Oªº, ºÏ­y¤WªººÏ°Ï¬O¥Ñ 1 °_ºâ, ¤£¬O 0)¡D
¥H³o 24 ¦ì¤¸³Ì¦h¥i¥H©w§} 8455716864 ­Ó¦ì¤¸²Õ(7.875 GB), ³o¬O 1983 ¦~ºÏºÐ¾÷ªº¨â¦Ê­¿¡D

§ó¤£©¯ªº¬O, ¼Ð·Çªº IDE  ¤¶­±®e³\ 256  ­ÓºÏ°Ï¡þºÏ­y, 65536 ­ÓºÏÁL¥H¤Î 16 ­ÓºÏÀY¡D¥¦¦Û¤v¥»¨­¥i¥H¦s¨ú 2\^{}37 = 137438953472  ­Ó¦ì¤¸²Õ(128 GB), ¦ý¬O¥[¤W BIOS ¤è­± 63 ­ÓºÏ°Ï»P 1024 ­ÓºÏÁLªº­­¨î«á¥u³Ñ 528482304 ­Ó¦ì¤¸²Õ(504 MB)¥i¥H©w§}ªº¨ì¡D

³o¤£¨¬¥HÀ³¥I²{¤µªººÏºÐ, ¤H­Ì¨Ï¥Î¦UºØµwÅé©Î³nÅé¤Wªº¤èªk¨Ó§JªA¡D






\section{Âà´«»PºÏºÐºÞ²zµ{¦¡}

¨S¦³¤H¹ïºÏºÐªº'¯u¹ê' geometry ¦³¿³½ì¡DºÏ­yªººÏ°Ï¼Æ³q±`¬OÅÜ°Êªº - ±µªñºÏºÐ¥~³òªººÏ­y¦³¤ñ¸û¦hªººÏ°Ï -  ©Ò¥H¨S¦³'¯u¹ê'ªº¨CºÏ­yºÏ°Ï¼Æ¡D
¹ï©ó¨Ï¥ÎªÌ¦Ó¨¥³Ì¦n¬O§âºÏºÐ·í§@½s¸¹ 0,1,..., ªººÏ°Ï²Õ¦X¦¨ªº½u©Ê°}¦C, Åý±±¨î¾¹¥h§ä¥XºÏ°Ï¨s³º¦ì©óºÏºÐªº¨º¸Ì¡D

¦¹½u©Ê½s¸¹¤@¯ë³qºÙ¬° LBA¡D¹ï©ó geometry ¬° (C,H,S)  ªººÏºÐ¦Ó¨¥ÄÝ(c,h,s) ªº½u©Ê¦ì§}¬° c*H*S+h*S+(s-1)¡D©Ò¦³ SCSI ±±¨î¾¹³£¨Ï¥Î LBA, ¬Y¨Ç IDE  ±±¨î¾¹¤]¬O¡D

¦pªG BIOS §â³o 24 ­Ó¦ì¤¸(c,h,s) Âà´«¦¨ LBA  ¨ÃÁýµ¹À´±o LBA  ªº±±¨î¾¹, ¨º»ò¤S¥i¥H©w§}¨ì 7.875 GB ¡D¨Ã¤£¨¬¥HÀ³¥I©Ò¦³ªººÏºÐ, ¦ý¤´µM¬O­Ó§ï¶i¡Dª`·N¦¹³B BIOS ¨Ï¥Îªº CHS, ¥¦¤£¦A»P'¹êÅé'¦³¥ô¦óÃö«Y¡D

·í±±¨î¾¹¤£À´¦ó¬° LBA  ¦ý¬O BIOS ª¾¹D¦p¦óÂà´«®É¦³¨ÇÃþ¦üªº¤èªk¥i¦æ¡D(¦b BIOS ³]©w¤¤³q±`ºÙ¬° 'Large'¡D)²{¦b BIOS ±N§e²{ geometry ¬°(C',H',S')µ¹§@·~¨t²Î, ¦Ó¦b»PºÏºÐ±±¨î¾¹·¾³q®É«h¨Ï¥Î(C,H,S)¡D
³q±` S=S', C'=C/N  ¦Ó H'=H*N,  ¨ä¤¤ N  ¬O½T«O C'{$<$}=1024 ¤§ 2  ªº³Ì¤p¦¸¤è(©Ò¥H C'=C/N ®É±Ë¥hªº¼Æ®ö¶O¤Ö³\®e¶q)¡D¦A¤@¦¸, ³o¤¹³\¦s¨ú³Ì¦h¹F 7.875 GB¡D

¦pªG BIOS ¤£ª¾¹D 'Large'  ©Î¬O 'LBA', ¨º»òÁÙ¬O¦³³nÅéªº¸Ñ¨M¤è®×¡D¹³¬O OnTracker  ©Î EZ-Drive ³o¨Ç­ÓºÏºÐºÞ²zµ{¦¡·|¥H¥¦­Ì¦Û¤vªº¨ç¦¡(routines)´À´«±¼ BIOS ªº¡D
³q±`³o¬OÂÇ¥Ñ±NºÏºÐºÞ²zµ{¦¡©ñ¦b MBR  ¤Î¨ä«á´X­ÓºÏ°Ï(OnTrack ºÙ³o¨Çµ{¦¡½X¬° DDO: Dynamic Drive Overlay )¨Ó¹F¦¨ªº, ©Ò¥H¥¦·|¦b¥ô¦ó¨ä¥¦§@·~¨t²Î¤§«e³Q±Ò°Ê¡D
³o¤]´N¬O¬°¤°»ò¦b¦w¸ËºÏºÐºÞ²zµ{¦¡«á±q³nºÐ±Ò°Ê¥i¯à·|¥X°ÝÃD¡D

³o¼vÅT¥i¯à¦h©ó©Î¤Ö©ó BIOS Âà´« -  ¦ý¯S§O¬O¦b¬Û¦PªººÏºÐ¤W¶]¼ÆºØ¤£¦Pªº§@·~¨t²Î®É, ºÏºÐºÞ²zµ{¦¡¥i¯à¤Þ°_³\¦h°ÝÃD¡D

Linux ±q 1.3.14 ª©¶}©l¤ä´© OnTrack  ºÏºÐºÞ²zµ{¦¡, ±q 1.3.29 ¶}©l
¤ä´© EZ-Drive ¡D¤U­±¦³¨Ç§ó¶i¤@¨Bªº¸ê°T¡D






\section{®Ö¤ßªº IDE ºÏºÐÂà´«}

¦pªG Linux  °»´ú¨ì IDE  ºÏºÐ¤W¦³¬Y¨ÇºÏºÐºÞ²zµ{¦¡¦s¦b, ¥¦±N·|¸ÕµÛ¨Ï¥Î»P¸ÓºÏºÐºÞ²zµ{¦¡¬Û¦Pªº¤è¦¡¨Ó­«·s¹ïÀ³ºÏºÐ, ©Ò¥H Linux  ¬Ý¨ì»P, ¨Ò¦p DOS  °t¦X OnTrack  ©Î¬O EZ-Drive ¬Û¦PªººÏºÐ¤À³Î¡D
µM¦Ó, ·í§A¦b«ü¥O¦C¤W«ü©w geometry ®É, ´N¤£·|°µ¥ô¦óªº­«·s¹ïÀ³ -  ©Ò¥H¤@¦æ `{\ttfamily hd=}{\itshape cyls\/}{\ttfamily ,}{\itshape heads\/}{\ttfamily ,}{\itshape secs\/}' «ü¥O¦C¿ï¶µ¥i¯à¨ú®ø±¼»PºÏºÐºÞ²zµ{¦¡ªº¬Û®e¡D

¦¹­«·s¹ïÀ³ªº¤è¦¡¬O¹Á¸Õ 4,8,16,32,64,128,255 ºÏÀY¼Æ(H*C «O«ù¤£ÅÜ)ª½¨ì C $<$= 1024  ©Î¬O H = 255¡D

²Ó¸`¦p¤U -  ¤p¸`ªº©ïÀY¬O¥X²{¦b¬Û¹ïÀ³¤§±Ò°Ê°T®§¸Ìªº¦r¦ê¡D¦b¦¹¥H¤Î¦b³o¥÷¤å¥ó¥ô¦ó¨ä¥¦¦a¤è¤¤¤À³Îªº«¬ºA³£¥H¤Q¤»¶i¦ì¼Æ¦rªí¥Ü¡D




\subsection{EZD}

°»´ú¨ì EZ-Drive , ¦]¬°²Ä¤@­Ó¥D­n¤À³Î°Ï«¬ºA¬° 55 ¡D¦p¤W­z­«·s¹ïÀ³ geometry, ¥B©¿²¤±q²Ä 0  ºÏ°ÏÅª¤Jªº¤À³Îªí -  ¥H²Ä 1  ºÏ°Ïªº¤À³Îªí¨ú¥N¡DºÏºÐªº°Ï¶ô¸¹½X(block numbers) ¨S¦³§ïÅÜ, ¦ý¹ïºÏ°Ï 0  ªº¼g¤J·|Âà¦VºÏ°Ï 1¡D¦¹°Ê§@¥i¥HÂÇ¥Ñ­×§ï¦b {\itshape ide.c\/} ¤¤ªº
\begin{tscreen}
{\ttfamily  \#define FAKE\_FDISK\_FOR\_EZDRIVE  0 }
\end{tscreen}

¨Ã­«·s½sÄ¶®Ö¤ß¨Ó§ïÅÜ¡D




\subsection{DM6:DDO}

°»´ú¨ì OnTrack DiskManager(¦b²Ä¤@­ÓºÏºÐ¤W), ¦]¬°²Ä¤@­Ó¥D­n¤À³Î°Ï«¬ºA¬° 54 ¡D¦p¤W­z­«·s¹ïÀ³ geometry ¦Ó¥B¾ã­ÓºÏºÐ¥­²¾ 63 ­ÓºÏ°Ï¡D
(©Ò¥HÂÂªººÏ°Ï 63 ÅÜ¦¨ºÏ°Ï 0)µM«á±q·sªº²Ä 0  ºÏ°ÏÅª¤J·sªº MBR (»P¤À³Îªí)¡D¦¹¥­²¾·íµM¬O¬° DDO ¯dªÅ¶¡ -  ³o¤]´N¬O¬°¤°»ò¨ä¥¦ºÏºÐ¤£¥²¥­²¾¡D




\subsection{DM6:AUX}

°»´ú¨ì OnTrack DiskManager(¦b¨ä¥¦ºÏºÐ¤W), ¦]¬°²Ä¤@­Ó¥D­n¤À³Î°Ï«¬ºA¬° 51 ©Î 53¡D¦p¤W­z­«·s¹ïÀ³ geometry ¡D




\subsection{DM6:MBR}

°»´ú¨ì¬YÂÂª©ªº OnTrack DiskManager, ¨Ã«DÂÇ¥Ñ¤À³Î°Ï«¬ºA, ¦Ó¬OÃ±¦W(signature)¡D(´ú¸Õ¦b MBR  ¸Ì²Ä 2,3  ¦ì¤¸²Õªº°¾²¾­È¬O§_¤£¤j©ó 430, ¦Ó¥B¦b¦¹°¾²¾¦ì§}§ä¨ìªº short µ¥©ó 0x55AA, «á­±¨Ã¸òµÛ¤@­Ó©_¼Æªº¦ì¤¸²Õ) ¦A¤@¦¸¦p¤W­z­«·s¹ïÀ³ geometry ¡D




\subsection{PTBL}

³Ì«á, ®Ö¤ß·|¹Á¸Õ±q¥D¤À³Î°Ïªº {\ttfamily start} ¥H¤Î {\ttfamily end} ­È±ÀÂ_Âà´«¤è¦¡: ­Y¬Y¨Ç¤À³Î°Ïªº {\ttfamily start} ¥H¤Î {\ttfamily end} ºÏÁL¤p©ó 256, ¦Ó¥B {\ttfamily start} ¥H¤Î {\ttfamily end} ºÏ°Ï¸¹½X¤À§O¬° 1  ©M 63 , ¦Ó¥B end  ºÏÀY¬° 31, 63,  ©Î 127, ¨º»ò, ¦]¬°¨ÌºD¨Ò¤À³Î°Ï·|¦bºÏÁLÃä¬Éµ²§ô, ¦Ó¥B§ó¦]¬° IDE  ¤¶­±³Ì¦h¨Ï¥Î 16  ­ÓºÏÀY, ¬G±À´ú¦³¶}±Ò BIOS Âà´«, ¤À§O¨Ï¥Î 32, 64 ©Î 128  ºÏÀY¼Æ­«·s¹ïÀ³ geometry¡D
(¤]³\³o¸Ì¦³ÂI·å²«,  {\itshape genhd.c\/} ¤£À³¸Ó´ú¸ÕºÏÁL¸¹½X«e¨â­Ó¦ì¤¸¶Ü?)µL½×¦p¦ó, ·í¥Ø«eªº geometry ¤w¸g¬°¨CºÏ­y 63 ­ÓºÏ°Ï¥B¦Ü¤Ö³o»ò¦hºÏÀY®É, ¤£·|°µ­«·s¹ïÀ³ (¦]¬°³o¥i¯à·N¿×µÛ­«¹ïÀ³¤w§¹¦¨)¡D




\section{µ²½×}

³o¨ì©³·N¿×µÛ¤°»ò? ¹ï Linux  ªº¨Ï¥ÎªÌ¦Ó¨¥¥u¦³¤@¥ó¨Æ: ´N¬O¥L­Ì¥²¶·±o½T«O LILO ¥H¤Î fdisk  ¨Ï¥Î¥¿½Tªº geometry , ¨ä¤¤'¥¿½T'ªº©w¸q¹ï fdisk ¦Ó¨¥¬O»P¨ä¥¦¦b¦P¤@­ÓºÏºÐ¤Wªº§@·~¨t²Î©Ò¨Ï¥Îªº geometry ¬Û¦P, ¦Ó¹ï LILO ¦Ó¨¥¬O¯à°÷¦b±Ò°Ê®É´Á¦¨¥\¦a»P BIOS ¥æ½Íªº geometry¡D(³o¨âªÌ³q±`¬Û²Å¡D)

fdisk ¦p¦ó±oª¾¸Ó geometry ? ¥¦¸ß°Ý®Ö¤ß, ¨Ï¥Î {\ttfamily HDIO\_GETGEO} ioctl¡D¦ý¨Ï¥ÎªÌ¥i¥H¥æ½Í¦¡¦a©Î¦b«ü¥O¦C¤W­«©w geometry¡D

LILO  ¦p¦ó±oª¾¸Ó geometry ? ¥¦¸ß°Ý®Ö¤ß, ¨Ï¥Î {\ttfamily HDIO\_GETGEO} ioctl¡D
¦ý¨Ï¥ÎªÌ¥i¥H¥Î `{\ttfamily disk=}' ¿ï¶µ­«©w¡D¤]¥i¥Hµ¹ LILO ¤@­Ó {\ttfamily linear} ¿ï¶µ, ¦p¦¹¥¦±N¦b¨ä map  ÀÉ¤¤Àx¦s LBA  ¦ì§}¥H¨ú¥N CHS  ¦ì§}, ¨Ã¥B¦b±Ò°Ê®É´Á§ä¥X¸Ó geometry ¨Ó¨Ï¥Î(ÂÇ¥Ñ INT 13 ¥\¯à©I¥s 8 ¨Ó¸ß°ÝºÏºÐªº geometry)¡D

®Ö¤ß¦p¦óª¾¹D¸Ó«ç»ò¦^µª? ­º¥ý, ¨Ï¥ÎªÌ¥i¯à¥H `{\ttfamily hd=}{\itshape cyls\/}{\ttfamily ,}{\itshape heads\/}{\ttfamily ,}{\itshape secs\/}' «ü¥O¦C¿ï¶µ©ú½T¦a«ü©w geometry, §_«h®Ö¤ß±N¸ß°ÝµwÅé¡D




\subsection{IDE ²Ó¸`}

Åý§Ú¸Ô²Ó»¡©ú¡DIDE ÅX°Êµ{¦¡¦³¥|­ÓÃö©ó geometry ªº¸ê°T¨Ó·½¡D²Ä¤@­Ó(G\_user)¬O¨Ï¥ÎªÌ¦b«ü¥O¦C¤W©Ò«ü©wªº¡D
²Ä¤G­Ó(G\_bios)¬O BIOS ªº©T©wºÏºÐ°Ñ¼Æªí(¥u¥Î©ó²Ä¤@¤Î²Ä¤G­ÓºÏºÐ), ¦b¨t²Î±Ò°Ê®É, ¤Á´«¦Ü 32 ¦ì¤¸¼Ò¦¡¤§«eÅª¤J¡D
²Ä¤T­Ó(G\_phys)¤Î²Ä¥|­Ó(G\_log) ¬O¥Ñ IDE  ±±¨î¾¹¶Ç¦^, §@¬°¹ï IDENTIFY «ü¥Oªº¦^À³ -  ¥¦­Ì¬O '¹êÅéªº' ¥H¤Î '¥Ø«eÅÞ¿è¤Wªº' geometries¡D

¥t¤@¤è­±, ¹ï©ó geometry ÅX°Êµ{¦¡»Ý­n¨â­Ó­È: ¨ä¤¤¤§¤@¬O G\_fdisk, ¥Ñ {\ttfamily HDIO\_GETGEO} ioctl  ¶Ç¦^, ¥t¤@­Ó¬O G\_used , ³o¬O°õ¦æ¿é¥X¡þ¤J®É¹ê»Ú¨Ï¥Îªº¡D
¦pªGµ¹©w G\_user «h G-fdisk  ¥H¤Î G\_used ¨âªÌ³£·|³]¬° G\_user, ·í¦¹¸ê°T¬O®Ú¾Ú CMOS ©Ò´£¨Ñ®É«h³]¬° G\_bios , ¨ä¥¦±¡§Î³]¬° G\_phys¡D¦pªG G\_log  ¬Ý°_¨Ó¦X²z«h G\_used ´N³]¬° G\_log¡D
¤£µM, ¦pªG G\_used  ¤£¦X²z¦Ó G\_phys ¬Ý°_¨Ó¦X²z¨º»ò G\_used ´N³]¬° G\_phys¡D¦¹³Bªº'¦X²z'¥NªíºÏÀY¼Æ¦b 1-16 ªº½d³ò¤º¡D

´«­Ó¤è¦¡»¡: «ü¥O¦C¿ï¶µ¤j©ó BIOS , ¨Ã¥B¨M©w fdisk  ¬Ý¨ìªº¼Ë¤l, ¦ý¦pªG¥¦«ü©wÂà´«ªº geometry(ºÏÀY¼Æ¤j©ó 16),  «h®Ö¤ß·|ÂÇ¥Ñ IDENTIFY «ü¥Oªº¿é¥X­«©w¥¦¡D




\subsection{SCSI ²Ó¸`}

¦b SCSI ¤è­±±¡ªp¦³¤@ÂIÂI¤£¦P, ¦]¬° SCSI «ü¥O¤w¸g¨Ï¥ÎÅÞ¿è°Ï¶ô¸¹½X, ©Ò¥H 'geometry' ¹ï¹ê»Úªº¿é¥X¡þ¤J§¹¥þ¨SÃö«Y¡D
µM¦Ó, ¤À³Î°Ïªº®æ¦¡¤´µM¬O¬Û¦Pªº, ©Ò¥H fdisk  ¥²¶·±o®º³y¨Ç geometry , ¨Ã¥B¤]¦b¦¹¨Ï¥Î {\ttfamily HDIO\_GETGEO} - ¯uªº, fdisk ¤£·|¤À¿ë IDE  ¥H¤Î SCSI ºÏºÐ¡D
§A¥i¥H±q¤U­±ªº¸Ô²Ó´y­z¨£¨ì¦UºØÅX°Êµ{¦¡®º³y¤@¨Ç­Ó¤£¦Pªº geometry ¡D¯u¬O, ¤@¹Î²V¶Ã¡D

¦pªG§A¨S¦³¨Ï¥Î DOS  ©Î³oÃþ¨t²Î, ¨º»òÁ×§K¨Ï¥Î©Ò¦³ÃB¥~ªºÂà´«³]©w, ¥i¯àªº¸Ü, ¾¨ºÞ¨Ï¥Î 64 ºÏÀY, ¨CºÏ­y 32 ºÏ°Ï (¨}¦nªº, ¤è«K¨CºÏÁL 1 MB), ¦p¦¹·í§A§âºÏºÐ±q¤@­Ó±±¨î¾¹´«¨ì¥t¤@­Ó¥h®É¤£·|¹J¨ì¥ô¦ó°ÝÃD¡D
¬Y¨Ç SCSI ºÏºÐÅX°Êµ{¦¡ (aha152x,pas16,ppa,qlogicfas,qlogicisp)«D±`¦b·N»P DOS  ªº¬Û®e©Ê¦Ó¤£¤¹³\¥u¦³ Linux  ªº¨t²Î¨Ï¥Î¶W¹L  8 GB ªº®e¶q, ³o¬O°¦¯äÂÎ¡D

¯u¹êªº geometry ¬O¤°»ò? ³ÌÂ²³æªºµª®×¬O¨S¦³³oºØªF¦è¡D¦pªG¯u¦³ªº¸Ü, §A¤£·|·Qª¾¹D, ¦Ó¥Bªºªº½T½T±q¤£, ¥Ã¤£»Ý§i¶D fdisk  ©Î¬O LILO ©Î®Ö¤ß¦³Ãö¥¦ªº¨Æ¡D³oµ´¹ï¬O SCSI ±±¨î¾¹»PºÏºÐ¤§¶¡ªº¨Æ¡D
Åý§Ú­«ÂÐ³o¥y¸Ü: ¥u¦³Äø³J·|§i¶D fdisk/LILO/Kernel SCSI ºÏºÐ¯u¹êªº geometry ¡D

¦ý¦pªG§A¦n¾Ç¥B°í«ù, ¥i¥H°ÝºÏºÐ¾÷¦Û¤v¡D¦³­Ó­«­n«ü¥O READ CAPACITY ±N·|¶Ç¦^ºÏºÐªºÁ`®e¶q, ¦Ó¥B¦³­Ó MODE SENSE «ü¥O  Rigid Disk Drive Page(page 04) ·|¶Ç¦^ºÏÁL¥H¤ÎºÏÀYªº¼Æ¥Ø(³o¬O¤£¯à§ïÅÜªº¸ê°T), ¦Ó¦b Format Page(page 03)¦³¨CºÏ°Ïªº¦ì¤¸²Õ, ¥H¤Î¨CºÏ­yªººÏ°Ï¼Æ¡D
³o¼Æ¦r¤@¯ë»P notch  ¦³Ãö, ¦Ó¥B¨CºÏ­yªººÏ°Ï¼Æ¬OÅÜ°Êªº -  ¥~³òªººÏ­y¾Ö¦³¤ñ¤º°éºÏ­y¦hªººÏ°Ï¡DLinux µ{¦¡ scsiinfo ·|µ¹¤©³o¶µ¸ê°T¡D
¨ä¤¤¦³³\¦hÁcº¾ªº²Ó¸`, ¦Ó¥B«Ü©ú¥Õªº, ¨S¦³¤H(¤]³\¬Æ¦Ü¬O§@·~¨t²Î)»Ý­n¨Ï¥Î³o¶µ¸ê°T¡D
ÁÙ¦³, ¦]¬°§Ú­Ì¥uÃö¤ß fdisk  ¥H¤Î LILO , ¤@¯ë±o¨ìªº¦^µª¹³ C/H/S=4476/27/171 - ³o¼Ëªº­È fdisk  ®Ú¥»¤£¯à¨Ï¥Î, ¦]¬°¤À³Îªí¥u«O¯d 10resp. 8resp. 6 bits  µ¹ C/H/S¡D

¨º®Ö¤ß¤§ {\ttfamily HDIO\_GETGEO} ±q¦ó³B¨ú±o¨ä¸ê°T? ¶â, ¤£¬O±q SCSI ±±¨î¾¹, ´N¬O±À½×²q´ú¡D
¦³¨ÇÅX°Êµ{¦¡¦ü¥G»{¬°§Ú­Ì·Qª¾¹D '¯u¬Û' , ¦ý§Ú­Ì·íµM¥u·Qª¾¹D DOS  ©Î OS/2 FDISK (©Î Adaptec AFDISK µ¥µ¥)©Ò¥Îªº¡D

ª`·N, Linux fdisk »Ý­nºÏÀY¼Æ H  ¥H¤Î¨CºÏ­yºÏ°Ï¼Æ S  ¥H«KÂà´« LBA ºÏ°Ï¸¹½X¦¨¬° c/h/s  ¦ì§}, ¦ýºÏÁL¼Æ C  ¦b¦¹Âà´«¤¤¨Ã¥¼§êºt¤°»ò¨¤¦â¡D
¦³¨ÇÅX°Êµ{¦¡¨Ï¥Î (C,H,S) = (1023,255,63)  ¨Óªí¥ÜºÏºÐ®e¶q¦Ü¤Ö¬° 1023*255*63 ­ÓºÏ°Ï¡D³o¬O¤£©¯ªº, ¦]¬°³o¤£¯àÅã¥Ü¹ê»Úªº¤j¤p, ¦Ó¥B±N­­¨î¤j³¡¥÷ª©¥»¤§ fdisk  ªº¨Ï¥ÎªÌ¨äºÏºÐ³Ì¤j¨ì 8 GB - ²{¤µ¹ê»Úªº­­¨î¡D

¦b¤U­±ªº´y­z¤¤, M ªí¥ÜºÏºÐªº¥þ³¡®e¶q, ¦Ó C,H,S  ¬OºÏÁL, ºÏÀY¥H¤Î¨CºÏ­yºÏ°Ï¼Æ¡D¦pªG§Ú­Ì§â C  ·í§@ M/(H*S) ¨ºµ¹ H,S ´N¥i¥Hº¡¨¬¡D

¨Ì¹w³], H=64, S=32.

\begin{description}
\item[aha1740, dtc, g\_NCR5380, t128, wd7000:] \mbox{}

H=64, S=32.



\item[aha152x, pas16, ppa, qlogicfas, qlogicisp:] \mbox{}

H=64, S=32 °£«D C {$>$} 1024, ¦¹±¡ªp¤U H=255, S=63, C = min(1023, M/(H*S)).
(¬G C ³QºIÂ_, ¥B H*S*C ¤£¬OºÏºÐ®e¶qªºªñ¦ü­È. ³o±N·|²V·n²c¤j³¡¥÷ª©¥»ªº fdisk.)
{\itshape ppa.c\/} µ{¦¡½X¨Ï¥Î M+1 ¨ú¥N M ¨Ã»{¬°³o¬O¦]¬°¦b {\itshape sd.c\/} ¸Ìªº¤@°¦¯äÂÎ¨Ï M ªº­È¤Ö¤@¡D



\item[advansys:] \mbox{}

H=64, S=32 °£«D C $>$ 1024 ¦Ó¥BÁÙ¶}±Ò BIOS ¤¤ªº `$>$ 1 GB' ¿ï¶µ, ¦¹±¡ªp¤U
H=255, S=63.



\item[aha1542:] \mbox{}

¸ß°Ý±±¨î¾¹¨Ï¥Î¨âºØ¥i¯àªº schemes ¤¤ªº¨º¤@ºØ, ¨Ã¥B¨Ï¥Î H=255, S=63 ©Î
H=64, S=32. «eªÌ¦³­Ó±Ò°Ê°T®§ "aha1542.c: Using extended bios translation".



\item[aic7xxx:] \mbox{}

H=64, S=32 °£«D C $>$ 1024, ¦Ó¥BÁÙµ¹¤F "extended" ±Ò°Ê°Ñ¼Æ, ©Î¦b SEEPROM ©Î BIOS
³]¤F `extended' ¦ì¤¸, ¦¹±¡ªp¤U H=255, S=63.



\item[buslogic:] \mbox{}

H=64, S=32 °£«D C $>$= 1024, ¦Ó¥BÁÙ±Ò°Ê±±¨î¾¹ªºÂX¥RÂà´«, ¦¹±¡ªp¤U­Y M $<$
2\^{}22 «h H=128, S=32; §_«h H=255, S=63. µM¦Ó, ¿ï¾Ü (C,H,S) ¤§«á, Åª¤J¤À³Îªí,
­Y¤TºØ¥i¯àªº (H,S) = (64,32), (128,32), (255,63) ¤¤ endH=H-1
ªº­È¬Ý¨Ó¥i¦æ«h¨Ï¥Î¸Ó¹ï (H,S) , ¨Ã¦L¥X±Ò°Ê°T®§ "Adopting Geometry from Partition Table".



\item[fdomain:] \mbox{}

±q BIOS Drive Parameter Table §ä¥X geometry ¸ê°T, ©Î±q¤À³ÎªíÅª¨ú¨Ã¨Ï¥Î H=endH+1,
S=endS µ¹²Ä¤@­Ó¤À³Î°Ï, ­Y«DªÅ, ©Î¨Ï¥Î H=64, S=32 for M $<$ 2\^{}21 (1 GB), H=128, S=63 for M $<$
63*2\^{}17 (3.9 GB) and H=255, S=63 otherwise.



\item[in2000:] \mbox{}

¨Ï¥Î (H,S) = (64,32), (64,63), (128,63), (255,63) ¤¤²Ä¤@­ÓÅý C $<$= 1024 ªº.
¦¹±¡ªp¤U, ¦b 1023 ºI±¼ C .



\item[seagate:] \mbox{}

±qºÏºÐÅª¨ú C,H,S. (¯u¸Û¹ê!) ¦pªG C ©Î S ¤Ó¤j, ©ñ¤J S=17, H=2 ¨Ã­¿¼W H ª½¨ì
C $<$= 1024. ³oªí¥Ü H ±N¬° 0 ¦pªG M $>$ 128*1024*17 (1.1 GB). ³o¬O°¦¯äÂÎ.



\item[ultrastor and u14\_34f:] \mbox{}

¤TºØ¹ïÀ³¤§¤@ ((H,S) = (16,63), (64,32), (64,63)) ®Ú¾Ú±±¨î¾¹ªº¹ïÀ³¼Ò¦¡¦Ó©w.



\end{description}

¦pªGÅX°Êµ{¦¡¨S¦³«ü©w geometry , §Ú­Ì´N¦^¨ì¨Ï¥Î¤À³Îªí©ÎºÏºÐÁ`®e¶q¨Ó±ÀÂ_²q´ú¡D

¥J²Ó¬Ý¬Ý¤À³Îªí¡D¦]¬°¨ÌºD¨Ò¤À³Î°Ï¦bºÏÁLÃä¬Éµ²§ô, §Ú­Ì¥i¥H¬°¥ô¦ó¤À³Î°Ï©w end=(endC,endH,ednS) , ¥u­n©ñ¤J H = {\ttfamily endH+1} ¤Î S = {\ttfamily endS}¡D
(°O±oºÏ°Ï¥Ñ 1 °_ºâ¡D)§ó©ú½T¦aªº»¡¡D¦pªG¦³­Ó¤£¬OªÅªº¤À³Î°Ï, «h¥H³Ì¤jªº {\ttfamily beginC} ­p¡D
¹ï©ó¦¹¤À³Î°Ï, ¬Ý¬Ý {\ttfamily end+1}, ­pºâ¥[¤W {\ttfamily start} ¥H¤Î {\ttfamily length} ¨Ã¥B°²³]¦¹¤À³Î°Ï¦b¬YºÏÁLÃä¬Éµ²§ô¡D
¦pªG¨â­Ó­È³£¬Û²Å, ©Î {\ttfamily endC} = 1023 ¥B {\ttfamily start+length} ¬O {\ttfamily (endH+1)*endS}  ªº­¿¼Æ, ¨º»ò°²©w¦¹¤À³Î°Ï¯uªº¬O¦bºÏÁLÃä¬É, ¨Ã©ñ¤J H = {\ttfamily endH+1} ¥H¤Î S = {\ttfamily endS}¡D
¦pªG¤£¹ï, ¤£¬O¦]¬°¨S¦³¤À³Î°Ï, ´N¬O¦]¬°¥¦­Ìªº¤j¤p«Ü©_©Ç, ¨º»ò¥u¬ÝºÏºÐ®e¶q M¡D
ºtºâªk: ©ñ¤J H = M/(62*1024)(µL±ø¥ó¶i¦ì),S = M/(1024*H)(µL±ø¥ó¶i¦ì), C = M/(H*S)(µL±ø¥ó±Ë¥h)¡D³o¯à²£¥Í¤@ (C,H,S) ¨ä¤¤ C ³Ì¤j 1024 ¦Ó S ³Ì¤j 62¡D



\end{document}
