LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 04-19-2009, 09:42 PM   #1
mikef77z
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Rep: Reputation: 0
Ubuntu Drive Bad, Can't get XP to boot (Grub Error)


I installed Ubuntu 8.10 on a second drive of my system.

Turns out that the second drive when bad (clicks when I try to start it).

So I wanted to boot to XP, but I get the "Grub Error 21" on bootup.

So I searched the forums and found that I need to use the Recovery Console on XP and run "fixboot".

Fixboot said that the disk was incorrect and then reported that it set it to "Fat32".

More digging ( http://www.linuxquestions.org/questi...install+ubuntu ) and so from this article I tried "fixmbr". Still doesn't boot.

I tried running fixboot again, but I suppose that it's already setup for Fat32.

Now when I boot, XP won't boot with the error:
"NTLDR is missing"

Is there a way to change the "fixboot" to have it write it back to NTFS?

Any suggestions? I'm not crazy about reloading XP.

Mike
 
Old 04-19-2009, 10:02 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
fixmbr was what you wanted. I'm guessing your problems are because fixboot found a vendor/recover partition - probably with the boot flag on. In which case fixmbr would go wrong as well.
Fire up the Ubuntu liveCD and from a terminal session, post the output of "sudo fdisk -l" (not sure if you require the sudo under the liveCD maybe try "su -" first).
 
Old 04-19-2009, 10:22 PM   #3
mikef77z
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Original Poster
Rep: Reputation: 0
I ran the "sudo fdisk -l".
(Is the "sudo" a synonim for "superuser"? I'm getting into the Linux here and have some background in unix years ago.

Anyway, I'll try to get everything entered (can't figure out how to get the USB drive to mount on the Ubuntu CD).

$ sudo fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xbfffbfff

Device Boot Start End Blocks Id System
/fev/sdal * 1 30401 244196001 7 HPFS/NTFS

(Hey, it's reporting NTFS!)

Mike
 
Old 04-19-2009, 11:04 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
o.k., what does "blkid" give ?.
 
Old 04-20-2009, 12:32 PM   #5
mikef77z
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Original Poster
Rep: Reputation: 0
The response:

/dev/sda1: SEC_TYPE="msdos" UUID="0000-0000" TYPE="vfat"
/dev/loop0: TYPE="squashfs"

By the way, as the last command showed, this is a 250 GB drive.

Thanks for the help here.

Mike
 
Old 04-20-2009, 04:26 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Something is screwy.
I would be hard pressed to believe anyone would normally use a single 250 GIg VFAT partition for an XP install. I would think it more likely a small VFAT at the start (vendor/recovery) then a big NTFS. But all the evidence is contrary to that. Did you buy this system, or build it ?.
If you can get hold of another system, get a recovery liveCD (there are truckloads of them - systemrescuedisk e.g.) and see what testdisk has to say - it'll look for evidence of deleted partitions. Can be run in a scan mode (no updates to the disk).
Pretty hard to diagnose from a distance - a re-install is certainly on the cards.

The fdisk showing NTFS is just a flag setting for the partition - evidence of what's intended to be there, nothing more.
sudo is a means of delegating (limited) superuser functions without having to publicise the root password.
 
Old 04-20-2009, 06:21 PM   #7
mikef77z
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
Something is screwy.
I would be hard pressed to believe anyone would normally use a single 250 GIg VFAT partition for an XP install. I would think it more likely a small VFAT at the start (vendor/recovery) then a big NTFS. But all the evidence is contrary to that. Did you buy this system, or build it ?.
If you can get hold of another system, get a recovery liveCD (there are truckloads of them - systemrescuedisk e.g.) and see what testdisk has to say - it'll look for evidence of deleted partitions. Can be run in a scan mode (no updates to the disk).
Pretty hard to diagnose from a distance - a re-install is certainly on the cards.

The fdisk showing NTFS is just a flag setting for the partition - evidence of what's intended to be there, nothing more.
I built this system, there was a single partition of the full 250 GB of the drive. There were no other partitions.

Not sure what the VFAT is, but it was an NTFS partition, I think that there sector size was 2kb, I believe.

I'm not sure what a "liveCD" is. Is this different than the Ubuntu install disk that I have?

I do have a recovery Disk (10 GB with much of XP install that I can copy back, and I do have most of the data backed up, but there are still a lot of other apps that I'd have to re-install that I'd rather not. I'll look for some kind of "system rescue disk" and see what I can come up with.

Thanks for looking. Would you mind checking back to see if there is anything else?

Thanks a lot.

Mike
 
Old 04-20-2009, 06:47 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Quote:
Originally Posted by mikef77z View Post
I'm not sure what a "liveCD" is. Is this different than the Ubuntu install disk that I have?
A liveCD is a (Liux) system that runs from the CD only - doesn't need to be installed first. Your Ubuntu disk is an example - you can use it without touching the disk until you decide to install.
Different liveCDs have different objectives, so the tool-set will differ. The recovery disks have the best selection of tools for what you need.

FWIW, I don't think you're going to have much luck - if that partition has been re-formatted as FAT-32 (VFAT) from NTFS, you may get some (individual) files back, but full application suites and configs ???.
Best of luck.
 
Old 04-20-2009, 06:50 PM   #9
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,508

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
From the beginning, you had xp on first drive and Ubuntu on second drive?
You previously were able to boot either?
You were using Ubuntu Grub to boot both?
Grub Error 21: Selected Disk Does Not Exist.

Quote:
Fixboot said that the disk was incorrect and then reported that it set it to "Fat32".
I believe this is the source of your problem, unfortunatly don't have a solution as I'm not a windows user.

Quote:
Now when I boot, XP won't boot with the error:
"NTLDR is missing"
This in a very common windows error. If you google it, you could be reading for days/weeks but that may be a place to start. Might get lucky.

Like syg00, I'm surprised to see a 250GB VFAT partition for xp!

A Live CD is probably the same as your Ubuntu install CD, if you can use it as an operating system without installing to a hard drive.

I had that exact error few months ago when I was cloning my w2k partition. Can't believe I didn't make a note of the solution. I can tell you that ntldr was NOT missing. I'd google that error or try downloading and using SuperGrubDisk which can also be used to repair windows bootloaders.
 
Old 04-20-2009, 08:07 PM   #10
mikef77z
LQ Newbie
 
Registered: Apr 2009
Posts: 6

Original Poster
Rep: Reputation: 0
syg00,

Thanks for the help! I took your advice and downloaded "SystemRescueCd" and used "testdisk". It ran an analysis of the drive the first time and reported it as "Fat12", still appeared corrupted. Then I ran the analysis again and it reported it as NTFS and the volume name was correct. I wrote it to the disk and rebooted just fine. It ran the XP disk check on bootup and appears to be OK, boots to Windows again.

I couldn't get the graphical interfaces to work on the System Rescue CD. I've had trouble getting the video card to work correctly on this PC, it's a GeForce chipset, had to install Ubuntu with the "safe" graphics. I'll have to work that out later.

Now I just have to figure out how to proceed, either with a new disk, or add a couple partitions to the 250 GB drive (perhaps with a FAT32 that both systems understand).

Many thanks for your help.

Mike
 
  


Reply



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
Ubuntu 7.10 Dual Boot with XP, ubuntu partition deleted, grub 1.5 error 22 narchy Linux - Newbie 11 02-07-2011 03:54 AM
GRUB error on windows-only drive after ubuntu install on separate drive Pappou Linux - Newbie 4 03-22-2009 07:00 PM
installed Ubuntu, can't boot, grub error 18, can I fix without a floppy drive? raymondvillain Linux - Newbie 8 05-23-2008 08:32 AM
Ubuntu on USB drive, XP on main drive. Grub 21 error steste Linux - Newbie 1 12-09-2007 03:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 12:23 PM.

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
Open Source Consulting | Domain Registration