In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1. BIOS detailed explanation
BIOS (Basic Input/Output System), the basic input and output system, the system is stored on the ROM chip of the motherboard. When the computer is powered on, it will first read the system, and then there will be a power-on self-test process, this process is actually to check CPU and memory, the most basic components of the computer (controller, calculator and memory), but also check other hardware, if there is no exception, begin to load BIOS programs into memory. Let's not talk about the detailed BIOS function here. One of the main functions of BIOS is to store the boot order of the disk. BIOS will look up the MBR information of the first disk head according to the startup order, and load and execute the Bootloader program in MBR. If the first disk does not have MBR, it will continue to find the second disk (PS: the boot sequence can be set in the BIOS interface). Once the BootLoader program is detected and loaded into memory BIOS transfers control to the BootLoader program.
1. System startup process
Step 1: power on the computer
Step 2: BIOS (read-only storage ROM on motherboard, basic input or output system)
Function, hardware detection, activation of hardware
Step 3: grub system boot (grub boot is divided into two stages)
1) Phase 1 grub disk boot phase
Mbr (Master Boot record) the 0 track, one sector, 446 bytes recorded by the master boot on the hard disk.
(MBR (Master Boot Record), master boot record, MBR is stored in the head of the disk, the size is 512bytes, wherein, 446bytes is used to store BootLoader programs, 64bytes is used to store partition table information, and finally 2bytes is used to check the validity of MBR.
)
1./dev/zero of=/dev/vda bs=446 count=1 can empty mbr
1) chroot / mnt/sysimage switch to real / environment
And execute grub2-install / dev/vda
2) Phase 2 grub file boot phase
Find / boot partition
Read / boot/grub2/grub.cfg / etc/grub.cfg
File missing, grub2-mkconfig > / boot/grub2/grub.cfg
Grub2-mkconfig > / etc/grub.cfg
Step 4: kernel boot phase:
Boot kernel, read-only mount / device
two。 Detection of hardware equipment
3. Initialize the device driver
4. Enter the system initialization phase and mount it
Kernel loss can be solved by re-installing the kernel installation package.
Method 1: rpm-ivh kernel-xxxxx.rpm-force
Method 2:
1. In virt-manager, put the optical drive IDE CDROM1 in the first place of the boot item, and boot the host to enter rescue mode
2.chroot / mnt/sysiamge changes the system mount to the root directory
3.mount / dev/sr0 / westos mounts CD files
4.cd / westos/ switch to CD mount point
5.ls View the files on the CD
6.cd Packages/ changes to the installation package directory (remember, no ls, there are more than 4000 packages)
7.cp kernel-3.10.-123.e17.x86_64.rpm / mnt/
Copy this package to / mnt/ because it cannot be unpacked in the CD directory
8.cd / mnt/ switch to / mnt/
9.ls View the copied package under / mnt/
10.rpm2cpio kernel-3.10.0-123.e17.x86_64.rpm | cpio-id
Unpack
11.ls view the files in the package
12.pwd View current path
13.cd boot/ changes to the boot/ directory in the package
Kernel file exists in 14.ls-l package
15.cp vmlinuz-3.10.0-123.e17.x86_64 / boot/
Copy the kernel file to the / boot/ directory of the system
16.exit exits the root directory changed by chroot
Exit shell window
Step 5: system initialization phase
1. Load initrd image during system initialization
How to solve the problem of initrd image loss?
Initramfs-uname-r.img missing use:
Mkinitrd initramfs-uname-r.img uname-r
* method 1: * * 1. When the system does not restart, the current version 1) mkinitrd / boot/initramfs- `uname − r`.img `uname-r` generates the system initialization image initramfs is / boot/grub2/grub.cfg file has been written, cannot change 2) mkinitrd / boot/initramfs-$ (uname-r). Img $(uname-r) # # generate system initialization image * * method 2: * *
1) enter into rescue mode
1..chroot / mnt/sysiamge uses superuser
2.mkinitrd / boot/initramfs-uname − r.img uname-r generate system initialization image
The restart will be slower.
Reason: rescan selinux
Solution: change enforcing to disabled in / etc/sysconfig/selinux
Step 6: start the initialization process systemd
1. Start selinux
two。 Load kernel parameters
3. Initialize system clock, keyboard, host name
4. Reread the mount / device
5. Activate raid,lvm
6. Activate quota
Start all services in multi-user.target.wants (which services are enabled depending on the level at which the system starts)
7. Open the virtual console
8. Launch Drawin
How do I modify the system startup level?
System boot level
(init 0) runlever0.target-> poweroff.target
Runlever1.target-> rescue.target
Runlever2.target-> multi-user.target
(init 3) runlever3.target-> multi-user.target
Runlever4.target-> multi-user.target
(init 5) runlever5.target-> graphical.target
(init 6) runlever6.target-> reboot.target
Method 1: systemctl set-default + startup level
Method 2: / etc/systemd/system/default.target
Step 7: login with username and password
How can I forget my password?
1. Start up and press the upper and lower keys to stop reading seconds
two。 Press E to enter edit mode
3. Select kernel startup line
Change Linux16 / vmlinuz-xxxxx ro xxxx to:
Linux16 / vmlinuz-xxxxx rw rd.break # # terminates the execution of the system initialization program after kernel startup is completed
4. Start the system ctrl+x
Chroot / sysroot
Echo westos | passwd-- stdin root
Touch / .autorelabel # # reinitialize selinux. No action is required when selinux is not enabled
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.