小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

linux援救模式:linux rescue使用詳細圖解 - 操作系統(tǒng)

 飄 陽 2010-07-17
linux援救模式:linux rescue使用詳細圖解

網(wǎng)上很多網(wǎng)友問怎么進rescue 模式,不知道怎么用rescue來挽救系統(tǒng)。
現(xiàn)在我來圖解進入rescue (示例系統(tǒng)為RHEL 3)
1。用安裝光盤或者硬盤安裝的方式進入安裝界面,在shell 中輸入 linux rescue

!!!Image resized! Click here to see original image!!
!!!Original width:640 Original height:480 Retry times:1 !!!

2。然后根據(jù)提示選擇語言和鍵盤格式
!!!Image resized! Click here to see original image!!
!!!Original width:640 Original height:480 Retry times:1 !!!
!!!Image resized! Click here to see original image!!
!!!Original width:640 Original height:480 Retry times:1 !!!

3。選擇是否配置網(wǎng)卡一般系統(tǒng)到了要rescue了,網(wǎng)絡也就不需要了,所以可以選擇否跳過網(wǎng)卡配置,當然你如果需要也可以選擇是,具體設(shè)置過程和安裝時一樣。

!!!Image resized! Click here to see original image!!
!!!Original width:640 Original height:480 Retry times:1 !!!

4。選擇是否然讓系統(tǒng)查找硬盤上的RHEL 系統(tǒng),選擇繼續(xù)。

!!!Image resized! Click here to see original image!!
!!!Original width:640 Original height:480 Retry times:1 !!!

5。硬盤上的系統(tǒng)已經(jīng)被找到并掛載在/mnt/sysimage 下
!!!Image resized! Click here to see original image!!
!!!Original width:640 Original height:480 Retry times:1 !!!

6。按提示chroot /mnt/sysimage
!!!Image resized! Click here to see original image!!
!!!Original width:640 Original height:480 Retry times:1 !!!
chroot 之后你就可以已經(jīng)在你的要被拯救的系統(tǒng)下了。
grub掛了的,grub-install /dev/hdxx
配置文件改錯的,vi /etc/fstab vi /etc/inittab ..................
軟件包被毀的 rpm -F xxx.rpm

完成修復工作后,exit命令退出chroot,exit退出rescue shell 系統(tǒng)重啟。

備注:
如果你硬盤上的系統(tǒng)是非rhel系統(tǒng)如debian的,那么在第4步時,rescue 程序會找步不到硬盤上的系統(tǒng),所以我們這是選擇"跳過",直接進入shell。假設(shè)現(xiàn)在硬盤上的有一個debian 系統(tǒng) /dev/hda1 為/boot 分區(qū) /dev/hda5 為 / 分區(qū) /dev/hda6 為swap。那么我們現(xiàn)在這么做。

代碼:

# fdisk -l (查看分區(qū)情況)

www.


# mkdir /mnt/linux
# mkdir /mnt/linux/boot  (根據(jù)fdisk -l 得到的信息創(chuàng)建目錄)
# mount -t ext3 /dev/hda5 /mnt/linux
# mount -t ext3 /dev/hda1 /mnt/linux/boot (掛載硬盤上的文件系統(tǒng))
# chroot /mnt/linux (chroot 改變工作系統(tǒng))
#



自此我們順利進入硬盤上的debian系統(tǒng),剩下來到就和先前一樣了,有冤的報冤有仇的報仇。
另:
如果你的系統(tǒng)是文件系統(tǒng)損壞那么就不用掛載,chroot 系統(tǒng)了。
直接 fsck /dev/hdxx 即可。

其實我們仔細想想這個rescue會發(fā)現(xiàn),所謂rescue 模式只是一個帶shell 的linux 運行環(huán)境而已,然后通過mount 和 chroot進入要修復的系統(tǒng)的。
所以在沒有rescue 盤的情況下我可以利用 Linux livecd 或 軟盤版的linux 進入shell 環(huán)境然后重做
代碼:

# fdisk -l (查看分區(qū)情況)
# mkdir /mnt/linux
# mkdir /mnt/linux/boot  (根據(jù)fdisk -l 得到的信息創(chuàng)建目錄)
# mount -t ext3 /dev/hda5 /mnt/linux
# mount -t ext3 /dev/hda1 /mnt/linux/boot (掛載硬盤上的文件系統(tǒng))
# chroot /mnt/linux (chroot 改變工作系統(tǒng))
#


就可以簡單的進入一個rescue 環(huán)境了

    本站是提供個人知識管理的網(wǎng)絡存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點。請注意甄別內(nèi)容中的聯(lián)系方式、誘導購買等信息,謹防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊一鍵舉報。
    轉(zhuǎn)藏 分享 獻花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多