显示标签为“linux”的博文。显示所有博文
显示标签为“linux”的博文。显示所有博文

2009年2月11日星期三

安装Ubuntu后修改系统启动顺序

安装Ubuntu后修改系统启动顺序

其实很简单,修改 /boot/grub/menu.lst 文件,使其中default值变动一下即可。

过程如下:
1、打开命令行终端;

2、输入:
sudo cp /boot/grub/menu.lst /boot/grub/menu.lst.bak
sudo gedit /boot/grub/menu.lst
注: 第一句做备份用。

3、假设文件内容如下:
-------------------------------------------------------------
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec # Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

## ## End Default Options ##

title Ubuntu, kernel 2.6.15-23-386
root (hd0,2)
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda3 ro quiet splash
initrd /boot/initrd.img-2.6.15-23-386
savedefault
boot

title Ubuntu, kernel 2.6.15-23-386 (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.15-23-386 root=/dev/hda3 ro single
initrd /boot/initrd.img-2.6.15-23-386
boot
title Ubuntu, memtest86+
root (hd0,2)
kernel /boot/memtest86+.bin
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root
# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive chainloader +1
-------------------------------------------------------------
现在default值为0,意即启动排行第一的操作系统,这里代表的就是Ubuntu, kernel 2.6.15-23-386。 现在把它修改成“default 4”,那么XP就成为默认的操作系统了。 因为从零数起,以title打头的Microsoft Windows XP Professional这一行排序为4。当然要根据实际情况进行修改,有可能修改为5或6甚至其他数字。 另外我们还可以通过修改timeout的值来变更默认等待时间。

完美快速打造三系统(VISTA+LEOPARD10.5.2+UBUNTU8.04)(vista leopard双系统可参考)

完美快速打造三系统(VISTA+LEOPARD10.5.2+UBUNTU8.04)(vista leopard双系统可参考)

http://www.insanelymac.com/

0.准备:vista leoall3 ubuntu 三张盘
1.安装vista:如果自带vista,掠过(不影响后续操作)
2.分区:至少保证有两个分区 leopard必须独立在一个区中,ubuntu与vista可以共存于一个中(不建议),建议 如下:vista为主分区C:\ Mac OS X 一个分区 D:\(可以任何NTFS或FAT32格式) ubuntu为未分配分区分区工具:vista自带(电脑右击G-磁盘管理-)
3.安装leoall3:选择磁盘工具,将D抹掉 格式为 mac os (日志扩展式)自定义安装,请谨慎选择。不熟悉可以直接安装。注意:如果你只想装 vista和leopard,这样就可以的。他会自己引导的。
4.安装ubuntu:在选择分区时,选连续的为分配的空间,这样最方便。
5.引导ubuntu:下载boot_v8,官方下载地址:http://%3ca%20href=/解压,将boot_v8放到ubuntu的boot下codes:sudo cp ./boot_v8 /boot #注释:.表示你放boot_v8的路径
6.修改grub:codes:sudo gedit /boot/grub/menu.lst在最后添加title Mac OSX Leopardroot (hd0,1) #注释: 0表示第一块硬盘,1表示第二分区,一次类推kernel /boot/boot_v8boot

好!结束!
开机进入有可以直接 进入mac的引导。
输入80 如果对grub引导不熟悉,想学习可参考http://tech.ccidnet.com/pub/images/tech/linux/zhuanti/grub/index.htm如有什么疑惑,我尽力而为!来自http://bbs.kenapple.com/thread-4401-1-1.html

Windows Vista与Ubuntu Linux系统双启动

Windows Vista与Ubuntu Linux系统双启动

一、硬盘是全新的,先装了XP,然后装了Ubuntu,现在引导被grub抢了去,然后进入DOS键入fdisk /mbr,把引导全交给XP,修改boot.ini指向C盘的grub4dos,再将Ubuntu的/boot/grub/menu.lst复制到C:\,这样就做成了XP和Ubuntu双启动(ntldr引导grub4dos,然后grub4dos引导Ubuntu)以上操作没什么难度。主要是下面,Vista的bootmgr引导Ubuntu的grub。
首先进入WinPE,格式化C盘,安装Vista到C盘。重新启动之后,已经没有了Ubuntu的选项,只能进入Vista了。现在下载EasyBCD这个软件,截止到今天,最新版本是1.7.1,(http://neosmart.net/dl.php?id=1)。在Vista下安装并运行。选择“Add/Remove Entries”,在下面的“Add an Entries”面板中,选择“Linux”选项卡,Type是Grub,Name随便,Drive选择你安装Linux的/分区,再选中“GRUB isn't installed to the bootsector”复选框,最后点击“Add Entries”按钮。重启之后,便可出现Vista和Ubuntu的双启动菜单了。选择Ubuntu,进入Grub,下面的就明白了吧。

二、相信大家从XP的boot.ini都会引导linux,但是vista已经不再使用ntldr,所以有一些变化
1、把grub的引导扇区文件导出来。
在linux下
dd if=/dev/sda3 of=/dev/sda6/linuxloader/ubuntu.lnx bs=512 count=1
(我的GRUB安装在sda3上)
/dev/sda 表示从sata硬盘
ide的硬盘,用/dev/hda。具体情况视grub引导记录安装的位置而定
(这个和用XP的ntldr一样)
2、在vista下,
用治理员权限运行cmd,然后
bcdedit /create /d "Ubuntu 7.04" /application bootsector
建立一个名称为“Ubuntu 7.04”,通过加载类型为“引导扇区文件”的启动项
执行后,会返回一个{GUID},下面的命令用到这个{GUID}
bcdedit /set {GUID} device partition=E:
设置引导扇区文件所在的分区(就是这个ubuntu.lnx所在的分区)
bcdedit /set {GUID} path \linuxloader\ubuntu.lnx
指定引导扇区文件的路径和文件名(反斜杠\,表示根目录)
bcdedit /displayorder {GUID} /addlast
增加这个Ubuntu的菜单项到末尾。
重起你的vista

Search with Google