- 论坛徽章:
- 0
|
当grub配置不对,系统无法进入时可以采用下面命令解决:
进linux
grub> root (hd0,5)
grub> kernel /boot/vmlinuz-version ro root=/dev/hda5
grub> initrd /boot/initrd-version.img
进xp
grub> root (hd0,1)
grub> chainloader (hd1,0)+1
grub> makeactive(C盘如果是活动分区这一步可以省略)
grub> boot
进linux后可以以超级用户权限
#update-grub
修复menu.list
有些情况下linux的配置不能正常启动,可以采用下面的方式
vmlinuz root=/dev/hd0 vmlinuz-version.img
内核2.6以前的需要initrd,如果缺失可以通过下面方式生成
cd /lib/modules # look for the correct kernel version
depmod 2.6.12.3-xen0 # create module dependencies if missing
# create the initrd image
mkinitrd /boot/initrd-2.6.12.3-xen0.img 2.6.12.3-xen0
If mkinitrd complains that it can't find a specific module (from /etc/modules.conf), and you know that it is compiled into the kernel directly, you can tell mkinitrd so. E.g. for the ata_piix module:
mkinitrd --builtin=ata_piix /boot/initrd-2.6.12.3-xen0.img 2.6.12.3-xen0
Then add an additional line to the grub.conf file for the correct kernel:
module /initrd-2.6.12.3-xen0.img
or module /boot/initrd-2.6.12.3-xen0.img if you don't have a boot partition.
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/49674/showart_401672.html |
|