LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-14-2004, 10:36 PM   #1
radiohead447
LQ Newbie
 
Registered: Sep 2004
Distribution: debian/sarge
Posts: 7

Rep: Reputation: 0
hard drive unreadable after grub install...help please


hello all, i'm new to this forum (and linux) but haven't found any info about my specific problem anywhere i've searched on the net. if you take pity on a distressed newb, feel free to im/pm/e-mail in addition to/instead of replying here. ok, here it is:

when my system was fully operational, the configuration was
160GB S-ATA HDD with windows xp home installed
60GB IDE HDD used as storage
(system is a P4 ht processor in an asus MB, 512MB DDR PC3300 RAM)

While installing debian linux on the 60GB drive (with the sarge
installer) after reformatting/partitioning, I pointed the GRUB bootloader installation prompt to my 160GB drive. When I went to restart, however, I found that I was unable to boot windows; only linux worked.

I have since tried using a win98 boot disk and running fdisk fixmbr,
as well as using the windows XP cd to try and accomplish the same
thing, but xp still will not boot when I select it from GRUB's menu. in
linux, when i try to mount the 160GB hard drive, it gives the error:
"wrong fs type, bad option, bad superblock", i have been completely
unable to see the contents of this drive.

when i unplug the 60GB drive and try to boot just from the
S-ATA 160GB one, all I see is the word "GRUB" in plain text with a
blinking cursor after it. This makes me think that
somehow the mbr used by the computer is located on the IDE drive,
although that's supposed to be my secondary HDD, seeing as how it
never had windows on it. Also, the S-ATA drive is listed in BIOS as
"third IDE master", i have no idea what to make of this.

if there are details i've left out, please let me know what they are so i can make this entry more complete. thanks for taking the time to read this and in advance for any help you may choose to offer
chris
 
Old 09-14-2004, 11:55 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
From what you 've posted, I suggest the possibility that Deb didn't correctly detect the xp partition and write the grub boot conf correctly. Question: does Deb use /boot/grub/menu.lst or /etc/grub.conf to control the grub boot menu? All the distros I've used are rpm based, and /boot/grub/menu.lst is where the action is. From what you've posted, I think that it's simply a matter of editing /etc/fstab to list the xp partition (if it isn't there now), and editing the grub conf file (/etc/grub.conf or /boot/grub/menu.lst) to point grub in the direction of the xp partition.
For detailed, step-by-step, directions on how to configure grub, see 'Zen and the Art of Using Grub'. It has excellent examples of what to add, and where to add it.
 
Old 09-15-2004, 01:40 AM   #3
gromer
Member
 
Registered: Feb 2003
Location: Germany / Schwetzingen
Distribution: (K)ubuntu, Debian seldom SuSE
Posts: 76

Rep: Reputation: 15
No, I guess that the problem is that grub misinterpreted your BIOS-layout (as it did on my PC). It assumes that hda (drives attached to the IDE-port) is the first drives to boot from (and also install the boot-block to 0 hd0)
check the device.map in /boot/grub/ and edit appropriately.
Furthermore the you may have to change the XP-boot entry in the menu.lst (at the very end of that file)
I do this from memory (as I am at work)

I assume that your windows is now on a drive that is name hd2 in the first partition

title Fucking XP
rootnoverify (hd2,0)
map (hd2) (hd0)
map (hd0) (hd2)
savedefaults
chainloader +1
boot


Check at the beginning wher it says something like default drive and set this to your linux-boot drive.

Don't forget update-grub and install-grub.

I'll try to remeber to come back to this laterr to post my settings.
Good luck!
 
Old 09-15-2004, 09:23 AM   #4
radiohead447
LQ Newbie
 
Registered: Sep 2004
Distribution: debian/sarge
Posts: 7

Original Poster
Rep: Reputation: 0
here's part of my menu.lst

here's what it says about winxp in my menu.lst file

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hde1
title Windows NT/2000/XP
root (hd1,0)
savedefault
chainloader +1

and the entire contents of device.map is as follows:
(hd0) /dev/hda
(hd1) /dev/hde

hd0 is my IDE drive and hd1 is the SATA that has winxp installed

also, i just noticed that instead of going right back to grub when i try to boot xp, it gives the error "no such partition" and has me press a key to return to grub..don't know how that change could've occured cause i've only tried fixing the mbr (with xp recovery disc/win98 boot floppy)

Last edited by radiohead447; 09-15-2004 at 09:25 AM.
 
Old 09-15-2004, 09:59 AM   #5
gromer
Member
 
Registered: Feb 2003
Location: Germany / Schwetzingen
Distribution: (K)ubuntu, Debian seldom SuSE
Posts: 76

Rep: Reputation: 15
Windows XP expect to be on the first drive (hd0 so to speak). Thus you have to cheat as I said. In your case that means:

title Windows NT/2000/XP
rootnoverify (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
savedefaults
chainloader +1
boot


Fettling around with the MBR via the MS-DOS tools will only lead you to a total loss of GRUB.
 
Old 09-15-2004, 02:07 PM   #6
nixguide
LQ Newbie
 
Registered: May 2004
Distribution: Redhat, SUSE, Mandrake, FreeBSD
Posts: 4

Rep: Reputation: 0
yes, agree with gromer, I have seen this in many issues regarding booting trouble, that
new harddisk has been added & Windows then was on second hd where it cannopt be booted.
So configure your grub as suggested & that should handle it !
 
Old 09-15-2004, 03:05 PM   #7
radiohead447
LQ Newbie
 
Registered: Sep 2004
Distribution: debian/sarge
Posts: 7

Original Poster
Rep: Reputation: 0
hmm..i changed the menu.lst and device.map files as suggested but still receive the same error "error 22: no such partition" which trying to boot win xp from grub
 
Old 09-15-2004, 03:32 PM   #8
gromer
Member
 
Registered: Feb 2003
Location: Germany / Schwetzingen
Distribution: (K)ubuntu, Debian seldom SuSE
Posts: 76

Rep: Reputation: 15
Uups, sorry I had forgotten the "makeactive"

So this is my XP-Part from menu.lst

title M$ Windows XP Professional SP2
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
savedefaults
chainloader +1
boot

And this is my device.map:

(hd0) /dev/sdb #Debian
(hd1) /dev/sda #Win
(hd2) /dev/hda #under development ;-)

My Bios is setup to boot from the sdb (Debian) drive first.

Don't forget your "install-grub /dev/yourbootdrive"

In case this doesn't work, could you try to boot your XP-installation by telling your BIOS to boot that drive first? Since you had been playing around with the MBR I am not certain if you didn't mess that one up.


Let us know how things worked out!

Last edited by gromer; 09-16-2004 at 06:32 AM.
 
Old 09-16-2004, 12:48 PM   #9
gromer
Member
 
Registered: Feb 2003
Location: Germany / Schwetzingen
Distribution: (K)ubuntu, Debian seldom SuSE
Posts: 76

Rep: Reputation: 15
Did it work ?
 
Old 09-16-2004, 04:02 PM   #10
radiohead447
LQ Newbie
 
Registered: Sep 2004
Distribution: debian/sarge
Posts: 7

Original Poster
Rep: Reputation: 0
hey all, sorry for the delay, i had 10 straight hrs of classes today
unfortunately the makeactive addition didn't seem to change anything, it still returned error 22:no such partition. instructing BIOS to boot from the SATA (xp drive) first also did not work, it loads something called yukon pxe which tells me no bootable media is selected
 
Old 09-17-2004, 10:59 AM   #11
skip_g33k
LQ Newbie
 
Registered: Feb 2004
Location: Boise, ID
Distribution: SimplyMEPIS, RHEL3 WS, RH9
Posts: 24

Rep: Reputation: 15
Like people are saying, there is a difference between where grub thinks things live, where the BIOS thinks things live, and where XP wants to live in order to boot.

Some information: In testing various multi-boot setups, I've noticed that GRUB run at boot time will sometimes report different drive numbers from GRUB running after Linux boots. First, do some detective work. Try this:

1. Reboot

2. When the GRUB menu selection comes up, press C to enter command-line mode.

3. When you see the 'grub>' prompt, type 'root (hd' and press tab. This will report to you the drives that grub detected at boot time. You should see a list like:
(hd0) (hd3)
or something.

4. Now, try to find which one it thinks is Linux and which one is windows. If you keep typing and add a number followed by a comma and then press tab, you should see the partitions and partition types that GRUB detects.
Code:
grub> root (hd0,<tab>
   Possible partitions are:
      Partition num: 0, Filesystem type is ext2fs, partition type 0x83
      Partition num: 1, Filesystem type is ext2fs, partition type 0x83
      Partition num: 2, Filesystem type is unknown, partition type 0x82
In this case, drive/partition (hd0,0) is /boot, (hd0,1) is /, and (hd0,2) is swap.

Do this for both drives and post your findings here for us to get a better picture of what GRUB thinks your system looks like.

BTW, the fact that from Linux you can't mount the XP drive is a bit troublesome. It could just be, though, that your kernel isn't compiled with NTFS support.

Get back to us with that info, and I'll try to give you a good setup for your menu.lst or grub.conf (same file format, just different names).

My guess is that either the XP drive ends up at (hd4) or something like that or it isn't even seen by GRUB.

Let us know,
Skip
 
Old 09-17-2004, 11:06 AM   #12
skip_g33k
LQ Newbie
 
Registered: Feb 2004
Location: Boise, ID
Distribution: SimplyMEPIS, RHEL3 WS, RH9
Posts: 24

Rep: Reputation: 15
Also see this thread[http://www.linuxquestions.org/questi...hreadid=158146]
for more information that I posted trying to help someone use GRUB to track down a boot drive.

Last edited by skip_g33k; 09-17-2004 at 11:08 AM.
 
Old 09-17-2004, 07:22 PM   #13
radiohead447
LQ Newbie
 
Registered: Sep 2004
Distribution: debian/sarge
Posts: 7

Original Poster
Rep: Reputation: 0
ok, looking in grub's choices, it shows connected disks as hd0 and hd1. it's calling my 60gb hd0 and lists partition num: 0 as ext2fs (0x83), #2 as fat (0xc) and #4 as unknown (probably swap) (0x82). that's all in order, as those are the partitions i made on that drive. when I <tab> trying to autocomplete for hd1 (which must be the 160gb SATA), it just duplicates the command line, like it doesn't see any partitions...
also, i've tried mounting the 160gb(ntfs) hdd running both the 2.4 and 2.6 versions of the kernel and i'm pretty sure one or both has ntfs support, but i might be wrong (can't overemphasize how little i know)

Last edited by radiohead447; 09-17-2004 at 07:42 PM.
 
Old 09-18-2004, 02:48 AM   #14
gromer
Member
 
Registered: Feb 2003
Location: Germany / Schwetzingen
Distribution: (K)ubuntu, Debian seldom SuSE
Posts: 76

Rep: Reputation: 15
Quote:
Originally posted by radiohead447
hey all, sorry for the delay, i had 10 straight hrs of classes today

Okay, even *straight* hours. You are forgiven
Quote:
unfortunately the makeactive addition didn't seem to change anything, it still returned error 22:no such partition. instructing BIOS to boot from the SATA (xp drive) first also did not work, it loads something called yukon pxe which tells me no bootable media is selected
Okay, if I got you correctly, then you told your BIOS to boot from the SATA drive without even trying to load GRUB but to go for XP straight.
Is that correct?
In that case your boot information for XP is lost.
Don't fear
Set up your BIOS to boot from
1. CD-ROM
and then from the Windows XP Drive (if you cannot select the drive order or if you wanna be save just disconnect the other (linux) drives for this maneuvor)
Boot from CD using your XP install CD (if you still have one ), hit a key to boot from CD and then hit 'R' to enter the recovery console.
You'll need the XP-administrator password.
at the prompt enter FIXMBR, reply with yes and then enter EXIT and remove the CD. Now XP-should boot again as before.
If that is the case, change the boot order back to that before that is linux+grub hd0 xp hd1

Otherwise you may be struck by the parted bug. - Ah, no you are using sarge. Shouldn't be the case if you used a rather recent install-CD-image.

Let us know if this helped.
Good luck
 
Old 09-18-2004, 08:28 PM   #15
radiohead447
LQ Newbie
 
Registered: Sep 2004
Distribution: debian/sarge
Posts: 7

Original Poster
Rep: Reputation: 0
when i typed "fixmbr" and confirmed, it said the new data was successfully written, but when i rebooted w/o the cdrom in the drive, i just saw a flashing underscore cursor but couldn't enter any text. when i tried booting xp again from grub i got the same error (22, no such partition)
 
  


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
Installing grub to external USB hard drive for later use as internal hard drive dhave Linux From Scratch 2 12-10-2005 08:48 AM
Installed GRUB on 3rd hard drive, how do I boot 1st drive? jesusphreak Linux - Newbie 4 04-06-2005 09:34 AM
grub doesnt like my hard drive doralsoral Linux - Software 3 07-06-2004 11:24 PM
Grub to access new hard drive and old multi os hard drive ? gedi1 Linux - Hardware 0 06-03-2004 12:01 PM
new hard drive, grub and swap? freychef Linux - Hardware 3 01-26-2004 08:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:28 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
Open Source Consulting | Domain Registration