About Linux Startup

Source: Internet
Author: User
Article Title: about Linux Startup. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

1. files required for system startup

/boot/grub/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 initrd-2.6.18-8.el5.img to initrd-2.6.18-8.el5.gzran after running gunzipinitrd-2.6.18-8.el5.gz decompress as initrd-2.6.18-8.el5, use file command to view initrd-2.6.18-8.el5, cpio compressed file, with cpio-idvm <initrd-2.6.18-8.el5

[Root @ aly cpiotest] # ll

Total 5188

Drwx -- 2 root 4096 Nov 5 20:59 bin

Drwx -- 3 root 4096 Nov 5 20:59 dev

Drwx -- 3 root 4096 Nov 5 20:59 etc

-Rwx -- 1 root 2431 Nov 1 :30 init

-Rw -- 1 root 5267456 Nov 5 20: 56 initrd-2.6.18-8.el5

Drwx -- 2 root 4096 Nov 5 20:59 lib

Drwx -- 2 root 4096 Nov 1 :30 proc

Lrwxrwxrwx 1 root 3 Nov 5 20: 59 sbin-> bin

Drwx -- 2 root 4096 Nov 1 :30 sys

Drwx -- 2 root 4096 Nov 1 :30 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 = 1

1 + 0 records in

1 + 0 records out

512 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 in pstree. The init process is the starting process and the parent process of other processes.

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

chkconfig --list |grep smartdchkconfig --list 2345 smartd on|offchkconfig --add /etc/init.d/oracle.sh

Add to the startup Item, start at the startup level, and then start it at the next startup.

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.