红联Linux门户
Linux帮助

windows和CentOS双系统 启动引导问题

发布时间:2011-12-11 18:45:30来源:红联作者:cf0532
电脑原有windows系统,后来安装了CentOS系统。
然后重新启动后,就只能进入CentOS系统了,没有Windows系统进入选项。

为能进入Windows系统,做过如下操作,仍不成功:
1。修改menulst和grub.conf文件,添加windows系统命令。无效果
2。用大白菜u盘启动盘制作了U盘,设置电脑从U盘启动,则可以由默认进入Windows系统,但是无进入CentOS系统选项。
3。在windows系统下,运行MBR等修复软件,试过若干,都无效果。
4。在windows下,将安装CentOS的磁盘删除,重启后,在不插U盘的情况下,电脑无法启动(启动运行完“按F2进入set模式”后,就长时间停留在黑屏和左上端闪烁输入杠)。
请问是怎么回事,应该如何重写windows引导程序?
文章评论

共有 14 条评论

  1. xiexz 于 2011-12-17 23:31:34发表:

    13# cf0532


    已发,你用u盘修复,那是进不了linux了,像windows安装时会重新写入mbr,将之前的覆盖很贱,而linux则是添加,故安装双系统一般都是先win之后linux,当然顺序反了,就用软件修复吧,那软件是win下运行的,是英文的。

  2. haiwawa 于 2011-12-16 16:16:32发表:

    就是这样的问题,一直没解决~

  3. cf0532 于 2011-12-16 09:08:46发表:

    12# xiexz


    是否可以将那个软件传给我,我的邮箱是116599778@qq.com
    非常感谢!

  4. xiexz 于 2011-12-15 16:15:09发表:

    9# cf0532

    你搞错了吧?它可是可以修复linux的,我用那软件帮我同学修复过Linux启动项的,

  5. hansbdwuu 于 2011-12-15 10:28:11发表:

    我是新手,不知怎么解决。但是我把我的menu.lst贴出来,参考一下。我是win7和centos6双系统。
    menu.lst如下:
    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You have a /boot partition. This means that
    # all kernel and initrd paths are relative to /boot/, eg.
    # root (hd0,7)
    # kernel /vmlinuz-version ro root=/dev/sda9
    # initrd /initrd-[generic-]version.img
    #boot=/dev/sda
    default=0
    timeout=8
    splashimage=(hd0,7)/grub/splash.xpm.gz
    hiddenmenu
    title My CentOS6 (2.6.32-71.el6.i686)
    root (hd0,7)
    kernel /vmlinuz-2.6.32-71.el6.i686 ro root=UUID=6e1bc83e-6995-46c5-8c30-7eb26ebcc095 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=zh_CN.UTF-8 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
    initrd /initramfs-2.6.32-71.el6.i686.img
    title Windows7
    rootnoverify (hd0,0)
    chainloader +1

    grub.conf如下:
    # grub.conf generated by anaconda
    #
    # Note that you do not have to rerun grub after making changes to this file
    # NOTICE: You have a /boot partition. This means that
    # all kernel and initrd paths are relative to /boot/, eg.
    # root (hd0,7)
    # kernel /vmlinuz-version ro root=/dev/sda9
    # initrd /initrd-[generic-]version.img
    #boot=/dev/sda
    default=0
    timeout=8
    splashimage=(hd0,7)/grub/splash.xpm.gz
    hiddenmenu
    title My CentOS6 (2.6.32-71.el6.i686)
    root (hd0,7)
    kernel /vmlinuz-2.6.32-71.el6.i686 ro root=UUID=6e1bc83e-6995-46c5-8c30-7eb26ebcc095 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=zh_CN.UTF-8 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
    initrd /initramfs-2.6.32-71.el6.i686.img
    title Windows7
    rootnoverify (hd0,0)
    chainloader +1

    好像两个文件是一样的,我的没你的复杂,但是很正常。hehe。。。

  6. cf0532 于 2011-12-14 08:42:26发表:

    6# cf0532


    已经试过修改grub.conf,因为本来只能启动centos系统,所以将grub.conf添加了如下三行:
    title Windows XP
    rootnoverify (hd0,0)
    chainloader +1
    启动的时候,有了windows 选项,当选择启动windows xp时,提示:error13:invalid or unsupported executable format.
    具体该如何修改?

    menu.lst如下:

    title ☆ GHOST一键还原工具 ☆
    clear
    #..

    title ──────────────────────────────────
    clear
    title 启动 一键还原 Ghost v11.0
    map --mem /boot/load/ghost.img (fd0)
    map --hook
    chainloader (fd0)+1
    rootnoverify (fd0)
    title ──────────────────────────────────
    clear
    title 启动本机硬盘的 WINDOWS NT/2003/XP 系统
    map (hd0) (hd0)
    map (hd0) (hd1)
    root (hd0,0)
    chainloader (hd0,0)+1
    boot
    rootnoverify (hd0,0)
    chainloader +1
    clear
    title 启动本机硬盘上 VISTA 系统(如果存在)
    find --set-root /bootmgr
    chainloader /bootmgr
    clear
    title ──────────────────────────────────
    clear
    title 从第二硬盘启动系统
    fallback 6
    root (hd0,1)
    chainloader +1
    title 从光驱启动系统
    cdrom --init
    map --hook
    chainloader (cd0)
    boot
    title ──────────────────────────────────
    clear
    title 重启计算机
    reboot
    clear
    title 关闭计算机
    halt

  7. cf0532 于 2011-12-14 08:41:37发表:

    8# xiexz


    该软件提示只能修复windows,vista,等。看过了。

  8. xiexz 于 2011-12-13 16:39:49发表:

    很多人不知道一款免费的win环境的强大的启动项修复工具easybcd。如果你只能进win而无法进入linux是可以用easybcd修复,或者双系统都不能进入时,可以先winpe进入修复启动向,一般是将win修复好,之后在进入win用那软件修复即可

  9. age 于 2011-12-13 09:25:07发表:

    [code]title windows xp
    root (hd0,0)
    chainloader +1[/code]加上这几行吧

  10. cf0532 于 2011-12-13 08:37:46发表:

    3# cf0532


    电脑原来有windows XP系统,后来安装了linux的centos最新版本(2.8G)。
    安装完后重启到Grub的时候,只能选择进入centos系统,没有进入windows系统的选项。
    其中grub.conf内容如下:
    [root@localhost Desktop]# vim /boot/grub/grub.conf
    # grub.conf generated by anaconda
    # Note that you do not have to rerun grub after making changes to this file # NOTICE: You have a /boot partition. This means that
    # all kernel and initrd paths are relative to /boot/, eg.
    # root (hd0,2)
    # kernel /vmlinuz-version ro root=/dev/mapper/vg_centos-lv_root
    # initrd /initrd-[generic-]version.img
    #boot=/dev/sda
    default=0
    timeout=5
    splashimage=(hd0,2)/grub/splash.xpm.gz
    hiddenmenu
    title CentOS Linux (2.6.32-71.el6.i686)
    root (hd0,2)
    kernel /vmlinuz-2.6.32-71.el6.i686 ro root=/dev/mapper/vg_centos-lv_root rd_LVM_LV=vg_centos/lv_root rd_LVM_LV=vg_centos/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet
    initrd /initramfs-2.6.32-71.el6.i686.img
    以上是不是说明grub.conf里面已经只有Centos系统了,请问如何添加上windows启动到该Grub使得电脑启动的时候可以实现双启动,即可选择进入windows系统或者centos系统。

    以下是电脑分区情况,请参考:
    [root@localhost Desktop]# fdisk -l
    Disk /dev/sda: 120.0 GB, 120034123776 bytes
    255 heads, 63 sectors/track, 14593 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xf601f601
    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 3648 29302528+ c W95 FAT32 (LBA)
    /dev/sda2 3649 12559 71577607+ f W95 Ext'd (LBA)
    /dev/sda3 12560 12623 512000 83 Linux
    /dev/sda4 12623 14594 15827968 8e Linux LVM
    /dev/sda5 3649 8512 39070048+ b W95 FAT32
    /dev/sda6 8513 12559 32507496 b W95 FAT32
    Disk /dev/dm-0: 14.1 GB, 14092861440 bytes
    255 heads, 63 sectors/track, 1713 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    Disk /dev/dm-0 doesn't contain a valid partition table
    Disk /dev/dm-1: 2113 MB, 2113929216 bytes
    255 heads, 63 sectors/track, 257 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0x00000000
    Disk /dev/dm-1 doesn't contain a valid partition table

  11. RaymondJade 于 2011-12-12 18:28:59发表:

    可以进入centos那MBR应该没问题,能从U盘启动win那Windows应该没有问题,推测可能是menu.lst(或者grub.cfg) 中启动win的代码错误

  12. age 于 2011-12-12 12:50:43发表:

    把menu.lst贴出来看看

  13. cf0532 于 2011-12-12 08:30:43发表:

    2# wangzf137


    谢谢回复,请问如何用光盘修复win。
    我试过用windows XP光盘启动,进入DOS工具箱,在dos环境下,fdisk /mbr,无效果。
    还有,我运行完fdisk /mbr后,没有什么反应;然后输入off,也没法关机,就强关退出了。

    麻烦告知一下,用win光盘修复的具体步骤,包括操作完后的退出。
    谢谢!

  14. wangzf137 于 2011-12-11 22:18:32发表:

    用光盘修复一下win就好了,至于centos你在安装后只要改boot/grub/menulst(如果没有就修改grub.confg)就行了,里边默认应该是已经识别win的,但位置通常会写错,你只要把位置修改成root hd0,0 就行了。.......要学会灵活运用哦