FreeBSD installation File System

Source: Internet
Author: User
Tags format command line file system require

FreeBSD the file to storage devices such as disk, by the operating system to deal with the problem of access to hardware devices, users only need to face the operating system, can carry out specific file operations. After the operating system has first formatted the device for storage, the device can be used to store files, a floppy disk, a hard disk partition, or other block device storage media that allows random access. The formatted storage device is referred to as a file system on UNIX, and the process of formatting is called creating a file system. (Because the tape is a sequential access device, the file system cannot be created on tape.) )

Different types of file systems are formed for different media, different operating systems to format and manage disks differently. But the operating system provides a standard universal access to the user, so that when accessing a file, it does not need to consider which file system is being operated on. However, different file systems still have some differences, such as the optical disk file system is read-only media, and some of the file system is not designed for UNIX systems, so the file name, file attributes, and other standards are different from UNIX, FreeBSD access to these file systems as much as possible to convert these differences, Supplement the properties that these filesystems do not have, but require for UNIX standard file systems. These file systems look exactly the same as the standard file system, except that some of the actions are physically limited by the file system itself, such as attempting to write a file on the disc, which is clearly not complete. FreeBSD supports a variety of file systems, the most common of which are:

UFS file system: is the standard file system on the FreeBSD, it implements all the standard file attributes, such as file owner and group, access permissions and other attributes.

cd9660 file system: supports the ISO 9660 format CD-ROM, which supports only 8-bit base length 3-bit extended length, case-insensitive file name, but FreeBSD supports its rock Ridge extension to enable it to use UNIX-style long filenames.

NFS File System: A network File system through which UNIX can share file systems on the network.

Msdos file system: DOS and Windows use a FAT file system that basically uses a 8.3 file name, extending the length of the file name after Windows95, but is still case-insensitive. FreeBSD supports Windows95 long file name extensions and FAT 32-formatted partitions.

EXT2FS file system: Linux used file system, this type is not the default supported file system, need to reconfigure the kernel.

NTFS file system: A file system used by Windows NT that also requires a reconfiguration of the kernel.

In the hard drive management of personal computers, files are placed directly on the partition of the hard disk, while the UFs file system used by FreeBSD is divided in the basic partition, and the file system is built into the BSD-style subarea. So that each UFS partition can have multiple filesystems, each file system or swap space has a label (Disklabel) to identify its own start and end. When you really want to use the file system, you need to get specific information about the file system on your hard disk (the Disklabel of each file system within a UFS partition and partition). The information on the file systems on these hard drives should be maintained by the Administrator and recorded on the hard disk, using the System tools in FreeBSD, Fdisk and Disklabel, or the installer Sysinstall to get the information stored in the hard disk itself.

When you use Fdisk and Disklabel in Sysinstall to partition and divide disk space, when the user completes the operation, you should use the W command to write the changes to the disk and then exit Fdisk or Disklabel.

Unlike Sysinstall, the command line Fdisk and Disklabel are interactive, rather than Sysinstall full-screen, and therefore more difficult to use. Using the hard disk name as an fdisk parameter, FDISK reports the details of all four partitions on the hard disk:


# fdisk WD0
Working on Device/dev/rwd0
Parameters extracted from In-core Disklabel are:
cylinders=525 heads=255 sectors/track=63 (16065 blks/cyl)
Parameters to is used for BIOS calculations are:
cylinders=525 heads=255 sectors/track=63 (16065 blks/cyl)
Media sector size is 512
Warning:bios sector numbering starts with sector 1
Information from DOS Bootblock is:
The data for partition 1 is:
Sysid 6, (Primary ' big ' DOS (>32MB))
Start 16065, size 2056320 (1004MEG), flag 80
Beg:cyl 1/sector 1/head 0;
End:cyl 128/sector 63/head 254
The data for Partition 2 is:
Sysid 7, (Os/2 HPFS, QNX or Advanced UNIX)
Start 2072385, size 1044225 (509MEG), flag 0
Beg:cyl 1/sector 1/head 0;
End:cyl 128/sector 63/head 254
The data for Partition 3 is:
Sysid 165, (FREEBSD/NETBSD/386BSD)
Start 3116610, size 2024190 (988MEG), flag 0
Beg:cyl 1/sector 1/head 0;
End:cyl 128/sector 63/head 254
The data for Partition 4 is:
Sysid 5, (Extended DOS)
Start 5140800, size 3293325 (1608MEG), flag 0
Beg:cyl 1/sector 1/head 0;
End:cyl 128/sector 63/head 254

From the results of this FDISK implementation, it can be seen that the four partitions of this hard disk are occupied by different operating systems, the first partition is a DOS basic partition, the second is HPFS, in fact it is an NTFS partition, the third partition WD0S3 is a BSD partition, and the fourth partition is an extended partition. Therefore, for the third FreeBSD system partition, you can use Disklabel to check the BSD sub partition information on it.


# disklabel wd0s3
# /dev/rwd0s3c:
type: ESDI
disk: wd0s3
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 126
sectors/unit: 2024190
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswith: 0      # milliseconds
track-to-track seek: 0   # milliseconds
drivedata: 0
8 partitions:
#   size  offset  fstype [fsize bsize bps/cpg]
a: 65536   0  4.2BSD  0 0 0 # (cyl. 0 - 4*)
b: 151248 65536   swap       # (cyl. 4*- 13*)
c:2024190   0  unused  0 0 0 # (cyl. 0 - 125)
e: 61440 216784  4.2BSD  0 0 0 # (cyl. 13*- 17*)
f:1745966 278224  4.2BSD  0 0 0 # (cyl. 17*- 125*)

You can see that Disklabel displays the parameters of the hard disk in addition to the a-f of each sub partition. In fact, BSD partition management tools are older than the partition concept of personal computers, and Disklabel is a BSD partition management tool that does not require FDISK help to complete all disk management operations. Fdisk is used to make FreeBSD compatible with other operating systems, and it is a system tool that uses the concept of a personal computer partition. If a hard drive is not accessed by other personal computer operating systems, it is entirely possible to discard Fdisk and only use Disklabel and BSD traditional-style device files to run FreeBSD.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.