FreeBSD kernel profile details (transfer)

xiaoxiao2021-04-08  359

FreeBSD kernel profile generic format is simple, and each line includes a keyword and several parameters. The detailed list of options related to the platform and the device can be found in the Notes file in the same directory, and the platform-independent options can be obtained in / usr / src / sys / conf / notes.

The following is a detailed introduction to the all line parameters as an example.

Machine i386 # machine architecture can only be one of Alpha, AMD64, I386, IA64, PC98, PowerPC or SPARC64

CPU I486_CPU # CPU type, preferably only specify the CPU used

CPU I586_CPU

CPU I686_CPU

Ident Generic # kernel name, display at startup

#HINT "generic.hints" # will be used to configure the device-driven option static compile into the kernel

MakeOptions debug = -g # Reserved debugging information

#options sched_ule # Scheduler, ULED design for SMP, 4BSD is a traditional scheduler

Options SCHED_4BSD

Options preemption # sewer schedule

Options PAE # supports more than 4GB virtual addresses

Options inet # ipv4 support

Options inet6 # ipv6 support

Options FFS # most basic hard disk file system

Options SoftUpdates # Enable Soft Updates support in the kernel, increase the disk write speed, need to be enabled on each disk

Options ufs_acl # Enable access control list in the kernel

Options ufs_dirhash # A disk operation accelerated on a large directory by using additional memory

Options MD_ROOT # Opens the support of the root device based on memory-based virtual disks

Options nfsclient # network file system

Options NFSServer

Options NFS_ROOT

Options MSDOSFS # MS-DOS file system

Options CD9660 # ISO 9660 file system for CD-ROM

Options procfs # process file system, high releases are generally no longer needed

Options pseudofs # is used to support process file systems

Options gemo_gpt # provides the ability to use a large number of partitions on the disk

Options compat_43 # Make the system compatible with 4.3BSD, it is recommended to keep

Options compat_freebsd4 # Supports compiled programs under the old version of FreeBSD

Options compat_freebsd5

Options SCSI_DELAY = 5000 # 在 时间 时时 前 前 s前 设备前 设备

Options Ktrace # Opens the kernel process tracking, mainly for debugging

Options sysvshm # provides SYSTEM V Sharing Memory (SHM) support

Options sysvmsg # Support System V Message Options Sysvsem # Support SYSTEM V Sample

Options _kposix_priority_scheduling

# Posix real-time extension, some of the applications in Ports

Options KBD_INSTALL_CDEV

# 有关 与 related to the keyboard, install a CDEV in / DEV

Options AHC_REG_PRETTY_PRINT

# Give easy-to-read register values ​​for help debugging

Options AHD_REG_PRETTY_PRINT

Options adaptive_giant # kernel global lock (giant)

Device APIC # Enables the ability to use I / O APIC as an interrupt sending device

Device Eisa # Supports EISA Bus

Device PCI # Supports PCI bus

Device FDC # supports floppy drive

Device ATA # Supports PCI ATA / ATAPI Devices

Device Atadisk # ATAPI Disk Drive

Device Ataraid # ATA RAID driver

Device Atapicd # Atapi Corom Drive

Device Atapifd # ATAPI Disk Drive

Device Atapist # ATAPI Tape Drive

Options ATA_STATIC_ID # Use its static number to the controller

Device AHB # SCSI controller

Device AHC

Device AHD

Device AMD

Device ISP

Device ISPFW

Device MPT

#Device ncr

Device SYM

Device TRM

Device Adv

DEVICE ADW

Device aha

DEVICE AIC

Device BT

Device NCV

Device NSP

DEVICE STG

Device scbus # SCSI peripheral

Device ch

Device DA

Device sa

DEVICE CD

Device Pass

Device SES

Device AMR # RAID Controller

Device Arcmsr

Device ASR

Device Ciss

Device DPT

Device HPTMV

Device IIR

DEVICE IPS

Device Mly

Device TWA

Device aac

Device AACP

Device IDA

Device MLX

Device PST

Device TWE

Device Atkbdc # AT Keyboard Input and PS / 2 Pointer Device I / O Service Device Atcbd # AT Keyboard Access Service

Device PSM # ps / 2 mouse driver

Device VGA # vga graphics driver

Device Splash # Shun Splash screen when it is started, and it is also used for screensaver

Device SC # default console driver

#Device VT # Compatible with VT220 console driver

#options xserver

#options fat_cursor

Device AGP # AGP graphics driver

Device NPX # floating point arithmetic unit interface, must be retained

#Device APM # Advanced Power Management Support

Device Pmtimer # Power Management Event

Device CBB # PCMCIA support

Device PCCard

Device Cardbus

Device SiO # serial port support

Device PPC # isa-bus parallel port support

Device PPBUS # Parallel Bus Support

Device LPT #Contag printer support

Device PLIP # Drive of a parallel network interface

Device PPI # otical use I / O and IEEE 1284 I / O

#Device VPO # ionga zip driver support

#Device puc # PUC supported "dumb" serial or parallel PCI card

Device DE # dec / intel DC21x4x network card

Device EM # Intel Pro / 1000 Adapter Gigabit Ethernet Card

Device IXGB # Intel Pro / 10Gbe Ethernet Card

Device TXP # 3COM 3CR990

Device VX # 3com 3c590, 3c595

Device MMIBUS # MII Bus Support (generally used in PCI 10/100 Ethernet card)

Device BFE # Using the MII Bus Controller Drive

Device BGE

DEVICE DC

Device FXP

Device LGE

Device NGE

Device NVE

DEVICE PCN

Device RE

Device RL

DEVICE SF

Device sis

Device SK

Device Stee

Device Ti

Device TL

Device TX

Device VGE

DEVICE VR

Device WB

Device XL

Device CS # ISA Ethernet card driver

Device ED

Device EX

DEVICE EP

Device Fedevice IE

DEVICE LNC

Device SN

Device XE

Device Le

Device WLAN # wireless network card support

Device an

Device AWI

Device RAL

Device Wi

#Device WL

Device loop # Enable TCP / IP loopback program

Device MEM # storage device

Device IO # Allows the process to get I / O privileges

Device random # Enable random number generator

Device Ether # Supports Ethernet Agreement

Device SL # SLIP support

DEVICE PPP # 内 核 PPP Support

Device tun # User mode PPP use

Device Pty # analog login port

Device MD # internal storage device

Device GIF # IP tunnel capabilities

Device Faith # Capture packets and forward to IP translation service

Device BPF # pack filter, allowing the network card to be placed in a mixed mode

Device ubci # USB device support

Device ohci

Device EHCI

Device USB

Device udbp

Device Ugen

Device UHID

Device UKBD

Device ULPT

Device umas

Device ums

Device ural

Device urio

Device USCANNER

Device aue

Device Axe

Device CDCE

Device Cue

Device Kue

Device rue

Device FireWire # FireWare device support

Device SBP

Device FWE

Finally, it is complemented, and the / var / run / dmesg.boot file contains hardware information.

Reference: The FreeBSD Documentation Project

The main part of the operating system is the kernel, responsible for process management, memory management, and I / O operations many core transactions. FreeBSD system is no exception.

Although FreeBSD can be dynamically modified, it is much more, but you want to get a very your own operating system, build a special system for your needs, but also need to reconfigure and compile the kernel. Also, establishing a custom kernel is also a test that each FreeBSD user must experience, and bring a lot of benefits to users through this test.

All source code for FreeBSD is installed in directory / usr / src / sys, which contains numerous subdirectories, which contain different parts of the kernel. Among them, the most important files for custom kernels are the generic files in Arch / Conf (Arch represents Alpha, AMD64, I386, IA64, PC98, PowerPC, and SPARC64). All of these directorys are all related to a particular platform, while the code in other directories is independent of the machine. Note that compile kernels can only be performed with root, and it is best to back up the configuration file to avoid errors or reconfigure after updating the code. FreeBSD provides two ways to compile the kernel.

method 1:

CD / SYS / I386 / CONF; enter the directory where the configuration file is located, or the directory where other configuration files are located

/ usr / sbin / config generic; generated kernel source code

Cd ../compile/Gener; enter the compiled kernel source code

Make depend; compiled kernel

Make

Make install; install new kernel

Method 2 (requires a complete source code):

CD / USR / SRC; enter the source code directory

Make buildkernel kernconf = generic; compiled kernel

Make installkernel kernconf = generic; install new kernel

The method 1 should be used to recompile the kernel unless the re-build core is used as part of the Make BuildWorld process. And by default, all kernel modules will be connected at the same time. If you only need the module required by the network, you should edit the modules_Override variable in the /etc/make.conf file before the connection, and its content is the desired module. List.

The new kernel will be copied to the / boot / kernel / kernel file, while the old kernel is moved to file /Boot/kernel.old/kernel, and the new kernel boot system is used.

Before deeply understanding the configuration file (next writing, a little longer ...), it is necessary to see the wrong processing method for the error. There may be five problems in a total of custom kernels, respectively:

Config failed, which means that the kernel description error, the Config program displays the wrong line number, which can be solved by comparison with other information.

Make failed, and it is also a kernel description error, which is generally solved by General and other information. If you do not find an error, you can send the configuration file to the FREEBSD a general problem message list.

The kernel installation failed, which is likely to have a deep problem, and it is recommended to understand the information to FreeBSD.

The kernel cannot be started, or the device cannot be identified, and the old kernel can be restored. When the FreeBSD starts the loader countdown, the unload, boot /bootkernel.old/kernel is OK. Old/kernel.

Nuclear work, but PS does not work, this is likely to install a different kernel that has been installed with the system built-in tool, which should recompile a system consistent with the kernel version.

Reference: The FreeBSD Documentation Project

Published on @

June 18, 2006 9:27 PM |

Comments (0)

Windows operating system

August 12, 1981

IBM introduces a personal computer containing Microsoft's 16-bit job system MS-DOS 1.0, which is the first operating system in which MS came out, mainly interacting through the way of command line. MS-DOS is my first contact operating system, it is still small, and it is more than about 3.0.

November 1985

Microsoft launched Windows 1.0, priced at $ 100, which is the first GUI operating system released by Microsoft, but the evaluation is not high :-(

December 9, 1987

Microsoft released Windows 2.0, the price is still $ 100. Although it borrowed a lot of Mac OS, it still did not get people's affirmation.

May 22, 1990

Microsoft launched Windows 3.0, has made a large change in many aspects such as interface, humanity and memory management, and finally got the user's recognition! And, MS released a multi-language at the end of 1991

Windows 3.0 versions, the promotion of Windows has played greatly in non-English countries. On March 18, 1992, Microsoft released Windows version 3.1, and its sales broke through millions of protocols within 2 months! This version has added a lot of support for multimedia, etc. In 1993, Microsoft released Windows NT 3.1 and announced the market of enterprise server operating system. This version is jointly developed with IBM on OS / 2. The Chinese version of WINDOWS 3.2 in 1994 was released. Many people in China started with Windows from this release, I am one of them :-) August 24, 1995

This is a moment of Microsoft to the dominant position. In this month, MS launched a Windows 95 that makes the world. Under the powerful promotion of MS, Win 95 broke through millions of protrudins within 4 days! Starting from this operating system, Windows completely abandoned the complete dependence on DOS, and started the "Wintel" monopoly era of the world! In August 1996, NT4.0 was launched, this is a step in MS server OS until there are many companies still use it. In November of the same year, Windows CE 1.0 is released, this is an OS for embedded systems. So far, Microsoft's empire is clear. On June 25, 1998 (just 3 days before I am 14-year-old birthday) Windows 98, there is still a lot of operating systems used by users. This OS, which is developed on 95, has improved hardware standard support. For example, MMX and AGP. Other features include support, multi-displays, web TV support, and integrated Internet Explorer, which are integrated into the Windows graphics user interface, called Active Desktop.

. Plus 98 SE, 98 SE, June 10, 1999, Microsoft's personal desktop monopoly has been formed! PS This OS is considered to be a best platform for playing games for a long time until XP's launch :) I have also fallen here for a long time ... September 14, 2000 this day Microsoft launched Window Me, which can be considered a 9X series end version, but very unstable, received a lot of criticism, I have never used it: P 2000, mainly for commercial users, WINDOW 2000, including New NTFS file system, EFS file encryption, enhanced hardware support, etc., to the server market that has been monopolized by UNIX system, rigging from IBM, HP, Sun, HP, rushing from IBM, HP, SUN . Win 2K contains 4 versions: (1) Windows 2000 Professional, for workstation and laptops. Its original name is Windows NT 5.0 Workstation. The maximum can support dual processors, with a minimum of 64MB of memory, support 2GB of memory. (2) Windows 2000 Server, the server version, the server of small businesses. Its original name is Windows NT 5.0 Server. Up to 4 processors can support 128MB of memory, up to 4GB of memory is supported. (3) Windows 2000 Advanced Server, UEF, with large-scale businesses. Its original name is Windows NT 5.0 Server Enterprise Edition. Up to 8 processors can support 128MB of memory, up to 8GB of memory. (4) Windows 2000 Datacenter Server, the data center server version, facing the highest level of scalability, usability and reliability of large-scale enterprises or national institutions. The maximum can support 32 processors, with a minimum of 256MB of memory, support up to 64GB of memory. October 25, 2001 WINDOWS XP released. Windows XP is Microsoft to synthesize all users to synthesize an operating system. It has increased compared to the previous Windows desktop system, and the cost of paying this is lost to DOS-based support. Since Microsoft puts a lot of software integrated into the operating system, XP has been violently criticized. These software include firewall, media player, instant messaging software (Windows Messenger), as well as the close combination of Microsoft Pasport services, which is considered to be safe risks and potential threat to individual privacy . The increase in these characteristics is considered to be the continuation of Microsoft's continuation of its traditional monopoly behavior. Windows XP, or Window XP is a new window operating system that Microsoft is released. Windows XP was officially released on August 24, 2001 (RTM, Release to Manufacturing). Its retail version is listed on October 25, 2001. Windows XP The original code is whistler. The letter XP represents the "Experience" of the English word. The external version of Windows XP is 2002, the internal version is 5.1 (ie Windows NT 5.1), the official version of Build is 5.1.2600.

Microsoft initially released two versions: Windows XP Professional and Windows XP Home Edition, later issued a Media Center Edition and Tablet PC Editon. In addition to all functions of the home version, Windows XP Professional Pro has added new network certifications for commercial users, and the two-processor support, which supports 2GB of memory. Mainly used for workstations, high-end personal computers and laptops. Windows XP Home Edition home version of consumer object is a home user, used in a general personal computer and laptop. Only single processors; minimum support for 64MB of memory (certain features will be lost under 64MB of memory conditions), which supports 1GB of memory. In April 2003, Windows Server 2003 was released; the active directory, group policies, and management, disk management, etc. The function of server is improved, and the perfection of .NET technology further expands the application range of the server. Windows Server 2003 has four versions: Windows Server 2003 Web Server Version (STANDITION), Windows Server 2003 Enterprise Edition, and Windows Server 2003 Data Center (Datacenter Edition). Web Edition is mainly designed for web hosting, while Datacenter is used in extremely high-end systems. Standards and enterprise versions are between the middle. Windows Server 2003 is currently Microsoft's latest server operating system. At first, the product is called "Windows .Net Server", it is changed to "Windows .Net Server 2003", it is finally changed to "Windows Server 2003", released on March 28, 2003, and listed on the same year . Windows Server 2003 has multiple versions such as Web, standard editions, enterprise and data center versions. 200X Yue Y-Yue Z Niwack will release the latest operating system Vista, now there is a beta2 beta version to download, but the hardware requirements are high, I can only say 886 to it. However, it is a piece of water on the Internet!

Although FreeBSD provides users with a lot of tools, they want to complete the task, often need to install more applications. To this end, FreeBSD provides PORTS technology installed from source code and Packages technology that directly install binary code. There are already more than 10,000 third-party applications for you.

Let's take a look at the Ports installation. By default, all ports are located in the / usr / ports directory, made by Makefile (specify how the program should be compiled and installed in the system), DISTINFO (for file check), PKG-DESCR (Description of the software Wait, PKG-PLIST (list of all files that will be installed), PKG-Message, and a files directory (including patches that need to be used and installed).

Note that the port only contains how to compile the source code instead of a true source code. The source code needs to be obtained from the online or CD and may be released to any format (usually the TAR or Gzip compression format). Also, only root can install Ports, and it is best to go to vuxml.freebsd.org before installation to see if there is a security issue associated with the port. After entering the relevant directory, you can start installing port using the board command. Ports will first find if the corresponding source code is available under / usr / ports / distfiles, otherwise follow the source code on the web as indicated in Makefile. Finally, the system will start compiling the source code.

The command line will be returned after the completion of the compilation, and you can install Port using the make install command. It is best to remove the temporary work directory using Make Clean after the installation is complete, and the disk space is released and avoids errors when upgrading Port. (You can also use the make install clean command to complete the above three separate steps at once, PortsLean -d used to clean the entire temporary file space)

The installed port can be deleted with the "PKG_DELETE PORT name", and PKG_Version -v can list the Ports information that provides updated versions. Portupgrade is used to upgrade the port, the -a parameter indicates that all installed ports, -i means that the -R can be confirmed before the upgrade, and -r can specify the port to be upgraded, and -p indicates that the compiled Package is upgraded.

Let's take a look at the installation of the package. You can use the "pkg_add -r package name" command for installation, where parameters -R are used from the remote host to obtain Package, if there is a local installation package, the parameter can be omitted.

Note: All packages can be downloaded from ftp://ftp.freebsd.org/pub/freebsd/ports/packages/ download by FTP

In addition, PKG_INFO can be used to list all installed software package lists and descriptions, PKG_Version to compare the local Package version is consistent with the versions in the ports directory, and the pkg_delete pkg name deletes a installed software. By the way, all installed package information is saved in the / var / db / pkg directory.

Reference: The FreeBSD Documentation Project

FreeBSD is a multitasking operating system, that is, multiple programs can be executed. A program in execution is a process.

Each process has a unique identifier that is temporarily allocated by the system, called process ID (can be assigned from 1 to 99999), or PID. Most of the processes have a parent process, that is, the process used to start the process. However, there is a process called InIT in the system, and its PID is always 1, which is automatically launched by the kernel when FreeBSD starts.

For example, the user performs instruction ls in the shell, and the process corresponding to the LS is the child process of the shell, and the shell is the parent process of the LS.

In FreeBSD, you can use the PS and TOP instructions to view the status of the process in the current system. Among them, the PS will display the state of the process that has the process with the control terminal, including the PID, the terminal, status, occupied CPU time, and commands that start it. The parameters commonly used by PS include: a showing all running processes, u Displays the user and occupied memory to which the process belongs, X shows the background process, WW shows the complete command line.

Attachment: In the process, some is part of the terminal, need to interact with the user to complete its function. The other part is not required to interact with the user, called the daemon deamon (usually add D after the name). And TOP displays all running processes, including PID, user running the process, running thread, priority, maximum memory requirements, currently occupying memory, process status, occupying CPU time and percentage, and command to run the process, etc. . Also, the process will refresh once every 2 seconds, which can be modified by options s. At the beginning of this command, the current total number of processes, process statistics, CPU statistics, memory information, and exchange partitions are displayed.

Communication between the processes can use the mechanism of signals. Different signals have different meanings according to different numbers, some of which have special meanings, and others can be interpreted by the application. Typically, users can only send information to their own processes, and information sent by others may be rejected by KILL. But root can send various signals to each process.

In some cases, FreeBSD can send a signal to the application, such as segment illegal signal (SIGSEGV), and alarm signal (SIGALRM). The signals that can be used to terminate have Sigterm and Sigkill, the former can be determined by the process to determine whether the end is ended, and the process of receiving the latter must be terminated immediately.

You can use the / bin / kill directive in FreeBSD to send the signal, and its syntax is:

Kill -s signal PID

Commonly used signals include HUP, INT, Quit, ABRT, KILL, ALRM, TERM, and the like.

Let's take a look at the shell. The shell is the command line interface, which is the result of the command and then execute it. FreeBSD contains several shells, such as SH, TCSH, etc., which can choose to use what shell (default is CSH). A large feature of the shell is to automatically replenish the file name (enter the first few letters of the command or file name, press the Tab key, if you can't automatically do not complete the ring).

Another feature of the shell is to use environment variables, mainly including user (current username), Path (default path name), Display (network name of the X11 display), Shell (current shell name), TERM (user terminal Name), TERMCAP (Terminal Separates of Various Terminal Functions), OSTYPE (Operating System Type), MachType (CPU Architecture), Editor (preferred text editor), Pager (preferred text page Scheduler ) And MANPATH (online manual path), etc. The instructions for setting variables under CSH are:

STENV variable name

The command to display environment variable is:

Echo $ variable name

Reference: The FreeBSD Documentation Project

转载请注明原文地址:https://www.9cbs.com/read-132701.html

New Post(0)