LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1147|回复: 8

恢复grub坏掉!

[复制链接]
发表于 2006-12-5 20:37:45 | 显示全部楼层 |阅读模式
root@darkstar:~# fdisk -l

Disk /dev/hda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1         637     5116671    b  W95 FAT32
/dev/hda2             638        1656     8185117+  83  Linux
/dev/hda3            1657        1721      522112+  82  Linux swap
/dev/hda4            1723        9964    66203865    f  W95 Ext'd (LBA)
/dev/hda5            1723        2997    10241406    b  W95 FAT32
/dev/hda6            2998        4272    10241406    b  W95 FAT32
/dev/hda7            4273        5547    10241406   83  Linux
/dev/hda8            5548        6822    10241406   83  Linux
/dev/hda9            6823        8097    10241406   83  Linux
/dev/hda10           8098        9964    14996646   83  Linux  (注:slackware  / 分区)

root@darkstar:~# uname -a
Linux darkstar 2.6.18 #1 Wed Sep 20 03:01:24 CDT 2006 i686 athlon-4 i386 GNU/Linux

试验目的:在slackware  grub坏掉时进入系统!
方法:利用安装光盘中的loadlin.exe与bzimage 或 系统好时的/boot/vmlinuz-generic-2.6.18
1 将loadlin.exe bzimage(系统默认内核,slackware光盘中应为2.4.33内核) 放到c:\
2 进入dos(方法挺多:用98盘引导,用ghost盘引导,或者其他)
3 在c:\ 下执行loadlin bzimage root=/dev/hda10 ro quiet  好了引导开始
4 用root登录,执行grub命令 第一条命令如下
grub> root (hd0,此处按tab出现以下)
Possible partitions are:
   Partition num: 0,  Filesystem type is fat, partition type 0xb
   Partition num: 1,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 2,  Filesystem type unknown, partition type 0x82
   Partition num: 4,  Filesystem type is fat, partition type 0xb
   Partition num: 5,  Filesystem type is fat, partition type 0xb
   Partition num: 6,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 7,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 8,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 9,  Filesystem type is ext2fs, partition type 0x83

此处正确命令为root (hd0,9)

第二条命令setup (hd0)

出现sucess...字样,你已经成功了。good luck!
发表于 2006-12-5 21:42:55 | 显示全部楼层
感谢兄弟,分享经验,正好需要,马上去试验~~
回复 支持 反对

使用道具 举报

发表于 2006-12-5 23:03:38 | 显示全部楼层
呵呵,很好!!
回复 支持 反对

使用道具 举报

发表于 2006-12-6 10:02:29 | 显示全部楼层
没必要进dos/windows吧,因为已有linux,用光盘引导进入硬盘上的linux,然后运行grub装到mba
回复 支持 反对

使用道具 举报

发表于 2006-12-9 17:51:35 | 显示全部楼层
本本就Slackwre没win 的,要是也没光盘,那该杂办啊~~~~
回复 支持 反对

使用道具 举报

发表于 2006-12-9 18:36:49 | 显示全部楼层
grub4dos吗。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2006-12-11 13:34:49 | 显示全部楼层
我问下,你们给机器装系统,没有网络,没有软驱,没有光驱,没有其他机器,怎么装?


本本就Slackwre没win 的,要是也没光盘,那该杂办啊~~~~

这段话是你机器本身的事。不关slackware的事!

我看最低要有一个软驱的。做启动盘也可以。要是什么都没有。那你这个管理员可能就是只想好用的时候!出问题时你是不会去想的。
回复 支持 反对

使用道具 举报

发表于 2006-12-11 14:53:57 | 显示全部楼层
Post by Kallawa
本本就Slackwre没win 的,要是也没光盘,那该杂办啊~~~~

可以用Grub或lilo硬盘安装,搜一下……
回复 支持 反对

使用道具 举报

发表于 2006-12-14 16:42:36 | 显示全部楼层
我会用一张gentoo的livecd启动系统,然后chroot到硬盘的linux根分区上执行grub --no-floppy修复grub安装。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表