红联Linux门户
Linux帮助

The use of grub guide vista system and dual-linux

发布时间:2008-07-04 21:20:55来源:红联作者:zidscen
This tutorial guides you through the steps of installing Windows Vista on a computer which already have an Ubuntu installation.

I wrote this tutorial because I haven't found a "Ubuntu/Vistadual-boot" that works when Ubuntu is already installed. There are onlytutorials saying "Install Vista first, then Ubuntu!".

But if you have a working Ubuntu and you don't want to reinstall everything?! Then read this...
Ubuntu Logo

Most of you out there have propably heard of Windows Vista: the nextgeneration of Windows from MS that is going to replace XP as desktopstandard. It is still in beta stage and is not for stable enough to useas your primary os. That is why you should have a dual-boot install.
Windows Vista Logo

Microsoft has made Vista a public beta, meaning that you can downloadit for free(!) and try out (but only use it for a year or so...)

As primary OS I use the brilliant Linux distribution Ubuntu DapperDrake. Now I wanted to make my computer able to start both Ubuntu andWindows Vista...

Before leaving Ubuntu you have to prepare your harddrive. It can be done with gparted. In a Terminal:
> sudo apt-get install gparted
> sudo gparted

Or if you prefer to do it in a gui:

* Start Synaptic, find and install gparted
* System -> Administration -> Gnome-partition editor

There are lots of guides to help you partition your harddrive. resizeyour partitions and leave room (unallocated) for Vista. It needs atleast 15 GB space. I recommend 20+ GB. I installed Vista on a secondharddrive, but a single drive with lot of space would do it.

* Download the dvd-image ( 4GB )
* Burn it to a dvd with your favourite burn-app (GnomeBaker), put it in the drive and restart your computer
* Go on with installing Windows Vista!

Vista is easy to install, almost as easy as Ubuntu. During the install choose the empty space to create a new ntfs partition.

By experience I know that Microsoft don't care about the user; theywill just run over you. The installer for Vista is a good example ofthat. It deleted my Ubuntu loader (GRUB). Next time I booted themachine it loaded Vista. I got no option to start Ubuntu. The same willhappen to you, my friend. But do not fear! Ubuntu is a Linux distro,and you can always make Linux work again.

Well, hopefully Vista is working now. You can play around with it for awhile if you want. I got addicted to a small game called Inkball...

Here is more info about GRUB's way of naming the disks.

Now stop playing! You must have your Ubuntu to work again. Microsofterased GRUB and replaced it with it's own crappy loader (wich cannotload Linux). It's time to get GRUB back into the MBR. Find your UbuntuLive-CD (other Live discs may also work) and boot it. Then launch aterminal:
> sudo grub

grub> root (

Now you will see a list of available harddrives if you have several (Inmy case hd0,hd1). Choose the one where you have ubuntu (probably hd0)
grub> root (hd0,

This time you should see a list of partitions and their filesystems on the drive. This is what it may look like:
grub> root (hd0,
Possible partitions are:
Partition num: 0, Filesystem type unknown, partition type 0x7
Partition num: 2, Filesystem type is ext2fs, partition type 0x83

Note the number of your Ubuntu partition (with ext2fs filesystem). Alsoremember (or write down) the partition number with an unknownfilesystem 0x07; that is your Vista on an ntfs partition. Now setgrub's root to the right partition (In my case (hd0,2)) and theninstall grub to mbr.
grub> root (hd0,2)
grub> setup (hd0)
grub> quit

Now restart your computer! You should see GRUB loading and you are ableto boot Ubuntu. The last you have to do now is to add Vista to the GRUBlist. Once again, fire up a terminal:
> gksudo gedit /boot/grub/menu.lst

At the bottom of the file add the following:
title Microsoft Windows Vista Beta 2
root (hd0,0) #Remember Vistas partition number?
savedefault
makeactive
chainloader +1

Save the file and restart your machine to see if it's working.Hopefully it is. It worked fine for me. Now enjoy your dual boot system!
文章评论

共有 0 条评论