A new understanding of RHEL5's catastrophic recovery

Source: Internet
Author: User
A new understanding of RHEL5's catastrophic recovery-Linux Enterprise applications-Linux server applications. For more information, see the following. 1. first of all, the environment of the system hardware needs to be viewed through the df command, in my experiment environment, Linux installed logical volume is marked as/dev/mapper/vol0-boot, start what I see:/dev/vol0/root. After viewing it with the ls-al command, I realized it was a soft link file that was connected to the/dev/mapper/vol0-boot. Therefore, this device uses ls-al to display brwxr-xr-x. Therefore, it should be a block device. Therefore, you cannot use cat to view this file.

2. mount Points in the "fake Linux" environment, the need to mount/dev/mapper/vol0-boot to a directory, so that you can easily view the original system, it also facilitates fstab boot errors and cannot be solved by enabling the chroot format. the specific method is:

First, use the logical volume management command lvm to mount the logical volume.

For example, because my logical volume cannot be identified due to the change of fstab, you must first use lvm vgscan to view your logical volume and display it as/dev/vol0/root. then use lvm vgchange-ay to mount the logical volume. previously, I did not notice the mounting of the logical volume, but I used/dev/vol0/root mechanically and did not understand the true meaning.

As can be seen from the above, in the virtual machine mode, because the optical drive loads a mount partition, it does not need to use lvm commands so complicated.

Mkdir a file directory, such as abc, then mount/dev/mapper/vol0-boot/abc. in this way, you can cd. /etc to modify the renamed fstab file. (Here, I would like to add that the fstab file is a very important file. After it is deleted, it may not succeed even if the same file as the source file is used for rewriting, the operation is the same as that of userdel and re-create the user. The sid may not be the same .) after modification, exit and restart the system to boot fstab normally. Then, you can use chroot to switch the real root identity and perform the following operations.

In addition, the teacher encountered a problem today. in XP and Linux systems, the four partitions in the primary partition are allocated to the system locations of the four systems, rather than the Linux Root partition mentioned by the teacher will be divided into logical partitions. I understand it easily. For example, in a Windows system, drive C is the content of the primary partition (of course, apart from the system, other files can only be regarded as files placed in the primary partition, which is essentially not much different from files in the logical partition), other D, E, fdisk is regarded as its logical partition. because they all belong to the Windows system, they all use the Windows file partition format FAT32 & NTFS, and want to install Linux on this basis, you must partition a part of the partition to install the partition in an undefined file format. therefore, the ext3 format is not applicable to Windows, so it is naturally re-installed into a new primary partition, such as Windows Installed in (hd0, 0 ), then, Linux should be installed in (hd0, 1) instead of hd ). this understanding is incorrect. linux cannot be installed in a logical partition. in this case, Grub cannot boot to the Linux system.

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.