But (komputer): Perbezaan antara semakan
Kandungan dihapus Kandungan ditambah
Laman baru: {{this|the use of the term booting in computer science}} In computing, '''booting''' ('''booting up''') is a bootstrapping process that starts [[operati... |
Tiada ringkasan suntingan |
||
Baris 1:
In [[komputer]], '''but''' adalah proses memulakan [[sistem operasi]] apabila pengguna memulakan [[sistem
komputer]]. '''Urutan but''' ialah satu set operasi yang dilaksanakan komputer apabila dimulakan dan
melancarkan sistem operasi.
Kebanyakan sistem komputer hanya boleh menjalankan kod yang dijumpai dalam ingatan ([[ROM]] atau [[RAM]]).
Sistem operasi moden disimpan dalam [[cakera keras]], kadang-kadang [[LiveCD]], pemacu [[USB]], atau pemacu
yang tidak memerlukan arus elektrik bagi mengekalkan ingatan. Apabila komputer dimulakan, ia tidak mempunyai
sistem operasi di dalam memory. [[pekakas komputer|Pekakas]] komputer sendiri tidak boleh melaksanakan
akti-aksi kompleks seperti melancarkan program dari cakera, jadi perbandingan yang nyata wujud: untuk
melancarkan sistem operasi ke dalam memori, seseorang perlu mempunyai sistem operasi sedia ada dalam memori.
Penyelesaiannya ialah menggunakan [[program komputer]] kecil, yang dipanggil pelancar but. Tugasnya ialah melancarkan program lain ke dalam sistem operasi. Selalunya, pelancar but berperingkat digunakan hingga ke semualan melancarkan sistem operasi.
{{more}}<!--
Early programmable computers had a row of [[toggle switch]]es on the front panel to allow the operator to
manually enter the [[Binary numeral system|binary]] boot instructions into memory before transferring
control to the [[Central processing unit|CPU]]. The boot loader would then read the operating system in from
an outside storage medium such as [[paper tape]], [[punched card]], or an old fixed head [[disk drive]].
[[Pseudo]]-[[assembly language|assembly code]] for the bootloader might be as simple as the following eight
instructions:
0: set the P register to 8
Baris 20 ⟶ 41:
7: jump to 1
A related example is based on a loader for a 1970's Nicolet Instrument Corporation [[minicomputer]]. Note
that the bytes of the second-stage loader are read from paper tape in reverse order. 0: set the P register to 106
Baris 30 ⟶ 53:
6: jump to 1
The length of the second stage loader is such that the final byte overwrites location 6. After the
instruction in location 5 executes, location 6 starts the second stage loader executing. The second stage
loader then waits for the much longer tape containing the operating system to be placed in the tape reader.
The difference between the boot loader and second stage loader is the addition of checking code to trap
paper tape read errors, a frequent occurrence with the hardware of the time, which in this case was an
[[ASR-33]] [[teletype]].
In modern computers the bootstrapping process begins with the [[Central processing unit|CPU]] executing
software contained in ROM (for example, the [[BIOS]] of an [[IBM PC]]) at a predefined address (the CPU is
designed to execute this software after reset without outside help). This software contains rudimentary
functionality to search for devices eligible to participate in booting, and load a small program from a
special section (most commonly the [[boot sector]]) of the most promising device. It is usually possible to
configure the BIOS so that only a certain device can be booted from and/or to give priority to some devices
over others (a CD or DVD drive is usually given priority over a hard disk, for instance).
Boot loaders may face peculiar constraints, especially in size; for instance, on the IBM PC and compatibles,
the first stage of boot loaders located on hard drives must fit into the first 446 [[bytes]] of the [[Master
Boot Record#Layout of Master Boot Record|Master Boot Record]], in order to leave room for the 64-byte
[[partition table]] and the 2-byte 0xAA55 'signature', which the BIOS requires for a proper boot loader.
Some operating systems, most notably pre-1995 [[Apple Macintosh|Macintosh]] systems from [[Apple Computer]],
are so closely interwoven with their hardware that it is impossible to natively boot an operating system
other than the standard one. A common solution in such situations is to design a bootloader that works as a
program belonging to the standard OS that hijacks the system and loads the alternative OS. This technique
was used by Apple for its [[A/UX]] [[Unix]] implementation and copied by various freeware operating systems
and [[BeOS|BeOS Personal Edition 5]].
=== Second-stage boot loader ===
The small program is most often not itself an operating system, but only a second-stage boot loader, such as
[[NTLDR]], [[Linux Loader|LILO]] or [[GNU GRUB|GRUB]]. It will then be able to load the operating system properly, and finally transfer execution to it. The system will initialize itself, and may load [[device driver]]s and other programs that are needed for the normal operation of the OS. The boot process is considered complete when the computer is ready to interact with the user or the
[[operating system]] is capable of running ordinary applications. Typical modern [[personal computer|PCs]]
boot in about a minute (of which about 15 seconds are taken by a [[Power-on self test]] (POST) and the
preliminary boot loaders, and the rest by loading the operating system), while large servers may take
several minutes to boot and to start all services. To ensure high availability, they bring up some services
before others.
Most [[embedded system]]s must boot immediately. For example, waiting a minute for a digital television to
come up is not acceptable. Therefore they have their complete operating system in ROM or [[flash memory]],
so it can be executed directly.
=== Flash boot loader ===
Embedded systems especially in automotive applications rely heavily on Flash Bootloaders to ensure that the
[[Electronic control unit|ECU]] (Electronic Control Unit) is programmable either in production or in service. A Flash Bootloader resides in Flash memory, and is always the first application to run after a reset. The Flash bootloader decides whether an application is ready and thereby either stays in the ECU or jumps to the application to start execution. The benefit of having a Flash Bootloader on an ECU is mainly to allow erasing and programming new applications on a single ECU in case of application updates, a recall, or
changing a configuration by downloading new calibration files.
The most popular Flash Bootloaders are [[Controller Area Network|CAN]] based, i.e. use the Control Area
Network protocol to download data to an ECU. These bootloaders use a [[Diagnostics]] protocol to communicate
and download to an ECU.
=== Network booting ===
Baris 53 ⟶ 150:
{{main|Network booting}}
Most computers are also capable of booting over a [[computer network]]. In this scenario, the operating
system is stored on the disk of a [[server (computing)|server]], and certain parts of it are transferred to the client using a simple protocol such as the [[Trivial File Transfer Protocol]]. After these parts have been transferred, the operating system then takes over control of the booting process. == Boot devices ==
A boot device is any device that must be initialized prior to loading the operating system. This includes
the primary [[input device]] ([[computer keyboard|keyboard]]), the primary output device ([[display
device|display]]), and the [[initial program load]] device ([[floppy drive]], [[hard drive]], [[CD-ROM]],
[[USB flash drive]], etc.).
In a modern [[BIOS]], the user can select one of several interfaces from which to boot. These include:
[[hard disk]], [[boot floppy|floppy]], [[SCSI]], [[CDROM]], [[Zip drive|Zip]], [[LS-120]], a network
interface card using [[Preboot Execution Environment|PXE]], or [[Universal Serial Bus|USB]] (USB-FDD,
USB-ZIP, USB-CDROM, USB-HDD).
For example, one can install [[Microsoft Windows]] on the first hard disk and [[Linux]] on the second. By
changing the BIOS boot device, the user can select the [[operating system]] to load.
== Boot sequence on standard PC (IBM-PC compatible) ==
[[image:Pc_boot.jpg|right|thumb|300px|A PC going through its boot sequence]]
Upon starting, a [[personal computer]]'s [[x86]] [[Central processing unit|CPU]] runs the instruction
located at the memory location F000:FFF0 (on 286s and 386SXs, the base of the code segment is actually
0xFF0000 and on 386s it is 0xFFFF0000) of the [[BIOS]]. This memory location is close to the end of system
memory. It contains a jump instruction that transfers execution to the location of the BIOS start-up
program. This program runs a [[Power-on self test]] (POST) to check that devices the computer will rely on
are functioning; it also initializes these devices. Then, the BIOS goes through a preconfigured list of
devices until it finds one that is bootable. On real IBM PCs and derivatives made by IBM, if it finds no
such device, control is transferred to [[IBM Cassette BASIC]]. On other [[IBM PC compatible]]s, an error
message is generated and the boot process stops. If the BIOS finds a bootable device, it loads and executes
its [[boot sector]]. In the case of a hard drive, this is referred to as the [[master boot record]]
(''MBR'') and is often not operating system specific. Usually, the MBR code checks the [[partition (IBM
PC)|partition]] table for an active partition. If one is found, the MBR code loads that partition's [[boot
sector]] and executes it. The boot sector is often operating system specific, however in most operating
systems its main function is to load and execute a [[kernel (computer science)|kernel]], which continues
startup. If there is no active partition or the active partition's boot sector is invalid, the MBR may load
a secondary boot loader and pass control to it and this secondary boot loader will select a partition (often
via user input) and load its boot sector, which usually loads the corresponding operating system Kernel.
Newer systems that have [[Extensible_Firmware_Interface|EFI]]-compliant firmware can boot from that to
either MBR or GPT drives and do not use the standard MBR boot loader.
== Other kinds of boot sequence ==
Some other processors have other kinds of boot modes; most [[digital signal processor]]s have the following
boot modes: *Serial mode boot
*Parallel mode boot
Baris 74 ⟶ 229:
=== Initial Program Load ===
In IBM mainframe systems, the boot process is known as '''IPL (Initial Program Load)''' The term was coined
by IBM for the design of the [[System/360]] and continues to be used in those environments today<ref
name="zAPoP">{{cite book|url=http://publibz.boulder.ibm.com/epubs/pdf/a2278324.pdf|title=z/Architecture
Principles of Operation|pages=Chapter 17|publisher=[[IBM]]|accessdate=2007-04-14}}</ref>. In systems that
share the System/360 heritage—and in some that have been inspired by it, including smaller systems
such as the [[IBM 1130]]—IPL is a hardware function, not a program run on the system itself. A
predefined I/O channel command is initiated to a selected device directly, causing a startup program to be
loaded without the assistance of a pre-defined bootstrap routine. The exact same procedure is used to boot
from any device, including disk drives, [[tape drive]]s, or even [[card reader]]s, in a device-independent
manner.
The System/360 IPL function reads 24 bytes from an operator-specified or pre-configured device into memory
starting at location zero. The second and third groups of eight bytes are treated as Channel Command Words
(CCWs) to continue loading the startup program. When the I/O channel commands are complete, the first group
of eight bytes is then loaded into the Program Status Word (PSW) register and the startup program begins
execution at the designated location.<ref name="zAPoP"/>
== Hard reboot ==
A ''hard reboot'' (also known as a ''cold reboot'', ''frozen reboot'', ''cold boot'' or ''cold start'') is
when power to a computer is cycled (turned off and then on) or a special reset signal to the [[central processing unit|processor]] is triggered (from a front panel switch of some sort). This restarts the computer without first performing any shut-down procedure. (With many [[operating system]]s, especially those using [[cache|disk cache]]s, after a hard reboot the filesystem may be in an "unclean" state, and an automatic scan of on-disk filesystem structures will be done before normal operation can begin.) It may be
caused by power failure, be done by accident, or be done deliberately as a last resort to forcibly retrieve
the system from instances such as a critical error or [[virus]]-inflicted [[Denial-of-service attack|DoS
attack]].
== Soft reboot ==
A ''soft reboot'' (also known as a ''warm reboot'') is restarting a computer under software control, without
removing [[electric power|power]] or (directly) triggering a reset line. It usually, though not always,
refers to an orderly [[shutdown]] and restarting of the machine.
The [[Control-Alt-Delete]] key combination on the original [[IBM PC]] was designed to allow a soft reboot
for a quicker and more convenient (and, some argue, less stressful on system components) restart than
powering the computer completely down then back up.{{Fact|date=February 2007}}
The Linux kernel has optional support for the [[kexec]] [[system call]], which shuts down the currently
running kernel and executes another one. The entire process is done independent of the system firmware. Note
that the kernel being executed does not have to be a Linux kernel.
== Random reboot ==
''Random reboot'' is a non-technical term referring to an unintended (and often undesired) [[soft
reboot|reboot]] for which the cause is not immediately evident to the user. Such reboots may occur due to a multitude of software and hardware problems, such as [[triple fault]]s. As Windows XP has an option to skip its [[Blue Screen of Death]] and immediately restart the computer in the
event of a fatal fault, users can be mistaken in thinking a Windows XP computer suffers from random
rebooting. On a [[Unix]] and [[Unix-like]] systems it is known as a [[kernel panic]], and these too can
sometimes restart the computer.
-->
== Ralat ==
Dalam [[Windows]], apabila ralat berlaku dalam proses but, [[Blue Screen of Death]] atau [[Black Screen of
Death]] mungkin terjadi.
==
<references/>
==
*[[Sistem komputer]]
*[[I/O]]
*[[
== Bacaan tambahan ==
{{Wiktionary|bootup}}
*[http://www.pixelbeat.org/docs/disk/ How GRUB fits into the hardisk layout on a PC]
*[http://www.osdcom.info/content/view/33/39/ Booting with Grub] at OSDEV Community
* [http://www.vsubhash.com/writeups/multiboot_os.asp A tutorial on dualbooting/multibooting with Windows
NTLDR and Linux LILO/GRUB] *Booting From Scratch
**{{cite web|url=http://www.vnutz.com/content/program_a_bootstrap_loader|title= x86 BootStrap Programming
Tutorial|author=Matthew Vea}} *FreeBSD
**{{cite web|url=http://www.khmere.com/freebsd_book/html/ch02.html|title=Bootstrapping FreeBSD|author=Nathan
Boeger and Mana Tominaga }} *Linux
**{{cite web|url=http://www.pycs.net/lateral/stories/23.html|title=The Linux boot process
unveiled|author=Roberto Alsina}} **{{cite web|url=http://www.tldp.org/HOWTO/From-PowerUp-To-Bash-Prompt-HOWTO.html|title=From power up to
Linux bash prompt HOWTO|author=Greg O'Keefe}} *Mac OS X
**{{cite web|url=http://www.kernelthread.com/mac/osx/arch_boot.html|title=Mac OS X Boot Process|author=Amit
Singh}} *Windows
**{{cite web|url=http://homepages.tesco.net./~J.deBoynePollard/FGA/dos-windows-boot-process.html|title=The
DOS and DOS/Windows boot processes|author=Jonathan de Boyne Pollard}} **{{cite web|url=http://www.pcnineoneone.com/howto/multiboot1.html|title=Multi-booting, running different
versions of Windows on your PC|author=}} **{{cite web|url=http://www.pocketpcfaq.com/faqs/5.0/reset.htm|title=Windows Mobile 5.0 Soft Reset|author=}}
[[ca:Carregador de l'arrencada]]
|