救命!我的Ubuntu 8.10, kernel 2.6.27-8-generic启动不了了

启动讨论 grub/grub2/syslinux/grub4dos/Lilo
回复
hulizhi
帖子: 3
注册时间: 2008-11-20 20:12

救命!我的Ubuntu 8.10, kernel 2.6.27-8-generic启动不了了

#1

帖子 hulizhi » 2008-11-20 20:49

上次我在图书馆上网,进入Ubuntu 8.10, kernel 2.6.27-8-generic。运行“更新管理器”时,因为网速太慢,就换了一个源,然后运行“sudo apt-get update”。因为老师要下班了,我就强行关掉了源列表更新,“更新管理器”也没有升级完,我就关机了。
回去后开机,系统启动出现以下菜单:
Ubuntu 8.10, kernel 2.6.27-8-generic
Ubuntu 8.10, kernel 2.6.27-8-generic (recovery mode)
Ubuntu 8.10, kernel 2.6.27-7-generic
Ubuntu 8.10, kernel 2.6.27-7-generic (recovery mode)
Ubuntu 8.10, memtest86+
再次进入Ubuntu 8.10, kernel 2.6.27-8-generic时出现以下内容:
/init: line 168: maybe_break: not found
/init: line 175: .........................: not found
/init: line 177: .........................: not found
/init: line 178: .........................: not found
/init: line 179: .........................: not found
/init: line 180: .........................: not found
/init: line 182: .........................: not found
/init: line 184: .........................: not found
/init: line 187: .........................: not found
/init: line 188: .........................: not found
/init: line 190: .........................: not found
/init: line 191: .........................: not found
/init: line 192: .........................: not found
/init: line 194: .........................: not found
/init: line 196: .........................: not found
mount: mounting /sys on /root /sys failed: No such file or directory
mount: mounting /proc on /root /proc failed: No such file or directory
Target filesystem doesn't have /sbin/init
/init: line 222: panic: not found
/init: line 230: maybe_break: not found
/init: line 231: cannot open /root/dev/console: no such file
[ 2.007088] Kernel panic-not syncing: Attempted to kill init!


我用Ubuntu 8.10, kernel 2.6.27-7-generic进入系统,看到“文件系统”和“/home/用户名”里出现了大量的 *.log 文件,请问各位高手我该怎样恢复Ubuntu 8.10, kernel 2.6.27-8-generic系统?
注:“.........................”表示各个文件名,因为太多我就没记下;
进入Ubuntu 8.10, kernel 2.6.27-8-generic (recovery mode)也不能启动。

各位高手一定要救救我啊!小弟在此多谢了!
ago1414
帖子: 91
注册时间: 2008-11-22 9:38

Re: 救命!我的Ubuntu 8.10, kernel 2.6.27-8-generic启动不了了

#2

帖子 ago1414 » 2008-11-22 16:31

參考這篇文章 single mode + fsck
http://bojack.pixnet.net/blog/post/20082824

昨天機房 UPS 突然跳電,二台 Mail Server 硬生生給它掛點,重開許多目錄都 mount 不起來,Try 了很久終於找到「正確」的方式

首先先開機進入 Single Mode ,以 FreeBSD 6 為例,開機選單按 4 即可進入 Single Mode

接下來進去後先按一下 Enter ,以我的系統為例,輸入下列指令

# mount -a
# df
/dev/da0s1a 10154158 70668 9271158 1% /
devfs 1 1 0 100% /dev
/dev/da1s1d 2055518950 1106617646 784459788 59% /home
/dev/da0s1e 10154158 1037240 8304586 11% /tmp
/dev/da0s1f 80729226 30448924 43821964 41% /usr
/dev/da0s1d 81245672 800846 73945174 1% /var

先確認有哪些目錄後,就一個一個 umont 做 fsck 修復的動作,修復完再 mount 回來
# umount /home
# fsck -y /home
# mount /home

若一開始連 / 都 mount 不起來的話,記得要先 fsck 根目錄才行唷!

為何說這是「正確」的方式,因為過去都沒有先 umonut 就直接 fsck,難怪一開始修完還是無法正常開機

花費了六個小時才完工,真是個辛苦的代價
dushiguaixia
帖子: 20
注册时间: 2008-06-10 18:15

Re: 救命!我的Ubuntu 8.10, kernel 2.6.27-8-generic启动不了了

#3

帖子 dushiguaixia » 2008-11-23 10:24

回答1楼的问题:
1.首先启动时,选择Ubuntu 8.10, kernel 2.6.27-7-generic(Recovery Mode);
2.进去之后,以超级用户root进入文本模式,删除更新不完整的软件包,命令如下:

代码: 全选

apt-get install -f
3.如果提示成功删除,问题就解决了;如果提示有dpkg错误代码返回,就删除破坏了的软件包,命令如下:

代码: 全选

dpkg -r <要删除的软件包>
4.进行步骤2、3之后,然后退出文本模式exit,以正常模式启动。
回复