enabling you to select DHCP network configuration or manually enter the network details.

Figure 10-27 shows the next screen, which offers to mount your hard disk directories for you. If you need to access files on your hard disk, select Continue; if you need to access files on your hard disk but want to avoid the possibility of damaging any files, select Read-Only; and if you do not want to mount the hard disk filesystems (for example, because you want to work on the filesystems first, resizing or repairing them), select Skip.

Figure 10-27. Hard disk mounting dialog

Figure 10-28 shows the final dialog that will be displayed before a root shell is opened, which informs you whether the hard disk filesystems were mounted. Select OK to proceed to a root shell.

Figure 10-28. Final dialog before the rescue-mode shell

A minimal environment is available in the rescue-mode shell, providing access to the most important system administration commands.

If you requested that the hard disk filesystems be mounted, the mount point will be /mnt/sysimage , and the mounts will be cascaded properly. Therefore, if you have separate /boot and /home filesystems, they will be mounted under /mnt/sysimage/boot and /mnt/sysimage/home .

If you selected a read/write mount, you can temporarily make the root directory of the hard disk your root directory using the chroot command:

sh-3.1# chroot /mnt/sysimage

You can now access directories in their usual locations ( /etc , /home , and so forth), and you'll have access to all of the software installed on the hard disk.

When you issue the chroot command, you will no longer be accessing the software on the installation disc. Therefore, if the commands installed on the hard disk filesystems are corrupted or damaged, you will be using the corrupted or damaged versions. Likewise, if the software on your hard disk is newer than the software on the installation disc, you will be using the newer versions. 

Press Ctrl-D (for done) to exit from the chroot shell and return to the normal rescue shell.

If you chose not to mount your hard disk filesystems, any LVM volume groups on your hard disks will be inaccessible. To access the VGs, issue these commands:

sh-3.1# lvm vgscan

Reading all physical volumes. This may take a while...

Found volume group 'main' using metadata type lvm2

sh-3.1# lvm vgchange -ay

2 logical volumes in volume group 'main' now active

You can then access the logical volumes as /dev/<pv>/<lv> (for example, /dev/main/root ).

When you are finished with the shell, press Ctrl-D. The system will automatically reboot.

10.6.2. How Does It Work?

Rescue mode uses the same Linux kernel, initrd ramdisk, and device probing that are used during the installation process to create a minimal work environment using only software loaded from the installation disc. The same code that is used to detect and mount existing Fedora partitions for an upgrade installation is used to mount the partitions during rescue mode.

The chroot command changes the definition of the root directory for one processin this case, a shelland any processes started by that shell. Changing the root directory effectively changes the PATH so that the software installed in the chroot environment (software on the hard disk) is used while the chroot is active. When you exit from the chroot shell, the root directory reverts to the root directory of the installation session, which is a ramdisk.

10.6.3. What About...

10.6.3.1. ...copying files to or from another machine while in rescue mode?

The scp command is available in rescue mode and can be used to copy files to or from another Fedora system (or other Linux host). You must enable the network interfaces in order for this to work.

To copy a file from an FTP or HTTP server, use wget :

sh-3.1# wget http://192.168.1.2/help.txt

10.6.3.2. ...using a GUI while in rescue mode?

Unfortunately, there's not enough of the supporting infrastructure in place in rescue mode to support the use of a GUI.

10.6.3.3. ...accessing software from the hard disk without using chroot?

Set your path to include directories on the mounted hard disk filesystems:

sh-3.1# PATH=$PATH:/mnt/sysimage/bin:/mnt/sysimage/usr/bin: /mnt/sysimage/sbin:/mnt/sysimage/usr/sbin:/mnt/sysimage/usr/local/bin

Type this command on one line.

10.6.4. Where Can I Learn More?

Вы читаете Fedora Linux
Добавить отзыв
ВСЕ ОТЗЫВЫ О КНИГЕ В ИЗБРАННОЕ

0

Вы можете отметить интересные вам фрагменты текста, которые будут доступны по уникальной ссылке в адресной строке браузера.

Отметить Добавить цитату
×