1) Linux Resuce mode.
Using rescue mode, you can access the files stored on your system’s hard drive, even if you cannot actually run Red Hat Linux from that hard drive.
To boot into rescue mode, you must be able to boot the system using one of the following methods:
*
By booting the system from an installation boot diskette made from the bootdisk.img image. [1]
*
By booting the system from an installation boot CD-ROM. [2]
*
By booting the system from the Red Hat Linux CD-ROM #1.
Once you have booted using one of the described methods, enter the following command at the installation boot prompt:
linux rescue
It also prompts you to select where a valid rescue image is located. Select from Local CD-ROM
The rescue environment will now attempt to find your Red Hat
Linux installation and mount it under the directory
/mnt/sysimage. You can then make any changes required to your
system. If you want to proceed with this step choose
‘Continue’. You can also choose to mount your file systems
read-only instead of read-write by choosing ‘Read-only’.
If for some reason this process fails you can choose ‘Skip’
and this step will be skipped and you will go directly to a
command shell.
If you select Continue, it will attempt to mount your file system under the directory /mnt/sysimage. If it fails to mount a partition, it will notify you. If you select Read-Only, it will attempt to mount your file system under the directory /mnt/sysimage, but in read-only mode. If you select Skip, your file system will not be mounted. Choose Skip if you think your file system is corrupted.
If you selected Continue to mount your partitions automatically and they were mounted successfully, you are in single-user mode.
Even if your file system is mounted, the default root partition while in rescue mode is a temporary root partition, not the root partition of the file system used during normal user mode (runlevel 3 or 5). If you selected to mount your file system and it mounted successfully, you can change the root partition of the rescue mode environment to the root partition of your file system by executing the following command:
chroot /mnt/sysimage
This is useful if you need to run commands such as rpm that require your root partition to be mounted as /. To exit the chroot environment, type exit, and you will return to the prompt.
If you selected Skip, you can still try to mount a partition manually inside rescue mode by creating a directory such as /foo, and typing the following command:
mount -t ext3 /dev/hda5 /foo
In the above command, /foo is a directory that you have created and /dev/hda5 is the partition you want to mount. If the partition is of type ext2, replace ext3 with ext2
fdisk -l
From the prompt, you can run many useful commands such as
*
list-harddrives to list the hard drives in the system
*
ssh,scp, and ping if the network is started
*
dump and restore for users with tape drives
*
parted and fdisk for managing partitions
*
rpm for installing or upgrading software
*
joe for editing configuration file
=======================================================================================
2) Booting into Single-User Mode
One of the advantages of single-user mode is that you do not need a boot diskette or CD-ROM; however, it does not give you the option to mount the file systems as read-only or not mount them at all.
In single-user mode, your computer boots to runlevel 1. Your local file systems are mounted, but your network is not activated. You have a usable system maintenance shell. Unlike rescue mode, single-user mode automatically tries to mount your file system; do not use single-user mode if your file system can not be mounted successfully. You can not use single-user mode if the runlevel 1 configuration on your system is corrupted.
If your system boots, but does not allow you to log in when it has completed booting, try single-user mode.
If you are using GRUB, use the following steps to boot into single-user mode:
1.
If you have a GRUB password configured, type p and enter the password.
2.
Select Red Hat Linux with the version of the kernel that you wish to boot and type e for edit. You will be presented with a list of items in the configuration file for the title you have selected.
3.
Select the line that starts with kernel and type e to edit the line.
4.
Go to the end of the line and type single as a separate word (press the [Spacebar] and then type single). Press [Enter] to exit edit mode.
5.
Back at the GRUB screen, type b to boot into single-user mode.
If you are using LILO, at the LILO boot prompt (if you are using the graphical LILO, you must press [Ctrl]-[x] to exit the graphical screen and go to the boot: prompt) type:
linux single
==========================================================================================
3) Booting into Emergency Mode
In emergency mode, you are booted into the most minimal environment possible. The root file system will be mounted read-only and almost nothing will be set up. The main advantage of emergency mode over single-user mode is that the init files are not loaded. If init is corrupted or not working, you can still mount file systems to recover data that could be lost during a re-installation.
To boot into emergency mode, use the same method as described for single-user mode in Section 9.3 Booting into Single-User Mode with one exception, replace the keyword single with the keyword emergency.
===========================================================================================