如何将Oracle Linux 5.x引导到救援模式 (Doc ID 1516777.1)

How to Boot Oracle Linux 5.x into Rescue Mode (Doc ID 1516777.1)

APPLIES TO:

Linux OS - Version Oracle Linux 4.4 to Oracle Linux 5.11 [Release OL4U4 to OL5U11]
Oracle Cloud Infrastructure - Version N/A and later
Linux x86-64
Linux x86

GOAL

It is possible to boot Linux in rescue mode using the installation media and bypassing the disk. During the rescue session, you can choose network. Once the system is up, you will have access to the disk.  可以使用安装介质并绕过磁盘以应急模式启动Linux。在救援期间,您可以选择网络。系统启动后,您将可以访问磁盘。

Note: In rescue mode, HDD/NIC will be recognized by the rescue mode OS, and they could be different from the names in normal boot  注意:在救援模式下,HDD/NIC将由救援模式操作系统识别,并且它们可能与正常引导中的名称不同

 

SOLUTION

Follow the below steps to boot in rescue mode:  请按照以下步骤以应急模式启动


1) Boot from the Linux  Installation Media   (this may require you to change the bios to boot from dvd) 从Linux安装介质引导(这可能需要您将BIOS更改为从DVD引导)

    
2) Choose Rescue Mode by typing the following at the boot prompt and pressing <Enter>: 通过在引导提示符下键入以下内容并按<Enter>键,选择Rescue Mode

boot: linux rescue

3) Choose the Language  选择语言
       Select desired language using arrow keys then press enter.  语言使用箭头键选择所需的语言,然后按Enter

4) Choose Keyboard Type  选择键盘类型
       Select desired keyboard type using arrow keys then press enter.  使用箭头键选择所需的键盘类型,然后按Enter


5) Network Interfaces  网络接口
       The network interfaces are unnecessary. Use arrow keys to highlight No then press enter. 不需要网络接口。使用箭头键突出显示No,然后按Enter


6) Choose to mount the filesystem automatically. or choose Skip mounting current system if you intend to fsck(8) the disk (a filesystem that will be checked must be unmounted)  选择自动挂载文件系统。或如果要fsck(8) 磁盘,则选择“跳过Skip挂载当前系统”(必须卸载要检查的文件系统)You are currently in Rescue Mode.  If you allowed it, your root filesystem should be mounted as the /mnt/sysimage directory.  For example, your /etc/fstab will be present at the /mnt/sysimage/etc/fstab location.  您目前处于救援模式。如果允许的话,您的根文件系统应作为/mnt/sysimage目录挂载。例如,您的/etc/fstab将出现在/mnt/sysimage/etc/fstab位置。

7) You can switch contexts so all the files will be available at their usual locations:  您可以切换上下文,以便所有文件都可以在其通常位置使用

# chroot /mnt/sysimage
# pwd
/
#

Although you are accessing the user-space files of your root filesystem, remember that you are still using the boot environment (such as the kernel and device inventory) from the rescue mode.  Programs such as df(1) or mount(8) may not give the expected results.  Leave the chroot(1) context by using exit(1) twice: once to exit the chroot(1) and again to exit rescue mode and reboot:

尽管您正在访问根文件系统的用户空间文件,但请记住,您仍在从应急模式使用引导环境(例如内核和设备清单)。诸如df(1) 或mount(8)之类的程序可能无法提供预期的结果。两次使用exit(1) 离开chroot(1) 上下文:一次退出chroot(1) ,再次退出救援模式并重新启动:

# echo Leaving chroot envronment
# exit
# echo Leaving rescue mode and rebooting
# exit

Here we have omitted some extra messages giving details about the process. 这里我们省略了一些额外的消息,提供了有关该过程的详细信息。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值