****************************************************
  切記使用fsck一定要先解除安裝分割槽,否則後果自負
****************************************************
   【一】
  
     是出現經常非法關機,斷電,導致檔案系統不連續,而在強制檢查後不能通過的情況,系統會進入一個修復(repair)模式,
需要遠端協助開啟network和sshd服務,然後 cd /boot; umount / ;  fsck -y /dev/sda3(假設根目錄分割槽為sda3)
   這裡可能會有一些不連續或者部分損壞的檔案被系統擱置到/lost+found目錄下,都以#開頭,以節點命名的目錄,
需要手動恢復,恢復步驟自行到網上查詢,需要確認原來的目錄結構
   【二】
    另外一種比較嚴重,同樣因為某些原因,例如升級核心,例如頻繁斷電,導致啟動到核心後,出現類似以下錯誤,
              
               Boot error:
                —————————————————–
               
                root (hd0,0)
                Filesystem type is ext2fs, partition type 0x83
                kernel /vmlinuz-2.6.15.6 ro root=LABLE=/ rhgb quiet
                   [Linux-bzImage, setup=0x1e00, size=0x1807f8]
                initrd /initrd-2.6.15.6.img
                   [Linux-initrd @ 0x37f82000, 0x6d283 bytes]
               
                Uncompressing Linux… Ok, booting the kernel.
                Red Hat nash version 4.1.18 starting
                mkrootdev: label / not found
                umount /sys failed:16
                mount: error 2 mounting ext3
                mount: error 2 mounting none
                switchroot: mount failed: 22
                umount /initrd/dev failed: 2
                Kernel panic – not syncing: Attempted to kill init!
                ——————————————————-
            a.  遠端協助,進入grub後,能否檢測到系統完整的 LINUX分割槽,如果分割槽完整,並且進一步分割槽下的目錄結構和檔案初步完整,OK
                將 kernel 後的 root=LABEL=/ 改成 root=/dev/hda3 或者 root=/dev/sda3 (根目錄所在分割槽,我一般分為sda3)
                應該可以順利進入系統,然後參考 mklabel 命令,給根分割槽打上LABEL,或者修改grub.conf,將標籤項改成用分割槽表示,然後grub-install ….
                進行grub安裝
               
            b. 遠端協助,進入grub後,只能檢測到/boot所在分割槽,而root分割槽不完整,只能通過進入rescue模式,或者用live cd, 利用fsck了,
               這裡提醒一下,儘量別用帶x-window的LIVECD,這種垃圾盤把我害慘了.
               另外儘量平時能備些CD的盤,大家用習慣了DVD,可是這次的情況就是伺服器上沒有DVD,全是CD,又找不來移動DVD
               只能通過網路PXE來完成了…..
           
            c. 把磁碟掛載到其他的主機上個別分割槽如果掛載不上提示指定檔案系統的話我們可以通過如下步驟來恢復資料:
            恢復資料實踐步驟!!!
  1.複製磁碟
  dd if=源盤分割槽  of=目標盤分割槽 (最好一模一樣大小) ,例如目標盤分割槽為/dev/sdb3
  2.
  mkfs.ext3 -n /dev/sdb3   (一定要有-n,切記)  記住最後一個數字值
  3.
  screen -S check
  fsck -b  XXXX /dev/sdb3 -y
  XXX為第二部裡最後一個數字
  開始檢測,不用管,按 Ctrl+a -> d ,切換到後臺,等掃描完, fsck -y /dev/sdb3 確認。
  4.
  mount /dev/sdb3 /mnt
   【三】
  
       至於連grub都進不去的,不用說了,遠端協助,直接進入live cd 或者 rescue模式,先看分割槽是否完整,如果完整,直接用grub-install…….,具體使用參考網路
       如果分割槽不完整,那隻能用資料恢復軟體,資料重要的話就花點時間找吧,或者花點money,不重要的話直接reinstall吧,嘎嘎
     
     
     
     
 
 
 
     
 另外給一個網上的參考
 ================================================================= 
 
                  Boot error:
                 
                  —————————————————–
                 
                  root (hd0,0)
                  Filesystem type is ext2fs, partition type 0x83
                  kernel /vmlinuz-2.6.15.6 ro root=LABLE=/ rhgb quiet
                     [Linux-bzImage, setup=0x1e00, size=0x1807f8]
                  initrd /initrd-2.6.15.6.img
                     [Linux-initrd @ 0x37f82000, 0x6d283 bytes]
                 
                  Uncompressing Linux… Ok, booting the kernel.
                  Red Hat nash version 4.1.18 starting
                  mkrootdev: label / not found
                  umount /sys failed:16
                  mount: error 2 mounting ext3
                  mount: error 2 mounting none
                  switchroot: mount failed: 22
                  umount /initrd/dev failed: 2
                  Kernel panic – not syncing: Attempted to kill init!
                  ——————————————————-
                 
                  蒐集了網上提到的解決方法:
                 
                  A. 修改grub.conf ==>  root=305
                  B. 修改grub.conf ==>  root=/dev/sdax
                  C. 修改grub.conf ==>  root=LABLE=/1
                  D. disable SMP
                  E. build-in ext3/SATA/ATA/SCSI
                  F. 根據現有/etc/modprobe,使用mkinitrd手動生成initrd-2.6.15.6.img
                 
                  均無法解決,當前系統提示:
                 
                  root (hd0,0)
                  Filesystem type is ext2fs, partition type 0x83
                  kernel /vmlinuz-2.6.15.6 ro root=LABLE=/ rhgb quiet
                     [Linux-bzImage, setup=0x1e00, size=0x1807f8]
                  initrd /initrd-2.6.15.6.img
                     [Linux-initrd @ 0x37f82000, 0x6d283 bytes]
                 
                  Uncompressing Linux… Ok, booting the kernel.
                  Red Hat nash version 4.1.18 starting
                  mount: error 6 mounting ext3
                  mount: error 2 mounting none
                  switchroot: mount failed: 22
                  umount /initrd/dev failed: 2
                  Kernel panic – not syncing: Attempted to kill init!
                  ——————————————————————-
                 
                  可能性:
                 
                  1、scsi驅動不正確;
                 
                  2、系統在沒有完成裝置檢測前就開始掛載分割槽;
                 
                  3、多硬碟引導。
 
 
 
四。
switching to new root
exec of init (/sbin/init/)failed!!!:2
umount /initrd/dev failed:2
kernel panic -not syncing:Attempeed to kill init !
先進入修復模式,然後看一下chroot /mnt/sys(後面的忘了,tab一下)  能不能將根掛起來,如果掛不起來說明你的fstab都有問題,
如果是這樣,mkdir test建立一個test目錄,再用e2label 找到你的根分割槽對應的裝置號如找到為/dev/hda2 ,然後使用mount /dev/hda2 test
將根掛到剛才新建的test目錄下,這樣進如test目錄就可以對fstab進行修改了,順便看看inittab檔案是否正確,一般這樣就可以解決問題了.
如果還是不行,就將boot分割槽中的內容刪掉,再重新生成.一般只要不是超高難度問題,這樣的方法都可以解決.估計你可能還是分割槽的fstab表對應有問題