Messed up partition table and Windows' partition boot sector
I'll start my post with where I'm stuck. When I do fdisk -l /dev/hda I get this:
Code:
Disk /dev/hda: 122.9 GB, 122942324736 bytes To be clear, on hda I have 2 20GB FAT32 partitions and then an 80GB NTFS partition. Both of the FAT32 partitions are windows installs (hda2, above as hda5 also, is a pretty clean, relatively new install, while hda1 is an old one with some problems and lots of stuff on it). My linux (kubuntu) install is on hdb. I discovered this problem when I was trying to look at my hda2 windows install, and there was nothing at my mount point. It's listed in my /etc/fstab (partially pasted below) and I expected it to be mounted. Code:
# <file system> <mount point> <type> <options> <dump> <pass> mount: /dev/hda2: can't read superblockI searched around for a bit and found some advice to fsck it. So I ran fsck /dev/hda2 and got fsck 1.38 (30-Jun-2005)When I googled "Seek to" "Invalid argument" (omitting the number from the search) I found one hit that placed the phrases in similar context. It was in German, here. This gave me the idea to run fdisk -l /dev/hda. I followed the German thread through to where the output from his fdisk -l was posted here and I can see that his hde has a similarly messed up partition table to my hda. My trail ends here, as my German isn't good enough to understand all of that and babelfish turns a bunch of it to gibberish. A few more things of note: 1) If I mount -t vfat /dev/hda5 /mnt/windows2 I can see the data on my second windows partion- hda2, as I think of it, or hda5 as it now wants to be called. 2) When I tell grub to boot my hda2, it won't do it. I think it says it can't find the partition, or something to that extent, but I when I tell grub to boot to my windows install on hda1, it goes ahead and does it, but the install that actually boots is at hda2. When I fsck /dev/hda1 it runs fine except for this at the very beginning: Code:
fsck 1.38 (30-Jun-2005) 3) Mounting /dev/hda1 tells me that the install there is still intact so I know I'm not just booting into hda1 when I tell grub to do that. So, anyway, I want to get my partition table straightened out so that I can mount my second windows install by mounting hda2, make my partition table look like it should, and get that boot sector sorted out (and hopefully understand what it means). Thanks in advance. |
Quote:
What are you trying to do? Quote:
# 2 The fstab is built (or not) by scanning the HD and only linux essentials have to be there. This isn't used by Win or anything else. The superblock error at the mount makes sense because the partition is going to have an extra 63 sectors at the beginning (it's extended) and does not normally contain data. Normally, an extended partition contains an MBR (pointers to additional logical partitions.) # 3 if you have a definition in fstab for /dev/hda2 for example, you don't need to specify anything for mounting except mount /dev/hda2. It will do what fstab has specified. Ok now on to your problem: Quote:
Quote:
If you want to add something after that, create p4 as extended, and then add logical partitions after it. |
Quote:
Quote:
Quote:
Quote:
Quote:
|
Probably isn't a good idea to go deleting partitions if you don't understand what you are doing.
hda2 is an extended partition - it is a container for logical partitions. Logical partitions are where you data is addressable, not the extended. From your perspective as a user, your data is in hda5, not hda2 - get used to it. Update your fstab to accomodate. The reason you get your second (Windows) install launched when you attempt to boot the first is because M$oft don't allow multiple installs. ntldr is updated to treat your hda5 install as the boot partition. I strongly suspect there is no problem with your setup, just misunderstanding. |
Quote:
It's not a problem to reconstruct the partition table if I am wrong. But, don't try to change any data until you have it working. |
I see nothing wrong with the partition table either. Like syg00 posted hda2 is an extended partition. You can not mount an extended partition. Your data is on hda5.
|
If partition hda2 was extended, it should just be type 5, EXT. Then the extended partition hda5 would be type Win95 FAT. I think he made a mistake and caused an incorrect type to be assigned. What is "Win95 FAT extended" supposed to mean? That doesn't make any sense.
|
(post 700)
I have to strongly agree w/ michaelk & syg00. Everything is fine, don't change it. As syg00 said: "... there is no problem with your setup, just misunderstanding."
1st, & easiest, "W95 Ext'd (LBA)" is simply the way fdisk labels partitions of type "f". If that's what type it is, what the fdisk that made it labelled it, don't mess w/ it. If you change it to "b", you will be telling the OS that it is a non-LBA FAT 32 part. not the LBA extended part. that it really is. See:
One of the things I think is causing confusion here is the fact that there is nothing in hda2 except hda5. That is fine, it lets "Winders" see the 2 FAT32's at the same time. Again, everything fine, perhaps unusual, but fine. All you need to do is mount hda5, your data; not hda2, the ext. part. |
> 2) When I tell grub to boot my hda2, it won't do it. I think it says it can't find the
> partition, or something to that extent, but I when I tell grub to boot to my windows install > on hda1, it goes ahead and does it, but the install that actually boots is at hda2. It's more than his imagination; according to what he wrote, he has a problem; he can't boot his systems properly. And there isn't any reasonable explanation (except error made by the OP) why two equivalently-sized Win 95 partitions have different partition types. I said before that he should change hda2 to type b but looking over this again, he should probably change it to c, to be like hda1, the first Win install. There isn't any risk in changing the type. If my guess is wrong, he can just change it back. The important thing is not to write on the filesystem until everything is verified. And he should probably use linux cfdisk to straighten this mess out. I looked at your links and the information shown is that type f partitions are known to cause problems. And now they have :p If the OP simply reported that everything was working, but that when he tried to look at his filesystem that he thought was on hda2 from linux, and he couldn't see it, then I would agree with most of what the other guys have said. Since he is reporting booting problems, it seems like if nobody agrees with my analysis then you should help him boot his systems :p |
Ok, the OP really never posted what the boot sector problems nor posted any errors.
|
Okay, I understand now what my partition table says, thanks to your posts here, everybody. I still don't know why hda2 is an extended partition and my windows install is on hda5... I told the windows install disc to format hda2 and put windows on that. That's really where my problem started- I told the partition manager to make a FAT32 partition out of the empty space that would be hda2, and assumed it would, of course, make an ordinary FAT32 partition out of it. Not once did it mention it was going to be extended. Oh well, it's not important, and I won't be using that partition manager ever again.
I suppose now that if I were to change my /boot/grub/menu.lst to look for my second windows install on hda5 instead of hda2 it will boot it up fine, right? Quote:
I'm thinking now that I were to tell fdisk, when I run it on hda1 and it tells me about my boot sector, to copy the backup boot sector into the original, then telling grub to boot to hda1 will probably go back to booting to hda1 correctly. I didn't do that before because it was the only way I could get to the second windows install, which was the one I was interested in using anyway. |
Typically, when windows creates additional drives it will automatically create an extended partition with logical partitions. Without knowing more details I would say your correct that if you change menu.lst to hda5 it will boot up fine. No need to mess with fdisk anymore. Any changes to booting windows or linux are accomplished via menu.lst unless you mess up the Master Boot Record (MBR).
Post your menu.lst |
Code:
# menu.lst - See: grub(8), info grub, update-grub(8) |
From what you posted using (hd0,1) boots your second windows install successfully so I see no reason to change it. An extended partition does have a boot sector and windows might be using it.
Does your first install boot succesfully? |
Actually, as I said in my first post, "When I tell grub to boot my hda2, it won't do it." It's a bit confusing at first to understand what happens, so let me make it clear.
When I try to boot (hd0,0), the first install, grub doesn't give me any errors, and windows boots. The problem here is that the windows install that boots up isn't at (hd0,0). It doesn't boot hda1. What boots up when I tell grub to boot (hd0,0) is the second windows installation, which is on hda5. When I try to boot (hd0,1), the second install, grub gives me an error that it can't find something there to boot. I'm going to change it from (hd0,1) to (hd0,4) because I think that if I tell it that that it will be able to boot the second windows install from an option that makes sense. |
All times are GMT -5. The time now is 09:27 AM. |