ubuntu14.04加入win7引导

来源:互联网 发布:photoshop最新软件版本 编辑:程序博客网 时间:2024/05/22 12:01
或许大家都有同一个硬盘安装了ubuntu系统之后,原来的win7系统引导被覆盖的经历。我们闲话少讲,下面直接看操作:

(1) 首先使用 vi 打开 /boot/grub/grub.cfg,增加
<span style="font-size:14px;">### BEGIN /etc/grub.d/30_os-prober ###menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-803E66523E6640F0' {insmod part_msdosinsmod ntfsset root='hd0,msdos1'if [ x$feature_platform_search_hint = xy ]; then  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  803E66523E6640F0else  search --no-floppy --fs-uuid --set=root 803E66523E6640F0fiparttool ${root} hidden-chainloader +1}set timeout_style=menuif [ "${timeout}" = 0 ]; then  set timeout=10fi### END /etc/grub.d/30_os-prober ###</span>

(2) 803E66523E6640F0 这个有三处需要替换成本机电脑的硬盘挂载号,刚安装出来的ubuntu14.04会自动挂载windows的硬盘,只需要使用鼠标点击对应windows的系统安装盘(如C盘),然后使用命令 df 一下,就可以看到挂载在 /media/****** 的这串数字了,然后替换这三处串号;

(3) 同理,/dev/sda1 和 'hd0,msdos1' 也要进行相应的修改;

(4) 最后还有一点,ubuntu14.04和尤麒麟15.04安装好之后,默认开机是不显示引导菜单的,我们做一下修改
          set timeout_style=hidden
      这个位置的修改都要注释掉
          # set timeout_style=hidden
      这样开机就可以出引导菜单了;

祝你引导成功,谢谢!
1 2
原创粉丝点击