Windows 2000 doesn't boot from grub: "Filesystem type unknown, partition type 0x7"

Bug #10661 reported by Jens-Erik Weber
26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub-installer (Ubuntu)
Fix Released
High
Colin Watson

Bug Description

Hello,

I had a system with Windows 2000 and Debian testing/sarge, the bootloader was
Lilo. Now I installed ubuntu without repartitioning the disk. I left the Linux
/home and Windows NTFS partition and only formatted the Linux root partition.
Afterwards grub has become the bootloader (I wasn't asked if I wanted to change
the bootloader). And when I choose to boot Windows I get a message:

Booting "Windows NT/2000/XP"
root (hd0,0)
Filesystem type unknown, partition type 0x7.

That's a very bad bug, because it screws up another operating system. Though I
don't like Windows, I have to use it for work, and at the moment I can't.

Jens-Erik Weber

Revision history for this message
Colin Watson (cjwatson) wrote :

I'd like to see the generated /boot/grub/menu.lst, please. You can extract it
using the live CD or by running through the install CD up to the start of the
partitioning stage, then pressing alt-f2 and mounting the target partition.

Revision history for this message
Keith Watson (kpwatson) wrote :

passed a copy of Ubuntu onto a work colleague who fell upon it with glee and
installed it on his Toshiba Tecra S2 laptop. He wanted dual boot with Windows
XP. All went well until he found that on selecting Windows XP from the Grub menu
he got "NTLDR not found".

After checking the grub menu.lst file on my system (I dual boot between windows
XP and Linux quite happily) and making sure that they were the same, a quick
google brought up this little gem on the Fedora bug list;

Bug 115980 - will not boot to windows partition using grub menu
<https://bugzilla.redhat.com/bugzilla/long_list.cgi?buglist=115980>

Reading through the text it seems that this has more to do with the BIOS
settings rather than the distro used.

Keith

Revision history for this message
Chris Groenewald (chrisg-striata) wrote :

I've just had a very unpleasant experience which goes more or less the same. I
installed ubuntu on a co-workers machine to dual boot with his NTFS Windows 2000.

Grub correctly detected Win2000 and added an entry for it. But on trying to boot
windows, Grub moaned about not knowing what partition type it was. This was
followed by "Disk Read Error, Type <CTRL>-<ALT>-<DEL> to reboot." Shock and
horror. I tried various permutations of (hdx,x) from what was available from
tab-completion. But it was very obvious that this was not the problem.

Fortunately we were able to bring windows back with a Win98 boot stiffy and
"fdisk /mbr". Alas, ubuntu on that machine is no more.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Shouldn't that "root" command be "rootnoverify"?

Revision history for this message
Matt Zimmerman (mdz) wrote :

Jens-Erik, can you try changing "root (hd0,0)" to "rootnoverify (hd0,0)" and see
if it allows you to boot Windows?

Revision history for this message
Colin Watson (cjwatson) wrote :

Do you have multiple hard drives in this machine? Is Windows perhaps installed
on a non-first drive? You need to insert 'map' statements in that case, per the
grub manual; I've just changed the installer to do that automatically.

Revision history for this message
Carsten Lechte (chlechte) wrote :

(In reply to comment #5)
> Jens-Erik, can you try changing "root (hd0,0)" to "rootnoverify (hd0,0)" and see
> if it allows you to boot Windows?

I had the same problem and the rootnoverify helped. The installer
should do that automatically for NTFS partitions if grub thinks it
cannot deal with NTFS. (I mention this because comment #6 seems to talk
about the resolution of a different issue.)

chl

Revision history for this message
Hidde Brugmans (hcbrugmans-deactivatedaccount) wrote :

This is a tricky problem, but in my experience it is always a configuration
setting in /boot/grub/menu.lst
Especially the "map (hdX) (hdX)" command is useful.

It might well be that grub tries to boot windows from an ext3 install, it is
looking for an ntfs/fat system where there is none.

Revision history for this message
Alberto Berti (azazell) wrote :

I had this problem too after installing a Breezy on a Toshiba laptop model SA60-672 from standard DVD downloaded a few weeks ago. Windows was already installed, and after a resize and after a complete install of Breezy i got that message.

I do not have a windows install disk so any fix involving mbr reset is unpracticable amd also i don't think the issue is really there.

Reading that redhat bug mentioned above, I discovered that one possible solution is to set disk geometry mode in the bios from "AUTO" to "LBA" (or LBA32).
Unfortunately, the bios of this laptop is so dumb that it isn't possible to change disk mode!! :((
So i tried some rescue tools... i've tried (among the others) the package "testdisk" from the universe. I run it on a console, and executed the command "analyze". It printed out some warnings about geometry configuation error in the ntfs partition.
After googling a bit more with the suggested information i found this report from suse: http://en.opensuse.org/SDB%3AWindows_No_Longer_Boots_Following_the_Installation_of_SUSE_LINUX_9.1

I found it very interesting !

However i do not have an opensuse install cd, but i downloaded the suggested image to see which was the trick used to correct the issue.

The script named "chkdrivegeo" inside this image does a "reset" of the ntfs partition type by using the command "parted -s <device> set <partition_number> type <type of the ntfs partition>" .

I tried to use the same command with the parted tool available in Breezy, but without much success because the breezy's parted is newer and the commands synopsys is changed a bit, if fact it is impossible right now to change the type of aan existing partition on last breezy's parted. Under the image the is also one library file named libparted-1.6.so.0.0.6. It differs both in version and in size from the breezy's /lib/libparted-1.6.so.12.0.9 but they are both from the 1.6 code line so i tried to replace the breezy's one with the open suse one, after backing it up and after cverifying dependencies of both with ldd. Then i fired up parted and wow! Now after asking to parted to print the partition table, it prints out a warning similar to the testdisk's one but much longer, with a question to ignore or cancel at the end. I pushed "I". This version of parted is able also of printing informations about ntfs partitions (the ubuntu and debian's one print out that support for ntfs is still incomplete!). Parted seemed almost functional so i quitted and issued the command inside the "chkdrivegeo" script reported above, restored ubuntu's libparted and rebooted, et voilà! Grub no more complains and boots Windows perfectly.

Alberto

Revision history for this message
Alberto Berti (azazell) wrote :

Ah, the type of the ntfs partition is 7, or 0x7 in hex notation..

Revision history for this message
Alberto Berti (azazell) wrote :

yeah, i know that the type numberr is on the title of this bug:), it's too late, i need to go to bed:)

Revision history for this message
Carthik Sharma (carthik) wrote :

Changing status to Confirmed since there have been multiple confirmations of this problem.

Changed in grub-installer:
status: Needs Info → Confirmed
Revision history for this message
Joseph Garvin (k04jg02) wrote :

I had this bug too -- but I had made my NTFS partition with a tool other than the windows XP installer (Partition Manager, on some old boot CD of mine) because in the past at one point I had had a separate issue causing boot trouble and needed to reformat and setup my partitions all over.

I'm curious if the grub developers have tried booting NTFS partitions made by software than the Windows installers -- it's possible they set something subtly differently that doesn't bother windows but bothers grub.

Revision history for this message
Jonny (jonny-kannon) wrote :

I have had this problem aswell. I also resized the ntfs once with partition magic. Maybe this is the problem.

Revision history for this message
illizit (cengroba) wrote :

I had the same exact problem today and was fixed by doing the following:

1.) Boot into the recovery console of windows using the Windows XP Installation CD (hit R).
2.) In the console type fixboot and let it rewrite the mbr.

Thats what I did and now have it working perfectly using Grub.

Revision history for this message
Jonny (jonny-kannon) wrote :

Just wanted to comment that booting to recovery console and running fixboot, fixmbr had no effekt on my problem. Even a reinstall of xp dident work. I had to use a trird party program (called Partition Table Doctor ) to fix it. If anyone needs this info to save their NTFS partition as most do not backup :). It is possible their is freeware to do the job also. Altho i did not have time to look around. I read plenty about ppl having same problem where fixmbr did not work for whatever reason.

Revision history for this message
EdwardDuffy (eduffy) wrote :

I'm still getting this error with the lastest Dapper ISO (downloaded the ia64 CD on 18 Aug 2006).

* My BIOS doesn't have any options whatsoever for my harddrive, so I can't switch to LBA mode

* Booting the Windows recovery console and running FIXMBR, just got rid of grub but didn't not bring back Windows.

* I tried the SUSE 9.1 install CD + driver update that azazel linked to, but that just set my Ubuntu partition's type to 0x93 (Amoeba), making it unbootable.

* I've even tried running parted from the Dapper LiveCD to set the Windows partition's LBA flag on, but it wouldn't take (parted refused to set the flag). And in the LiveCD's version on parted, there is no option to set the partition's type, although it already shows the partition to be of type 0x7 (as suggested by azazel).

Is there anything else I can try?

Revision history for this message
Galileon Galilei (galileon) wrote :

you need the rootnoverify thingy

rootnoverify (hd0,4)
chainloader +1

change (hd0,4) to fit whats in your root (hdX,Y)

Revision history for this message
GarlicSalt2 (garlicsalt2) wrote :

EdwardDuffy: If the FIXMBR command isn't enough, try also using FIXBOOT. This will reset the boot record of your Windows partition. If you are confused by Master Boot Record (MBR) and Boot Record, suffice it to say, there is always only going to be one MBR per Hard drive, but there is going to be one Boot Record for each bootable partition. The MBR is responsible for loading (or specifically, "chain-loading") the BR. The MBR is at the beginning of the drive, the BR is at the beginning of the partition.

Everyone:
For general repair tools on CD, check out:
Knoppix: Linux on CD
  http://www.knopper.net/ (for Linux - international site, defaults to German)
  http://www.knoppix.com/ (for Linux - defaults to English)
A collection of individual utilities, all tied together on one convenient CD
  http://www.ultimatebootcd.com/ (DOS mode UI, for FAT + NTFS)
The Ultimate Boot CD for Windows: Run Windows from a CD.
  http://www.ubcd4win.com/ (Needs a Win XP CD to build).

All of these are FREE, downloadable tools! All except for the last one come as ISO Images. These are all tools that I have found useful as a PC Technician. Like any tool, the help in the hands of a Pro, but can be dangerous in the hands of a novice. These tools are not affiliated with or endorsed by Ubuntu, Cannonical, or related companies or subsidiaries.

Colin Watson (cjwatson)
Changed in grub-installer:
assignee: kamion → nobody
Revision history for this message
Phillip Susi (psusi) wrote :

This appears to be a bug in the installer when it creates menu.lst, since when chain loading another OS, the rootnoverify command should allways be used instead of the root command.

Revision history for this message
Joseph Price (pricechild) wrote :

I've been helping shiv with this problem via irc.

I still think that it is an actual problem with the ntfs partition. (he has used ntfs-3g btw). I recommend using windows repair software to try to check out the partition.

Revision history for this message
Joseph Price (pricechild) wrote :

Please ignore my previous comment.... was unaware this was an actual known bug.

Revision history for this message
Phillip Susi (psusi) wrote :

Could those who have this happen post their partition layout via fdisk -l?

Maybe there is a pattern to the way the partitions are laid out that causes this, such as if the ntfs partition is the first partition, the installer correctly uses the rootnoverify command, but some other layout causes it to use the root command.

Revision history for this message
EdwardDuffy (eduffy) wrote :

TestDisk[1] fixed it for me. When I reinstalled with Feisty (i386), I didn't have this problem.

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 8447 67850496 7 HPFS/NTFS
/dev/sda2 37764 38913 9230760 c W95 FAT32 (LBA)
/dev/sda3 8448 37293 231705495 83 Linux
/dev/sda4 37294 37763 3775275 5 Extended
/dev/sda5 37294 37763 3775243+ 82 Linux swap / Solaris

Partition table entries are not in disk order

[1] http://www.cgsecurity.org/wiki/TestDisk

Colin Watson (cjwatson)
Changed in grub-installer:
assignee: nobody → kamion
status: Confirmed → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package grub-installer - 1.35ubuntu2

---------------
grub-installer (1.35ubuntu2) jaunty; urgency=low

  * Hide GRUB menu if grub-installer/bootdev_directory is preseeded; this is
    used in the Wubi case where GRUB is used as a secondary boot loader, and
    so the user already had a chance to boot from another operating system
    (thanks, Agostino Russo; LP: #289791).
  * Use rootnoverify rather than root when chain-loading Microsoft operating
    systems (LP: #10661).
  * 'dmraid -c -s' changed its output format; cope with both old and new.

 -- Colin Watson <email address hidden> Fri, 21 Nov 2008 21:00:39 +0000

Changed in grub-installer:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.