# (grub) FBSD + WinXP - Filesystem type unknown



## thehobbit (Dec 15, 2009)

Good evening!  Last night, I installed FreeBSD (8.0-RELEASE-i386) for the first time on my desktop at home (before this, I've always used Gentoo Linux).  So far, it's been pretty nice and simple to get everything up and running including Xorg, Xfce4, ntfs-3g, etc.  /dev/ad4 is the only hdd I currently have, /dev/ad4s1 is WinXP (installed before FBSD), and /dev/ad4s2{a,b} are FBSD (/ and swap, respectively).

During the installation, I chose to use the FBSD boot manager.  This recognized the existence of my Windows XP partition (exists solely for games).  However, it wouldn't boot, saying "A disk read error occurred".

My first thought was that it's a minor issue with the FBSD bootloader, so I installed grub.  Grub boots FBSD without issue, but WinXP still doesn't boot.  I get the error "Filesystem type unknown, partition type 0x7".  For reference, here's my menu.lst (note that root vs rootnoverify made no difference):

```
title FreeBSD
root (hd0,1,a)
kernel /boot/loader

title Windows XP
#root (hd0,0)
rootnoverify (hd0,0)
makeactive
chainloader +1
boot
```

I've found a few remarks from people having similar issues elsewhere, but they always seem to be a different problem or unresolved.

Does anyone have any idea what I'm doing wrong here?  I'm sure I must be missing something big.  Thank you in advance.


----------



## Beastie (Dec 15, 2009)

`fdisk` should return something like:

```
sysid 7 (0x07),(OS/2 HPFS, NTFS, QNX-2 (16 bit) or Advanced UNIX)
    start 63, size ... (... Meg), flag 0
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 1023/ head 254/ sector 63
```
for ad4s1. Is that what you get?

Can you access ad4s1 from FreeBSD using ntfs-3g or the native driver?


----------



## zeiz (Dec 15, 2009)

I have multiboot and use GAG. 
But to successfully boot Windows my Fedora and Suse have just this:

```
title Windows XP
rootnoverify (hd0,0)
chainloader +1
```
Debian has this:

```
title Windows XP
root (hd0,0)
savedefault
chainloader +1
```


----------



## thehobbit (Dec 17, 2009)

First, my sincerest apologies for my absence since my original post.  In addition to being finals week (which I forgot about when I started setting up FBSD), I've also been handed some extra projects at work.  Again, I apologize - I really should have waited til I had enough time to respond, before I posted.



			
				Beastie said:
			
		

> `fdisk` should return something like:
> 
> ```
> sysid 7 (0x07),(OS/2 HPFS, NTFS, QNX-2 (16 bit) or Advanced UNIX)
> ...


Here you go.  I'm honestly not sure what fdisk means by the 4 different partitions here.

```
[cmd=" "][root@wskrs ~]# fdisk /dev/ad4s1[/cmd]
******* Working on device /dev/ad4s1 *******
parameters extracted from in-core disklabel are:
cylinders=291273 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=291273 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 114 (0x72),(unknown)
    start 218129509, size 1701990410 (831050 Meg), flag 63
	beg: cyl 368/ head 111/ sector 45;
	end: cyl 371/ head 101/ sector 51
The data for partition 2 is:
sysid 116 (0x74),(unknown)
    start 729050177, size 543974724 (265612 Meg), flag 73
	beg: cyl 67/ head 115/ sector 32;
	end: cyl 299/ head 114/ sector 44
The data for partition 3 is:
sysid 101 (0x65),(Novell Netware/386 3.xx)
    start 168653938, size 0 (0 Meg), flag 74
	beg: cyl 114/ head 111/ sector 32;
	end: cyl 353/ head 115/ sector 52
The data for partition 4 is:
sysid 0 (0000),(unused)
    start 2692939776, size 51635 (25 Meg), flag 0
	beg: cyl 0/ head 0/ sector 0;
	end: cyl 0/ head 0/ sector 0
```



			
				Beastie said:
			
		

> Can you access ad4s1 from FreeBSD using ntfs-3g or the native driver?


I can mount it (from FreeBSD, or from SystemRescueCD) using ntfs-3g perfectly fine.  I see all my and my wife's files on the NTFS (WinXP, not Vista/7) partition.



			
				zeiz said:
			
		

> I have multiboot and use GAG.
> But to successfully boot Windows my Fedora and Suse have just this:
> 
> ```
> ...


That's very similar to the grub menu I'm using, yet I'm still running into issues.  Thank you for the suggestion though.


----------



## Beastie (Dec 17, 2009)

thehobbit said:
			
		

> I'm honestly not sure what fdisk means by the 4 different partitions here.


It will always return 4 partitions. That's the default MBR BIOS partitioning scheme. But we don't have the "right" 4 partitions here.



			
				thehobbit said:
			
		

> `[root@wskrs ~]# fdisk /dev/ad4s1`


I asked for the output of `fdisk` which should return the MBR for *ad4* (your default disk device name from the mounted root device) not *ad4s1* as you posted.
If it doesn't work without options try `fdisk /dev/ad4`.



			
				thehobbit said:
			
		

> I can mount it (from FreeBSD, or from SystemRescueCD) using ntfs-3g perfectly fine.  I see all my and my wife's files on the NTFS (WinXP, not Vista/7) partition.


Make sure you have backups.


----------



## thehobbit (Dec 17, 2009)

Beastie said:
			
		

> I asked for the output of `fdisk`


My bad, here's the correct output:

```
******* Working on device /dev/ad4 *******
parameters extracted from in-core disklabel are:
cylinders=620181 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=620181 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 7 (0x07),(NTFS, OS/2 HPFS, QNX-2 (16 bit) or Advanced UNIX)
    start 63, size 293603877 (143361 Meg), flag 80 (active)
	beg: cyl 0/ head 1/ sector 1;
	end: cyl 1023/ head 11/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 293603940, size 331538508 (161884 Meg), flag 0
	beg: cyl 1023/ head 255/ sector 63;
	end: cyl 1023/ head 15/ sector 63
The data for partition 3 is:
<UNUSED>
The data for partition 4 is:
<UNUSED>
```
To me, this looks good.  Do you see anything that I don't see?



			
				Beastie said:
			
		

> Make sure you have backups.


Thank you -- took care of that before installing FBSD


----------



## Beastie (Dec 17, 2009)

Okay, we'll change the ending head for the Windows XP slice so that it becomes 1023/254/63 C/H/S instead of 1023/11/63.

Execute `# fdisk -u /dev/ad4`. Press enter to say no to the geometry question. Then y for the second. Press enter again 3 times, then y when it asks for explicitly specifying the beginning and end address. Press enter 4 times to keep the defaults. The 5th time (ending head) type 254 to replace 11. Press enter until it asks if you're happy with the entry, say yes. Don't change the other 3 slices or the active partition. Write the partition table.

Reboot, press "F1 Win". What happens?


----------



## thehobbit (Dec 17, 2009)

Beastie said:
			
		

> Okay, we'll change the ending head for the Windows XP slice so that it becomes 1023/254/63 C/H/S instead of 1023/11/63.


Thank you -- I'll do it tonight after work.  Am I correct in assuming that the drive needs to be unmounted while performing this operation (i.e. need to boot off of a LiveCD like FreeSBIE)?

Second, could you explain to me why I'm doing this?  My guess is "Windows doesn't like the way things are lined up", but I'm afraid that my knowledge in this area is lacking.  I originally resized the NTFS partition with GParted (SystemRescueCD) and was able to successfully boot into Windows afterward, FWIW.  Please forgive my confusion and lack of knowledge here.


----------



## thehobbit (Dec 17, 2009)

I should have RTFM before posting that.



			
				Wikipedia said:
			
		

> ... each partition must start and end at a cylinder boundary. Only some of the most modern operating systems (Windows XP included) may disregard this rule, but doing so can still cause some compatibility issues, *especially if the user wants to perform dual booting on the same drive*


----------



## thehobbit (Dec 18, 2009)

Beastie - I'd just like to be clear before I follow your advice... is doing this likely to screw up the Windows install?  That is, is there a fair chance that I should be expecting to have to reinstall Windows after following your directions?


----------



## thehobbit (Dec 18, 2009)

Once again, I feel I must apologize for my stupidity -- I clearly hadn't thought through what exactly your instructions did when I asked about needing to be booted off a CD or needing to reinstall Windows.  I took a look again after getting home from work, made the adjustments you outlined, and Windows (and hence games and Netflix) are now available again.  Thank you much for your assitance, Beastie.

Could a mod perhaps add [solved] to the topic?  I appear to not be granted 'Edit' privileges quite yet.


----------

