1. 程式人生 > >ubuntu無法啟動的解決方法

ubuntu無法啟動的解決方法

相關文章

我經常遇到這樣的事情:關閉ubuntu系統的時候宕機了,只能按電源鍵了,再次啟動的時候就起不來了,起不來的現象還分兩種,解決辦法也不一樣,如下:

情況1

現象:具體記不清了,反正是開始檢查磁碟,然後報錯:unrecoverable error什麼的,然後就停在那兒了好像。

解決辦法:

For those of you with Wubi problems, here's how to mount your root.disk, and recover your files using a LiveCD:

  1. Boot your computer, enter your BIOS by pressing the key it tells you to press at the first splash screen you come to at startup, put the CD/DVD drive first in the boot sequence, insert your LiveCD, then save the changes, and exit your BIOS.
  2. Your computer should now boot from the CD.
  3. In the Ubuntu setup program, select the preferred language you use, then select the "Try Ubuntu with No Change To My Computer" option.
  4. Once at the Ubuntu desktop, in a Live session, open up Applications->Accessories>Terminal.
  5. Now run:
sudo fdisk -l

sudo mkdir /win

sudo mount /dev/sdxy /win

sudo mkdir /vdisk

sudo mount -o loop /win/ubuntu/disks/root.disk /vdisk

	

where the "x" and the "y" in "sdxy" is replaced with the correct HDD letter (starting at  a   of course), and the correct partition number (starting at 1), of the Windows partition your Wubi install is on. The first command will have given you the location.
Once running those commands, open up Places>Computer>Filesystem>vdisk, and you should find the contents of your root.disk in there. Now you can backup your data to external media, and reinstall Ubuntu with Wubi if you like.

You can also try running the 

sudo fsck /win/ubuntu/disks/root.disk

	

command to fix any filesystem errors that may be interfering with the boot, if that's the problem.

Hope it helps.

===========================================================================

情況2

現象:先閃過一個什麼提示介面,太快了,看不清楚,然後就是進入grub> 提示符,不動了。

解決辦法:

Did this ever happen to you? It sucks right? You simply wished 'you should have installed natively (the old way)'.

So your Ubuntu won't boot because root.disk is missing, then you check outc:/ubuntu/disks , it's not there. (And probably,  disks   directory is not even accessible or is missing too.)  o_O 

So what happened? Your  NTFS filesytem   got corrupted because on many reasons -- primarily, you might had a power interruption.

Is it lost then? I'm not sure but let's hope it didn't. You can try to recoverroot.disk   by following this steps:
1. Run  command prompt   as Administrator -- needless to say, 'Enter your password '.

2. Run  Check Disk   by typing:  chkdsk c: /f   (change  C:   to your local disk drive)(我的註釋:我的ubuntu是裝在e:/ubuntu的,所以,我需要檢查e盤,我用的命令是 chkdsk e: /r,我用的是/r引數,不是/f引數,/r也是從網上看來的,試過的可以的,/f沒試過,估計也可以吧)
NOTE:   There's a big change that a message will show.
(我的註釋:系統可能提示說要不要解除安裝這個卷,選否,它又問要不要下次啟動的時候檢查,選擇是。重啟,進入檢查階段後,可能遇到百分之多少的時候好像死掉了,其實沒有,要有耐心多等會兒)Chkdsk cannot run because the volume is in use by another process. Would you like to schedule this volume to be checked the next time the system restarts? (Y/N) 
Just type  Y   and restart you PC immediately.

3. After it finished checking (and possibly,  repairing ) your disk, make sure to show your hidden files .

4. Look for your (onced missing)  root.disk   under  c:/found.000   directory and put it back to  c:/ubuntu/disks/ .
NOTE:   Your  swap.disk   could also be inside  found.000 .
(我的註釋:當你想開啟found.000的時候,系統可能提示說不能檢視,你可以以管理員身份執行cmd.exe,然後用cd命令進入found.000,用move命令將裡面的boot, disk, swap三個東西剪下到e:/ubuntu/disks/下,我是裝載e盤的,你的可能在其他盤,如果沒有disks目錄就先手動建一個)
Now, try to reboot your Windows and choose Ubuntu then hope that the recovered file is intact and not corrupted.  ;)

================================================================================

情況3

現象:我修改了/etc下的某個檔案,重啟的時候,在過了選擇window還是ubuntu的介面之後就黑屏了,硬碟燈閃了一會兒也滅了,按什麼都沒反應,短按(太短不行,太長就直接關機了,要適中)電源鍵會短暫出現ubuntu登入介面,就是一行ubuntu的字,下面幾個點的那個介面,然後關機。

原因:就是因為改了/etc的某個檔案啊,/etc這個目錄是比較重要的,不能隨便改,即使要改也要做好備份,便於恢復,要是忘了當時怎麼改的,那就慘了。

解決辦法:

參照情況1,從cd啟動ubuntu,把“那個ubuntu的”root.disk掛在到現在的這個ubuntu系統下,例如掛載到/vdisk,然後就能看到“那個ubuntu”的系統盤了,把當時的改動還原過來,重啟就好了。

參考材料:


ubuntu 14.04 更新後無法啟動