Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Absolute BSD - The Ultimate Guide To FreeBSD (2002).pdf
Скачиваний:
29
Добавлен:
17.08.2013
Размер:
8.15 Mб
Скачать

simply puts a marker on the disk so that the system BIOS can tell that this disk is bootable.

Making a FreeBSD boot floppy is annoying, and if you need one you should just grab one from the installation media. Here, we'll install a plain disk label without any special characteristics:

...............................................................................................

# disklabel −r −w /dev/fd0 fd1440

#

...............................................................................................

The −r option in this example tells disklabel to access the raw disk, which is necessary because there is no filesystem yet. The −w option tells it to write to the disk: We're writing to /dev/fd0, and installing a standard 1.44MB floppy disk label. (You can find a full list of the floppy disk labels in /etc/disktab, as well as labels for many other types of drive.)

Finally, create a filesystem with newfs(8).

...............................................................................................

# newfs /dev/fd0

 

 

 

Warning: Block size restricts

cylinders per group to

6.

Warning: 1216 sector(s) in last cylinder unallocated

 

/dev/fd0:

2880 sectors

in 1 cylinders of 1 tracks, 4096 sectors

1.4MB in

1 cyl groups

(6 c/g, 12.00MB/g, 736

i/g)

super−block backups (for fsck

−b #) at:

 

32

 

 

 

#

 

 

 

...............................................................................................

Creating an MS−DOS Filesystem

To swap data between a Windows machine and your FreeBSD box, MS−DOS format your floppy. While you will still need to run fdformat(8), as discussed earlier, you won't need to disklabel your floppy.

...............................................................................................

# newfs_msdos /dev/fd0

/dev/fd0: 2840 sectors in 355 FAT12 clusters (4096 bytes/cluster)

bps=512 spc=8 res=1 nft=2 rde=512 sec=2880 mid=0xf0 spf=2 spt=18 hds=2 hid=0

#

...............................................................................................

Note The FFS newfs output looks much more interesting, doesn't it? That's because FFS is a more complex and interesting filesystem than MS−DOS. MS−DOS is easier to use in multiple machines, however. You need to decide what best fits your needs. You can use all sorts of options when creating filesystems; see newfs(8) or newfs_msdos(8) for details.

The Basics of SCSI

Throughout this book, I've said repeatedly that SCSI disks are better than IDE. And it's true: SCSI disks are faster, more reliable, and more expensive than IDE or EIDE drives. SCSI disks are also considered more difficult to manage, but much of this difficulty probably comes down to being unfamiliar with the technology. SCSI disks can also do far more than IDE disks, however, which

382

makes them more tricky.

Many new junior sysadmins aren't familiar with handling SCSI systems, so I'm going to spend a little time discussing what you really, really have to know to handle SCSI well.

Note If you are seriously interested in SCSI, check out The Book of SCSI by Gary Field (No Starch Press).

SCSI Types

There are several different types of SCSI: SCSI−1, SCSI−2, Wide, Ultra, LVD, and so on. While the SCSI devices look similar, one look at their connectors will show the difference.

SCSI−1 devices use a 50−pin connector that resembles an IDE cable. More modern SCSI−2 systems use a 68−pin connector that has very small pins and a trapezoidal connection housing. You'll also see external SCSI systems that use other sorts of cables, such as Centronics cables that resemble those on older parallel printers. (If someone hands you a SCSI cable with 25 pins, do not use it, even with an adapter. It will destroy system performance, data integrity, and your peace of mind.)

SCSI Adapters

To use SCSI, you need a host adapter. This is a plug−in card just like a video card or any other peripheral. Many servers have SCSI adapters installed on the motherboard, much as desktops today have IDE adapters built in, which makes things a bit easier.

The SCSI host adapter is one of the most likely bottlenecks in your system. If you have a slow adapter and fast disks, the adapter wins.

SCSI Buses

Many parts of your computer have a bus, and SCSI is no exception. In simplest terms, a bus is where you plug things in. One of your IDE buses has two ports (the plugs on the IDE cable), and the PCI bus has several (the slots on your motherboard). An old SCSI bus has 8 ports, including one used by the SCSI adapter itself. These ports are the plugs that can be attached to the SCSI cable, and you can plug up to 7 devices into an old SCSI system. A newer SCSI bus has 16 ports (still including the card), and if your system has the space and the power, you can plug 15 devices into it.

Some SCSI cards have attachment spaces for two cables because they have two buses. In these configurations, each bus is treated individually and has a unique number. (If you only have one bus, it still has a unique number, which is 0.)

Termination and Cabling

SCSI signals travel along the length of the cable. In many electrical systems, including SCSI, a signal that reaches the end of a wire will reflect back along the wire, which is not a good thing in the case of SCSI. As such, you terminate the SCSI bus with a terminator (a small piece of hardware, almost like a cap) that tells the signal to stop without reflecting back along the cable.

SCSI buses must be terminated at each end. Some SCSI devices include an option for "internal termination," which can make things tricky. Since your SCSI bus stops at the first terminator it sees, if you have an internally terminating device in the middle of your bus, you won't see some of your

383