我笔记本上已经安装了windiws 7,有些地方必须要用linux,没办法就装了个Ubuntu
由于经常用win7 ,只是在调试程序时才用Ubuntu,但是系统默认引导进ubuntu,很麻烦。
一定要改
进入ubuntu,打开/boot/grub/grub.cfg (可能会存在其他地方,搜一下grub.cfg就ok)
也可以用命令:gedit /boot/grub/grub.cfg
找到:
### BEGIN /etc/grub.d/30_os-prober ###
menuentry \”Windows 7 (loader) (on /dev/sda1)\” {
insmod ntfs
set root=(hd0,1)
search –no-floppy –fs-uuid –set 42e8ce60e8ce51b9
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
然后剪切,粘贴到以下文字的后面:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
最终结果:
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/30_os-prober ###
menuentry \”Windows 7 (loader) (on /dev/sda1)\” {
insmod ntfs
set root=(hd0,1)
search –no-floppy –fs-uuid –set 42e8ce60e8ce51b9
chainloader +1
}
### END /etc/grub.d/30_os-prober ###
保存就ok了
不过必须要注意的是,这个文件的操作需要root权限。
我装机的时侯中间出了点小差错,root密码忘了。专门处理一下 (参见:
ubuntu 9.10 root密码重设
)
Comments