LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-18-2009, 09:25 PM   #1
forte22
LQ Newbie
 
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
Dual booting Vista and Ubuntu 9.04 Question.


Hello everyone,

Ok so I recently purchased my first windows based computer (only macs before) so that I could install ubuntu on it.

Downloaded ubuntu 9.04 from the ubuntu.org and burnt it to a cd. Ran the cd, followed the very simple instructions, and eventually had ubuntu up and running. Everything worked great until I tried to boot into Vista.

When I restarted the computer I was given the options of booting, not exact but they were something like this

-Vista bootloader 1 (10gb)
-Vista bootloader 2 (238gb)
-ubuntu kernel
-ubuntu something
-ubuntu something

Previously I would always choose ubuntu kernel. But this time I choose Vista bootloader 2.

A screen popped up with a microsoft status bar, and then prompted me to choose a restore option. Why did I receive that message? When I installed ubuntu, I partitioned my HD into 3 (2 were already on there, the Vista bootloader 1, and Vista bootloader 2). So I'm not sure why I was being prompted to choose a restore option.

So I chose the complete restore to factory settings. It did it's thing for a while and then a dos-looking screen popped up and said "running grub 1.15 (version isn't accurate)", then "error 22"....and then just stayed at that screen.

I wasn't sure what to do, so I shutdown the computer and turned it back on, sure it enough the same screen was on.

Googled around for "error 22" and saw that it was a ubuntu related error. Previously I thought it had something to windows.

Anyway, Popped my ubuntu 9.04 install cd back in and reinstalled. So now I'm good to go back on ubuntu, but how do I get over to Vista? Did I miss something in the process? I have been searching and searching and can't seem to find anything that answers this situation.

Sorry for the long post. Let me know if there is more information that is needed to solve my dilemma.

Thanks in advance for any guidance as I'm a complete rookie with not only linux, but windows as well.
 
Old 08-18-2009, 11:17 PM   #2
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,796

Rep: Reputation: 213Reputation: 213Reputation: 213
Not my area of expertise but my best try...

You might look around the NeoSmart site, as they are referred to in such matters by howtos.

Last edited by thorkelljarl; 08-19-2009 at 12:02 AM.
 
Old 08-18-2009, 11:31 PM   #3
jstephens84
Senior Member
 
Registered: Sep 2004
Location: Nashville
Distribution: Manjaro, RHEL, CentOS
Posts: 2,098

Rep: Reputation: 102Reputation: 102
Error 22 usually means it can't find the kernel (at least that is what happened to mean when experimenting). You can get your hdd back by editing your /boot/grub/menu.lst file and adding in the following.

Code:
title "Windows Vista"
rootnoverify (hd0,1)
chainloader +1
that should get your booting back up to vista also.
 
Old 08-18-2009, 11:41 PM   #4
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,796

Rep: Reputation: 213Reputation: 213Reputation: 213
If the advice from the man who knows more than I do doesn't...

I found this if it will help or is needed.

http://neosmart.net/blog/2008/window...disc-download/

It should function as an equivalent to the Vista set-up disk in restoring the Vista bootloader and MBR if Vista is still present or is re-installed but will not boot.
I refer to the very good and complete post that follows.

Last edited by thorkelljarl; 08-19-2009 at 01:50 AM.
 
Old 08-18-2009, 11:48 PM   #5
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 816

Rep: Reputation: 255Reputation: 255Reputation: 255
It sounds like you had a hidden manufacturer's restore partition on your hard disk along with the Windows Vista partition. Computer manufacturers often provide their own version of Windows and a set of restore discs that only work with their computer models.

Some manufacturers (Acer) have restore discs that won't work if you repartition your hard disk. You have to put the partitions back the way they were when you got the computer. Your attempt to use the restore disc obviously didn't work. You will have to contact the computer manufacturer to ask about how to restore the computer or read the documentation on their web site.

Since I don't know what partitions you started with I can't really say what went wrong. If you post your exact computer manufacturer and model I might be able to find out more information. Some companies don't provide much information about their restore discs.

A lot of people who install Linux don't have a basic understanding of partitions. While that isn't a problem if everything goes right, it can lead to disaster if the computer has an unusual partition setup. What I suggest is that you do some reading about partitions and booting before you try to do anything else.

There are some things you can check that will help determine whether Vista is still on your computer somewhere. If it is you may be able to repair Vista information.

Do you have an NTFS partition? Is there a "WINDOWS" folder on it? Do you have a "boot" folder? Do you see a file called "bootmgr" in the NTFS partition?

I will explain a little bit about partitions and booting.

Every hard disk has one special sector (512 bytes of data) at the beginning of the disk. That's called the MBR (Master Boot Record) and it contains the Partition Table. Along with that is some software that the BIOS loads when it finishes the self test on startup. The default software in the MBR looks to see if some partition is "Active" (marked as the boot partition) and then loads software from the first sector of that partition to continue booting.

The partition table can define up to four main partitions. A main partition can be either Primary or Extended. You can only have one Extended partition. Primary partitions can be booted. The purpose of the Extended partition (if present) is to allow for more partitions that contain data and are not able to boot. The data partitions in an Extended partition are called Logical partitions or Logical drives. Logical Partitions are essentially inside the Extended partition and don't appear in the Partiton Table in the MBR. You can create as many Logical partitions as you want using the space available inside the Extended partition.

Even though Logical partitions can't be booted they can contain an operating system. The boot loader for the operating system has to be in a different (Primary) partition separate from the rest of the OS.

When you install Windows using a normal Microsoft Setup disc it usually creates exactly one Primary partition containing NTFS (the file system for Windows). Setup also writes the default software to the MBR and marks the Windows partition as "Active". The first sector of the Windows Partition (Partition Boot Sector) has software to start the Vista boot loader program called "bootmgr". So, the BIOS loads the MBR and then that loads the Partition Boot Sector of the Windows Partition. That starts "bootmgr" and "bootmgr" displays the Vista boot menu or just starts up Windows.

If you later install Linux the existing Primary partition is usually re-sized to be smaller and a second Primary partition is created for Linux. Linux installs a boot loader called "grub" directly in the Master Boot Record. That bypasses the normal boot software in the MBR but does not change the Partition Boot Sector in the Windows partition. The Setup for the Linux distro usually adds a grub menu entry that can "chain" to the Windows Partition Boot Sector and start "bootmgr". If that menu entry isn't created or Windows isn't in the expected place (first partition) then Windows might not boot. The "bootmgr" program also looks at the MBR for a disk serial number. Installing "grub" shouldn't change the serial number but if it does then Vista will not boot.

When a computer manufacturer creates a hidden restore partition it is usually the first Primary partition and Windows Vista is the second Primary Partition. The first partition may be marked as "hidden" or may have a non-standard partition type that makes it inaccessible. When you try to install Linux to a third Primary partition the menu entry for grub may be incorrect. I think that is what happened in your situation.

What can you do now? Unfortunately you may have to erase the hard disk before or during the process of using the manufacturer's restore discs. The restore discs will probably expect (or create) a hidden manufacturer's partition and one for Windows Vista. The restore discs may or may not erase the hard disk or give you the option to save existing files.

If you have an actual Microsoft Windows Vista Setup CD then it will put Windows the first Primary partition. Even if you choose to put Windows in some other partition (besides the first one) Setup will ALWAYS install the "bootmgr" to the first Primary partition recognized by Windows. The "bootmgr" and Windows Vista may be installed to different partitions in that case. You can move the existing Linux partition up and leave space to create a Primary NTFS partition before the Linux partition. You can also just delete the existing Linux partition during Windows Setup and start over. Create a Primary NTFS partition for Windows and leave room for a second Linux partition.

It is important that you find out what sort of Windows Setup or restore discs you have from the computer manufacturer because that will affect how you install Windows Vista. A lot of manufacturers do not give you a "normal" Microsoft Windows Vista Setup disc.

Before you install Linux you should determine what partitions are present and what they contain. If you have more than one partition or Windows is not in the first partition then you will have to do something special to install Linux.

The Linux installer should have advanced options for installing grub. What I recommend is that you DO NOT install grub to the MBR. Instead install grub to the Linux root partition. Then you can use the "fdisk" or "cfdisk" program in Linux to set the Linux partition as "Active" (mark it as the Boot partition). Make sure that you note which partition is the Boot (active) partition before you change that. Then if you have a problem you can change the Active partition back to what it was.

To add the Windows partition to the grub menu you can edit the file "/etc/grub/menu.lst". You can find tutorials online about how to add Windows as a boot option for grub. Normally something like this is in "menu.lst" to boot Windows.

Code:
title Microsoft Windows Vista
rootnoverify (hd0,0)
chainloader +1
To boot some other partition you change the "(hd0,0)" to "(hd0,1)" or "(hd0,2)", etc. The first Primary partition is "(hd0,0)". The second Primary partition is "(hd0,1)".

If you do install grub to the MBR then you will have to either uninstall grub or repair Windows Vista in order to put things back to "normal". To repair the MBR requires a Microsoft Windows Vista Setup disc (that you might not have) or another boot disc that can put back the standard MBR code. There's no advantage to installing grub to the MBR because you can simply mark the Linux partition as "Active" and accomplish the same thing (grub starts first). Unfortunately the default for many Linux distros is to install grub to the MBR and special steps are required to avoid that during installation.

I hope I didn't overwhelm you with information. I think you will end up doing something like this to get Windows Vista and Linux.
  • Remove existing partitions and create those required by manufacturer's restore discs
  • Install Windows Vista using manufacturer's restore discs
  • Look at the partition configuration done by the restore discs
  • Install Linux but select advanced grub installation options
  • Choose to install grub to the Linux root partition
  • Use "fdisk" or "cfdisk" to set the Linux partition as "Boot" (active)
  • Add Windows Vista boot menu entry to "menu.lst" for grub

The key information to know is what kind of Windows Setup or restore discs you have, and what partitions are present BEFORE you install Linux. You may have a single Primary NTFS partition or you may have two Primary partitions (manufacturer's and Windows NTFS). Some manufacturer's (Acer) might create three partitions.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Having problems with Dual Booting Ubuntu and Vista, Ubuntu having major issues. Chimmichango Linux - Newbie 2 08-03-2009 03:54 AM
Dual Booting Ubuntu 8.10 with Vista Installed First George Jeng Linux - Newbie 2 11-04-2008 02:13 AM
Windows Vista Dual-Booting with Ubuntu 6.10 Koueen Linux - Newbie 6 06-02-2008 07:12 PM
Help with dual-booting vista and ubuntu! Mortal Light Linux - Newbie 6 12-25-2007 05:24 PM
LXer: Dual-Booting Windows XP/Vista And Ubuntu 7.04 LXer Syndicated Linux News 0 07-22-2007 02:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration