2.13 »s§@¦w¸Ë¤ù

Note: ¬°Á×§K­«Âл¡©ú¡A¦b¤å¤¤©Ò´£¨ìªº¡uFreeBSD ¥úºÐ¡v¡A ¦b³o¸Ì«üªº¬O±z©ÒÁʶR©Î¦Û¦æ¿N¿ýªº FreeBSD CDROM ©Î DVD¡C

There may be some situations in which you need to create your own FreeBSD installation media and/or source. This might be physical media, such as a tape, or a source that sysinstall can use to retrieve the files, such as a local FTP site, or an MS-DOS® partition.

For example:

2.13.1 Creating an Installation CDROM

As part of each release, the FreeBSD project makes available at least two CDROM images (¡§ISO images¡¨) per supported architecture. These images can be written (¡§burned¡¨) to CDs if you have a CD writer, and then used to install FreeBSD. If you have a CD writer, and bandwidth is cheap, then this is the easiest way to install FreeBSD.

  1. Download the Correct ISO Images

    The ISO images for each release can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/ISO-IMAGES-arch/version or the closest mirror. Substitute arch and version as appropriate.

    That directory will normally contain the following images:

    Table 2-4. FreeBSD 5.X and 6.X ISO Image Names and Meanings

    ÀɦW ¤º®e
    ª©¥»-RELEASE-¬[ºc-bootonly.iso Everything you need to boot into a FreeBSD kernel and start the installation interface. The installable files have to be pulled over FTP or some other supported source.
    ª©¥»-RELEASE-¬[ºc-disc1.iso Everything you need to install FreeBSD and a ¡§live filesystem¡¨, which is used in conjunction with the ¡§Repair¡¨ facility in sysinstall.
    ª©¥»-RELEASE-¬[ºc-disc2.iso FreeBSD ¤å¥ó(FreeBSD 6.2 ¤§«eªº)¡A¥H¤Î³\¦h third-party packages¡C
    ª©¥»-RELEASE-¬[ºc-docs.iso FreeBSD ¤å¥ó(FreeBSD 6.2 ¤Î¤§«á)¡C

    You must download one of either the bootonly ISO image (if available), or the image of disc one. Do not download both of them, since the disc one image contains everything that the bootonly ISO image contains.

    Use the bootonly ISO if Internet access is cheap for you. It will let you install FreeBSD, and you can then install third-party packages by downloading them using the ports/packages system (see Chapter 4) as necessary.

    Use the image of disc one if you want to install a FreeBSD release and want a reasonable selection of third-party packages on the disc as well.

    The additional disc images are useful, but not essential, especially if you have high-speed access to the Internet.

  2. Write the CDs

    You must then write the CD images to disc. If you will be doing this on another FreeBSD system then see Section 18.6 for more information (in particular, Section 18.6.3 and Section 18.6.4).

    If you will be doing this on another platform then you will need to use whatever utilities exist to control your CD writer on that platform. The images provided are in the standard ISO format, which many CD writing applications support.

Note: If you are interested in building a customized release of FreeBSD, please see the Release Engineering Article.

2.13.2 Creating a Local FTP Site with a FreeBSD Disc

FreeBSD discs are laid out in the same way as the FTP site. This makes it very easy for you to create a local FTP site that can be used by other machines on your network when installing FreeBSD.

  1. On the FreeBSD computer that will host the FTP site, ensure that the CDROM is in the drive, and mounted on /cdrom.

    # mount /cdrom
    
  2. Create an account for anonymous FTP in /etc/passwd. Do this by editing /etc/passwd using vipw(8) and adding this line:

    ftp:*:99:99::0:0:FTP:/cdrom:/nonexistent
    
  3. Ensure that the FTP service is enabled in /etc/inetd.conf.

Anyone with network connectivity to your machine can now chose a media type of FTP and type in ftp://your machine after picking ¡§Other¡¨ in the FTP sites menu during the install.

Note: If the boot media (floppy disks, usually) for your FTP clients is not precisely the same version as that provided by the local FTP site, then sysinstall will not let you complete the installation. If the versions are not similar and you want to override this, you must go into the Options menu and change distribution name to any.

Warning: This approach is OK for a machine that is on your local network, and that is protected by your firewall. Offering up FTP services to other machines over the Internet (and not your local network) exposes your computer to the attention of crackers and other undesirables. We strongly recommend that you follow good security practices if you do this.

2.13.3 «Ø¥ß¦w¸Ë¥ÎªººÏ¤ù

­Y±z¥²¶·±qºÏ¤ù¦w¸Ë(ÁöµM§Ú­Ì¤£«ØÄ³³o¼Ë°µ)¡A ¤£½×¬O¦]¬°µwÅ餣¤ä´©©Î¬O±z°í«ù­n¥Î³o»ò¨è­Wªº¤è¦¡¡A ±z³£¥²¶·¥ý·Ç³Æ¤@¨ÇºÏ¤ù¥H¨Ñ¦w¸Ë¡C

ºÏ¤ù¦Ü¤Ö±o¬O 1.44 MB At a minimum, you will need as many 1.44 MB floppies as it takes to hold all the files in the base (base distribution) directory. If you are preparing the floppies from DOS, then they must be formatted using the MS-DOS FORMAT command. If you are using Windows, use Explorer to format the disks (right-click on the A: drive, and select ¡§Format¡¨).

Do not trust factory pre-formatted floppies. Format them again yourself, just to be sure. Many problems reported by our users in the past have resulted from the use of improperly formatted media, which is why we are making a point of it now.

If you are creating the floppies on another FreeBSD machine, a format is still not a bad idea, though you do not need to put a DOS filesystem on each floppy. You can use the disklabel and newfs commands to put a UFS filesystem on them instead, as the following sequence of commands (for a 3.5" 1.44 MB floppy) illustrates:

# fdformat -f 1440 fd0.1440
# bsdlabel -w fd0.1440 floppy3
# newfs -t 2 -u 18 -l 1 -i 65536 /dev/fd0

Then you can mount and write to them like any other filesystem.

After you have formatted the floppies, you will need to copy the files to them. The distribution files are split into chunks conveniently sized so that five of them will fit on a conventional 1.44 MB floppy. Go through all your floppies, packing as many files as will fit on each one, until you have all of the distributions you want packed up in this fashion. Each distribution should go into a subdirectory on the floppy, e.g.: a:\base\base.aa, a:\base\base.ab, and so on.

Important: The base.inf file also needs to go on the first floppy of the base set since it is read by the installation program in order to figure out how many additional pieces to look for when fetching and concatenating the distribution.

Once you come to the Media screen during the install process, select Floppy and you will be prompted for the rest.

2.13.4 ±q MS-DOS® ¤À³Î°Ï¦w¸Ë

­Y·Ç³Æ­n±q MS-DOS ¤À³Î°Ï¶i¦æ¦w¸Ë¡A ½Ð§â©Ò¦³¦w¸ËÀɳ£½Æ»s¨ì¸Ó¤À³Î°Ï®Ú¥Ø¿ý¤ºªº freebsd ¥Ø¿ý¡C ¤ñ¦p¡Gc:\freebsd¡C ¦¹¥Ø¿ýµ²ºc¥²¶·»P¥úºÐ©Î FTP ¤ºªº¥Ø¿ýµ²ºc¤@­P¡A ¦]¦¹­Y¬O­n±q¥úºÐ½Æ»sÀɮסA«ØÄ³¨Ï¥Î DOS ªº xcopy «ü¥O¡C ¨Ò¦p¡A­n½Æ»s FreeBSD ³Ì¤p¦w¸Ë©Ò»ÝªºÀɮסG

C:\> md c:\freebsd
C:\> xcopy e:\bin c:\freebsd\bin\ /s
C:\> xcopy e:\manpages c:\freebsd\manpages\ /s

°²³] C: ¼Ñ¦³¦h¾lªÅ¶¡¡A¥i¥H©ñ FreeBSD ¦w¸ËÀÉ¡FE:«h¬O¥úºÐ¾÷¥N¸¹¡C

­Y¨S¦³¥úºÐ¾÷¡A¥i¥H¨ì ftp.FreeBSD.org ¥h¤U¸ü¦w¸ËÀÉ¡C ¨C­Ó¦w¸Ë®M¥ó³£¦³¨ä¬Û¹ïÀ³ªº¥Ø¿ý¡F¤ñ¦p base ¬O©ñ¦b 9.1/base/ ¥Ø¿ý¤º¡C

½Ð±N±z­n¦w¸Ëªº®M¥ó(·íµMªÅ¶¡­n°÷)©ñ¨ì MS-DOS ¤À³Î°Ïªº c:\freebsd ¸Ì ¡X¡X ¦]¬°³o­Ó BIN ¦w¸Ë®M¥ó¶È¨Ñ³Ìºë²¦w¸Ë¦Ó¤w¡C

2.13.5 »s§@¦w¸Ë¥ÎªººÏ±a

±qºÏ±a¤W¦w¸Ë¤]³\¬O³Ì²³æªº¤è¦¡¡A¤ñ¥Î FTP ©Î¥úºÐ¦w¸ËÁÙ§Ö¡C ¦w¸Ëµ{¦¡°²³]©Ò¦³Àɮ׳£·|À£ÁY©ñ¦bºÏ±a¤W¡C ¦b¨ú±o©Ò¦³­n¸Ëªº¦w¸ËÀɤ§«á ¡A¥i¥H¥Î¤U¦C«ü¥O§â¥¦­ÌÀ£ÁY©ñ¦bºÏ±a¤W¡G

# cd /freebsd/distdir
# tar cvf /dev/rwt0 dist1 ... dist2

·í­n¦w¸Ë®É¡A¥²¶·¥ý½T»{ºÏ±aÁÙ¦³¨¬°÷ªÅ¶¡¡A ¥H«KÅý¦w¸Ë¹Lµ{¼È¦sªÅ¶¡(¥i¥H¦Û¦æ¿ï¾Ü­n©ñ¦b­þ­Ó¥Ø¿ý)¡A ¥i¥H®e¯ÇºÏ±a¦w¸Ë®Éªº¥þ³¡ÀɮסC ¥Ñ©óºÏ±a¥»¨­¨Ã¤£¯àÀH¾÷¦s¨ú¡A¦]¦¹¥ÎºÏ±a¦w¸Ë·|»Ý­n«Ü¤jªº¼È¦sªÅ¶¡¡C

Note: ¦b¨Ï¥Î¦w¸ËºÏ¤ù¶}¾÷ ¤§«e¡A ºÏ±a¤@©w­n¥ý©ñ¤JºÏ±a¾÷¤º¡A§_«h¦b°»´úµwÅé®É¥i¯à·|µLªk°»´ú¨ìºÏ±a¾÷¡C

2.13.6 Before Installing over a Network

¦³¤TºØºô¸ô¦w¸Ë¤è¦¡¡G Ethernet (¼Ð·Ç Ethernet ´¹¤ù)¡BSerial port(SLIP ©Î PPP)¡B Parallel port (PLIP (laplink cable))¡C

³z¹Lºô¸ô¦w¸Ëªº³Ì§Ö¤è¦¡¡A´N¬O¨Ï¥Î Ethernet ºô¸ô¥d¡I FreeBSD ¤ä´©¤j¦h¼Æ±`¨£ªº Ethernet ºô¸ô¥d¡F ©Ò¦³¤ä´©ªººô¸ô¥d(¤Î¨ä©Ò»Ýªº³]©w)³£¦³¦b¦Uª©¥»ªº FreeBSD ¤ºªº Hardware Note »¡©ú¤å¥ó¤º¦C¥X¡C ­Y±z©Ò¥Îªº¬O¦³¤ä´©ªº PCMCIA ºô¸ô¥d¡A ½Ð°È¥²¦b¶}¾÷¤§«e¡A¥ý§â¸Óºô¸ô¥d´¡¤W¡C ¦]¬° FreeBSD ªº¦w¸Ë¹Lµ{¡A¥Ø«e¨Ã¤£¤ä´© PCMCIA ¥dªº¼ö´¡©Þ¡C

¦¹¥~¡AÁٻݭnª¾¹D¸Ó¥Îªº IP ¦ì§}¥H¤Î¬Û¹ïÀ³ªº netmask ¬°¦ó¡A ¥H¤Î¾÷¾¹¦WºÙ¡C ­Y©Ò¥Îªº¬O PPP ³s½u¡A¦Ó¥B¨S¦³©T©w IP¡A§O¾á¤ß¡A ¦]¬°±zªº ISP ·|¦Û°Ê¤À°t IP µ¹±z¡C Ãö©ó³o¨Çºô¸ôªº²Ó³¡³]©w¡A ¥i¥H¬¢¸ß±zºô¸ôÀô¹Òªº¨t²ÎºÞ²zªÌ¡C ­Y­n¯à¥H¾÷¾¹¦WºÙ´N¯à³s¨ì¬Û¹ïÀ³ªº¾÷¾¹¡A¦Ó«Dª½±µ¨Ï¥Î IP¦ì§}¥h³s¡A ¨º»ò±zÁٻݭn DNS ¥H¤Î gateway ªº¦ì§}(­Y¥Îªº¬O PPP ³s½u¡A gateway ¦ì§}´N¬O ISP ©Ò¤À°tµ¹§Aªº IP ¦ì§})¡C ­Y·Q³z¹L HTTP proxy ¨Ó¨Ï¥Î FTP ¦w¸Ë¡A¨º»ò¥²¶·ª¾¹D proxy ªººô§}¬°¦ó¡C ­Y±z¹ï¤W­z©Ò»Ý¸ê°T¤£¬Æ¤F¸Ñ¡A¨º»ò½Ð¦b¦w¸Ë¤§«e¡A ¥ý¸ß°Ý¨t²ÎºÞ²zªÌ©Î ISP¡C

SLIP ªº¤ä´©¬Û·í­ì©l¡A¨Ã¥B¥D­n¨ü­­©ó¹q¸£¤§¶¡ªº¹êÅé½u¸ô(hard-wired) ¡A¤ñ¦pµ§°O«¬¹q¸£»P¨ä¥L¹q¸£¤§¶¡ªº serial ½u¡C ¤§©Ò¥H±o¥H¹q¸£¶¡¥Hª½±µ½u¸ô³sµ²¡A¤D¬O¥Ñ©ó SLIP ¦w¸Ë¥Ø«e¨Ã¤£¤ä´©¼·±µ¥\¯à¡C PPP ¤~¦³´£¨Ñ¼·±µ¥\¯à¡A ©Ò¥H½Ð¾¨¥i¯àÀu¥ý±Ä¥Î PPP ¦Ó«D SLIP¡C

­Y­n³z¹L¼Æ¾Ú¾÷(modem)¨Ó¦w¸Ë¡A¨º PPP ´X¥G¬O±z°ß¤@¿ï¾Ü¡C ½Ð¥ý·Ç³Æ¦n ISP ©Ò´£¨Ñªº¬ÛÃö¸ê®Æ¡A¦]¬°¦b¦w¸Ë¤§ªì´N·|¥Î¨ì¡C

­Y¨Ï¥Î PAP ©Î CHAP ¨Ó³s¨ì ISP(´«¥y¸Ü»¡¡A­Y¦b Windows ¥i¥H¤£³z¹L script ´N¥i¥H³s½u¨ì ISP)¡A¨º»ò±z¶È»Ý¦b ppp ´£¥Ü²Å¸¹¤U¿é¤J dial «ü¥O§Y¥i¼·¸¹¡C §_«h¡A±z¥²¶·ª¾¹D¦p¦ó¥H¸Ó¼Æ¾Ú¾÷©Ò±Ä¥Îªº ¡§AT «ü¥O¶°¡¨¨Ó³s¨ì ISP¡A¦]¬° PPP ¼·¸¹µ{¦¡¶È´£¨Ñ«D±`¶§¬Kªº ²×ºÝ¼ÒÀÀ¾¹(terminal emulator)¦Ó°_¡C ½Ð°Ñ¾\ Handbook ¤¤ user-ppp ³¹¸`¥H¤Î FAQ ¤¤ªº¬ÛÃö¶µ¥Ø¡C ­Y¦³¾Þ§@¤WªººÃ°Ý¡A¥i¥H¥´ set log local ... «ü¥O¡A¥H«K¦b¿Ã¹õ¤WÅã¥Ü¬ÛÃö°O¿ý¡C

­Y¥iª½±µ¥H hard-wired ¤è¦¡³s¨ì¥t¥~ªº FreeBSD(2.0-R ¤Î¤§«á) ¾÷¾¹¡A ¨º»ò¥i¥H¦Ò¼{³z¹L ¡§laplink¡¨ ¥­¦æ¹qÆl¨Ó¦w¸Ë¡C ¥­¦æ°ðªº¶Ç¿é³t²v¤ñ§Ç¦C°ð°ª«Ü¦h(³Ì°ª¥i¹F¨C¬í 50 kbytes/sec)¡A ©Ò¥H¦w¸Ë³t«×·|§ó§Ö¤@¨Ç¡C

2.13.6.1 Before Installing via NFS

NFS ¦w¸Ë¤è¦¡¬Û·í²«K¡A¥u»Ý±N FreeBSD ¦w¸ËÀɮ׳£©ñ¨ì¬Y¥x NFS server ¤W¡AµM«á¦A«ü©w¨Ï¥Î³o¥x NFS §@¬°¦w¸Ë¨Ó·½§Y¥i¡C

­Y¸Ó server ¥u¤¹³\ ¡§privileged port¡¨(³q±`³o¬O Sun ¤u§@¯¸ªº¹w³]­È)¡A¨º»ò¦b¦w¸Ë¤§«e¡A¥²¶·¥ý¨ì Options ¿ï³æ¥h«ü©w NFS Secure ³]©w­È¡C

­Yºô¸ô¥dªº³s½u«~½è¤£¨Î¡A¨º¥i¯à»Ý­n½Õ¾ã¤@¤U NFS Slow ³]©w¡C

¬°¤FÅý NFS ¦w¸Ë¯à¶¶§Q§¹¦¨¡ANFS ¥D¾÷¥²¶·­n¥i¥H¤ä´©¤l¥Ø¿ýªº±¾¸ü (mount)¡A¨Ò¦p¡GFreeBSD 9.1 ¦w¸Ë¥Ø¿ý¬O¦b¡G ziggy:/usr/archive/stuff/FreeBSD¡A¨º»ò ziggy ¥²¶·¤¹³\ª½±µ±¾¸ü¦b /usr/archive/stuff/FreeBSD¡A¦Ó«D¶È /usr ©Î¬O /usr/archive/stuff¡C

¦b FreeBSD ªº /etc/exports ÀÉ¡A¤W­z¥\¯à¬O¥Ñ -alldirs ¿ï¶µ©Ò³]©w¡C ¨ä¥Lªº NFS server ¥i¯à·|¦³¤£¦Pªº³]©w¤è¦¡¡C ­Y¬Ý¨ì ¡§permission denied¡¨ ¿ù»~°T®§¡A «hªí¥Ü¥i¯à¥Ñ©ó¨S¦³±Ò¥Î³o¿ï¶µ©Ò³y¦¨ªº¡C

¥»¤å¤Î¨ä¥L¤å¥ó¡A¥i¥Ñ¦¹¤U¸ü¡Gftp://ftp.FreeBSD.org/pub/FreeBSD/doc/¡C

­Y¦³ FreeBSD ¤è­±ºÃ°Ý¡A½Ð¥ý¾\Ū FreeBSD ¬ÛÃö¤å¥ó¡A¦p¤£¯à¸Ñ¨Mªº¸Ü¡A¦A¬¢¸ß <questions@FreeBSD.org>¡C
Ãö©ó¥»¤å¥óªº°ÝÃD¡A½Ð¬¢¸ß <doc@FreeBSD.org>¡C