好湿?好紧?好多水好爽自慰,久久久噜久噜久久综合,成人做爰A片免费看黄冈,机机对机机30分钟无遮挡

主頁 > 知識庫 > CentOS 6誤刪除的boot分區該如何還原恢復

CentOS 6誤刪除的boot分區該如何還原恢復

熱門標簽:長沙呼叫中心外呼系統穩定嗎 昆明crm外呼系統價格 臨沂語音電話機器人公司 騰沖銷售外呼管理系統服務 電銷機器人自動撥號信息 用什么軟件做地圖標注 洛陽外呼增值業務線路解決方案 400電話申請安裝 北京地圖標注平臺注冊入駐

  在CentOS 6系統中,因為不小心或操作失誤導致boot分區被刪除,遇到這種情況是否能夠恢復被刪除的boot分區呢?其實是可以的,下面隨小編一起來了解下吧。

  1.首先利用centos6鏡像進入linux rescue救援模式。

  2.啟動sshd服務,查看eth0獲取的ip地址,然后用ssh secure shell 連接。

  SSH Secure Shell 3.2.9 (Build 283)

  Copyright (c) 2000-2003 SSH Communications Security Corp - http://www.ssh.com/

  This copy of SSH Secure Shell is a non-commercial version.

  This version does not include PKI and PKCS #11 functionality.

  [root@localhost ~]# cd /boot //進入/boot分區

  [root@localhost boot]# ls //查看boot分區的內容

  config-2.6.32-71.el6.i686 symvers-2.6.32-71.el6.i686.gz

  grub System.map-2.6.32-71.el6.i686

  initramfs-2.6.32-71.el6.i686.img vmlinuz-2.6.32-71.el6.i686

  [root@localhost boot]# cd 。。//返回上層目錄

  [root@localhost /]# rm -rf /boot/*//刪除/boot分區所有內容

  [root@localhost /]# ls /boot//查看/boot分區內容為空

  [root@localhost /]# mount /dev/sr0 /mnt//掛載cdrom設備到/mnt目錄下

  mount: block device /dev/sr0 is write-protected, mounting read-only

  [root@localhost /]# rpm -ivh /mnt/Packages/kernel-2.6.32-71.el6.i686.rpm --root=/ --force //安裝光盤的kernel軟件包

  Preparing.。。 ########################################### [100%]

  1:kernel ########################################### [100%]

  [root@localhost /]# ls /boot //查看/boot分區內容

  config-2.6.32-71.el6.i686 System.map-2.6.32-71.el6.i686

  initramfs-2.6.32-71.el6.i686.img vmlinuz-2.6.32-71.el6.i686

  symvers-2.6.32-71.el6.i686.gz

  [root@localhost /]# mkdir /boot/grub//在/boot目錄新建一個grub目錄

  [root@localhost /]# touch /boot/grub/grub.conf//新建一個grub.conf配置文件

  [root@localhost /]# cp -rf /usr/share/grub/i386-pc/* /boot/grub/ //把/usr/share/grub/i386-pc的所有內容拷貝到/boot/grub中。

  [root@localhost /]# ls /boot//查看/boot分區內容

  config-2.6.32-71.el6.i686 symvers-2.6.32-71.el6.i686.gz

  grub System.map-2.6.32-71.el6.i686

  initramfs-2.6.32-71.el6.i686.img vmlinuz-2.6.32-71.el6.i686

  [root@localhost /]# ls /boot/grub/ //查看/boot/grub目錄內容

  e2fs_stage1_5 iso9660_stage1_5 stage1 vstafs_stage1_5

  fat_stage1_5 jfs_stage1_5 stage2 xfs_stage1_5

  ffs_stage1_5 minix_stage1_5 stage2_eltorito

  grub.conf reiserfs_stage1_5 ufs2_stage1_5

  [root@localhost /]# fdisk -l //查看分區

  Disk /dev/sda: 21.5 GB, 21474836480 bytes

  255 heads, 63 sectors/track, 2610 cylinders

  Units = cylinders of 16065 * 512 = 8225280 bytes

  Sector size (logical/physical): 512 bytes / 512 bytes

  I/O size (minimum/optimal): 512 bytes / 512 bytes

  Disk identifier: 0x000b1db4

  Device Boot Start End Blocks Id System

  /dev/sda1 * 1 13 102400 83 Linux//這個為/boot啟動分區

  Partition 1 does not end on cylinder boundary.

  /dev/sda2 13 144 1048576 82 Linux swap / Solaris

  Partition 2 does not end on cylinder boundary.

  /dev/sda3 144 2611 19819520 83 Linux //這個為/根分區

  [root@localhost /]# mount//查看所有掛載分區

  /dev/sda3 on / type ext4 (rw)//根分區

  /dev/sda1 on /boot type ext4 (rw)//boot分區為sda1

  devpts on /dev/pts type devpts (rw)

  tmpfs on /dev/shm type tmpfs (rw)

  proc on /proc type proc (rw)

  sysfs on /sys type sysfs (rw)

  /dev/sr0 on /mnt type iso9660 (ro)

  [root@localhost /]# grub//啟動grub

  Probing devices to guess BIOS drives. This may take a long time.

  GNU GRUB version 0.97 (640K lower / 3072K upper memory)

  [ Minimal BASH-like line editing is supported. For the first word, TAB

  lists possible command completions. Anywhere else TAB lists the possible

  completions of a device/filename.]

  grub》 root (hd0,0) //首先find /grub/stage1查看/boot分區為(hd0,0)

  root (hd0,0)//設置/boot分區為/dev/sda1

  Filesystem type is ext2fs, partition type 0x83

  grub》 setup (hd0)//重新安裝grub

  setup (hd0)

  Checking if “/boot/grub/stage1” exists.。。 no

  Checking if “/grub/stage1” exists.。。 yes

  Checking if “/grub/stage2” exists.。。 yes

  Checking if “/grub/e2fs_stage1_5” exists.。。 yes

  Running “embed /grub/e2fs_stage1_5 (hd0)”。。。 26 sectors are embedded.

  succeeded

  Running “install /grub/stage1 (hd0) (hd0)1+26 p (hd0,0)/grub/stage2 /grub/grub.conf”。。。 succeeded

  Done.

  grub》 quit//退出 

  3.重新reboot啟動系統進入grub界面測試

  4.查找find /grub/stage1然后找到/boot分區為(hd0,0),指定kernel,initrd, boot啟動系統成功。

  5.系統啟動成功,然后進入系統重新寫/boot/grub/grub.conf文件。

  6.[root@localhost /]# vi /boot/grub/grub.conf配置文件如下:

  最后填寫grub.conf文件內容

  default=0 //默認菜單為第一個

  timeout=6//等待時間為6秒

  title mylinux //啟動標題為mylinux

  root (hd0,0) //boot所在分區為/dev/sda1

  kernel /vmlinuz-2.6.32-71.el6.i686 ro root=/dev/sda3 rhgb quiet//kernel所在位置以只讀模式掛載/dev/sda3根分區rhgb quiet為安靜模式不顯示內核信息。

  initrd /initramfs-2.6.32-71.el6.i686.img//加載initrd鏡像。

  7.最后進入linux rescue重建一個grub

  8.最后啟動界面如下

  上面就是CentOS 6恢復被刪除boot分區的方法介紹了,步驟有些長,如果覺得麻煩的話可以重裝系統,同樣能恢復boot分區。

標簽:昌都 通化 涼山 濰坊 汕頭 遼寧 三亞 南充

巨人網絡通訊聲明:本文標題《CentOS 6誤刪除的boot分區該如何還原恢復》,本文關鍵詞  CentOS,誤,刪除,的,boot,分區,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《CentOS 6誤刪除的boot分區該如何還原恢復》相關的同類信息!
  • 本頁收集關于CentOS 6誤刪除的boot分區該如何還原恢復的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 麻豆精品国产片在线观看| 亚洲国产精品一区二区久久阿宾 | 97欧美在线| 我的娇妻h| 穆桂英双乳高耸A片| 欧美日本一级特黄大片无码久久 | 嗯啊轻点疼| 成人免费版??欧美州 | 91最新91精品91蝌蚪| 国产三级三级三级| 人妻91丨PORNY丨最新| 麻豆 白洁少妇在线播放| 国内精品久久久久电影al换脸| 欧美激情站| 天天干天天曰| 九色app| 久久免费大片| 三十真人36式春交图| 俄罗斯女兵奶又白又大| 吃美女的黄金vk| 黑人巨茎大战欧美白妇免费| 免费观看的黄色网址| 亚洲一区二区三区无码少年阿宾| 三级短视频网站| 一级毛片aa高清免费观看| 美国一级毛片a| 精品一区二区在线欧美日韩| 亚洲偷窥XXXx盗摄国产| 女人被男人艹| 欧美一级欧美一级在线播放| 理论片琪琪午夜电影| 国产精品人妻无码久久久久| 曰韩色视频| 被各种姿势c到h调教| 久久国产精品偷任你爽任你A| 婷婷国产成人精品视频小说 | 亚洲AV中文AⅤ无码60分钟| 天天看无码AV精品97| 黄色的网站免费| 他九浅一深轻点爽死啦太深了| 美女在线播放|