Newbie School: About Linux startup

Source: Internet
Author: User
1. what is the file bootgrubgrubconfetcinittabetcrcdrcsysinitetcrcdrcetcrcdrc required for system startup? Detcrcdrclocaletcf

1. files required for system startup

/Boot/grub. conf/etc/inittab/etc/rc. d/rc. sysinit

/Etc/rc. d/rc/etc/rc. d/rc ?. D

/Etc/rc. d/rc. local

/Etc/fstab

How to save grub. conf file errors:

Grub> root (hd0, 0)

Grub> kernel/kernel2.6.18-8. el5 ro root = LABEL =/(root =/dev/VolGroup00/LogVol00) mount point of other directories in the system. This file is determined based on the startup principle, or the/etc/fstab file is shown as follows: /etc/lib/dev

Grub> initrd/initrd-2.6.18-8.el5.img (initrd-2.6.18-8.el5.img is a gz compressed package)

Grub> boot

2. unlock the file initrd-2.6.18-8.el5.img

First, the initrd-2.6.18-8.el5.img is renamed initrd-2.6.18-8.el5.gz and then run the gunzip initrd-2.6.18-8.el5.gz to decompress it as a initrd-2.6.18-8.el5, run the file command to view the initrd-2.6.18-8.el5, compress the file for cpio, use cpio-idvm <initrd-2.6.18-8.el5

[Root @ aly cpiotest] # lltotal 5188drwx ------ 2 root 4096 Nov 5 20:59 bindrwx ------ 3 root 4096 Nov 5 20:59 devdrwx ------ 3 root 4096 Nov 5 20:59 etc-rwx root 2431 Nov 1 init-rw ------- 1 root 5267456 Nov 5 initrd-2.6.18-8.el5drwx ------ 2 root 4096 Nov 5 libdrwx ------ 2 root 4096 Nov 1 proclrwxrwxrwx 1 root 3 nov 5 sbin-> bindrwx ------ 2 root 4096 Nov 1 sysdrwx ------ 2 root 4096 Nov 1 sysroot

3. system boot and reinstall

Grub-install/dev/hda this installation usually runs in linux rescue mode

4. back up the disk master boot record

[Root @ aly boot] # dd if =/dev/hda of =/boot/grubbak bs = 512 count = 11 + 0 records in1 + 0 records out512 bytes (512 B) copied, 1e-09 seconds, 512 GB/s

When a problem occurs, you can use the dd command to restore the first 466 byte files. you can use od-x to view the files and end with aa55. In fact, the first 466 bytes are useful.

5. view the system process tree by pstreeThe init process is the parent process of other processes.

6. ntsysv, setup, system-config-services chkconfig

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.