hard drive unreadable after grub install...help please
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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!
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.
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 !
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
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.
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
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.
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.
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.
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)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.