Опубликован: 06.08.2012 | Доступ: свободный | Студентов: 1331 / 47 | Оценка: 5.00 / 5.00 | Длительность: 53:41:00
Лекция 5:

Installing FreeBSD

Second time through

If you have already started an installation and aborted it for some reason after creating the file systems, things will look a little different when you get to the label editor. I twill find the partitions, but it won't know the name of the mount points, so the text under Mount will be <none>. Under Newfs, you will find an asterisk (*) instead of the text UFS1 Y. The label editor has found the partitions, but it doesn't know where to mount the file systems. Before you can use them, you must tell the label editor the types and mount points of the UFS partitions. To do this:

  • Position the cursor on each partition in turn.
  • Press m (Mount). A window pops up asking for the mount point. Enter the name, in this example, first /, then press Enter. The label editor enters the name of the mount point under Mount, and under Newfs it enters UFS1 N—it knows that this is a UFS file system, so it just checks its consistency and doesn't overwrite it. Repeat this procedure for /home, and you're done. If you are sharing your disk with another system, you can also use this method to specify mount points for your Microsoft file systems. Select the Microsoft partition and specify the name of a mount point.
  • Unless you are very sure that the file system is valid, and you really want to keep the data in the partitions, press t to specify that the file system should be created. The text UFS1 N changes to UFS1 Y. If you leave the N there, the commit phase will check the integrity of the file system with fsck rather than creating a new one.
File systems on shared disks

If you have another operating system on the disk, you'll notice a couple of differences. In particular, the label editor menu of Figure 5-8 (on page 68) will not be empty: instead, you'll see something like this:


Рис. 5.16.

Be careful at this point. The file system shown in the list is the active Microsoft partition, not a FreeBSD file system. The important piece of information here is the fact that we have 17529 MB of free space on the disk. We'll create the file systems in that free space in the same way we saw on page 72.

Selecting distribution

The next step is to decide what to install. Figure 5-14 shows you the menu you get when you enter Distributions. A complete installation of FreeBSD uses about 1 GB of space, so there's little reason to choose anything else. Position the cursor on the line All, as shown, and press the space bar.

Why press the space bar when so far you have been pressing ENTER? Because in this particular menu, ENTER will return you to the upper level menu or simply continue to the media selection menu, depending on the type of installation you're doing. It's one of the strangenesses of sysinstall.

Next, sysinstall asks you if you want to install the Ports Collection. We'll look at the Ports Collection in "The Ports Collection" . You don't have to install it now, and it takes much more time than you would expect from the amount of space that it takes: the Ports Collection consists of over 150,000 very small files, and copying them to disk can take as long as the rest of the installation put together. On the other hand, it's a lot easier to do now, so if you have the time, you should install them.

Whatever you answer to this question, you are returned to the distribution menu of Figure 5-14. Select Exit, and you're done selecting your distributions.

Earlier versions of sysinstall asked you questions about XFree86 at this point. Nowadays you do that after completing the installation.
Distribution selection menu

Рис. 5.17. Distribution selection menu
Where you are now

Now sysinstall knows the layout of the disk or disks you intend to use for FreeBSD, and what to put on them. Next, you specify where to get the data from.

Selecting the installation medium

The next thing you need to specify is where you will get the data from. Where you go now depends on your installation medium. Figure 5-15 shows the Media menu. If you're installing from anything except an ftp server or NFS, you just need to select your medium and then commit the installation, which we look at on page 77. If you're installing from media other than CD-ROM, see page 85.

At this point, sysinstall knows everything it needs to install the software. It's just waiting for you to tell it to go ahead.

Installation medium menu

Рис. 5.18. Installation medium menu

Performing the installation

So far, every thing you have done has had no effect on the disk drives. If you change your mind, you can just abort the installation, and the data on your disks will be unchanged. That changes completely in the next step, which you call committing the installation. Now is the big moment. You've set up your partitions, decided what you want to install and from where. Now you do it.

If you are installing with the Custom installation, you need to select Commit explicitly. The Standard installation asks you if you want to proceed:

Last Chance!   Are you SURE you want continue the installation?

If you're running this on an existing system, we STRONGLY
encourage you to make proper backups before proceeding.
We take no responsibility for lost disk contents!

When you answer yes, sysinstall does what we've been preparing for:

  • It creates the partitions and disk partitions.
  • It creates the file system structures in the file system partitions, or it checks them, depending on what you chose in the label editor.
  • It mounts the file systems and swap space.
  • It installs the software on the system.

After the file systems are mounted, and before installing the software, sysinstall starts processes on two other virtual terminals1See page 197 for an explanation of virtual terminals. On /dev/ttyvl you get log output showing you what's going on behind the scenes. You can switch to it with ALT-F2. Right at the beginning you'll see a whole lot of error messages as sysinstall tries to initialize every device it can think of. Don't worry about them, they're normal. To get back to the install screen, press ALT-F1.

In addition, after sysinstall mounts the root file system, it starts an interactive shell on /dev/ttyv3. You can use it if something goes wrong, or simply to watch what's going on while you're installing. You switch to it with ALT-F4.

After installing all the files, sysinstall asks:

Visit the general configuration menu for a chance to set
any last options?

You really have the choice here. You can answer Yes and continue, or you can reboot: the system is now run able. In all probability, though, you will have additional installation work to do, so it's worth continuing. We'll look at that in the following chapter.