freedos-user  

Re: [Freedos-user] Error loading OS: FAT32-LBA problem or something else?

Christian Masloch
Sun, 25 Oct 2009 11:53:04 -0700

Hi Jerry,

> After "installing" FreeDOS on a FAT-32 partition, I attempted to boot it  
> in a couple of ways, each of which resulted in the message:
>   Error loading OS
> immediately after all the BIOS blather.

This message possibly isn't displayed by FreeDOS boot code. I think  
neither FreeDOS's MBR, boot sector or kernel contain this message. Thus  
I'd assume it's from the Windows MBR. (I'm using a localized Windows so I  
can't compare it to the message of its MBR.)

> a Western Digital "160 Gb" disk, in the typical marketing way of using
> powers of ten, not two, so it really has about 149 Gb.

Use binary prefixes then.

> I offer this info only to demonstrate that Grub had been capable of  
> booting something beyond where XP was installed.)

> I'd created the FAT-32 partition from XP using the disk manager.

Then you might have created a logical partition. You might not be familiar  
with the difference between logical and primary partitions. However, the  
default Windows and FreeDOS MBRs don't support booting from logical  
partitions (GRUB does), and that's most of the difference anyway. Even  
with GRUB, the FreeDOS kernel might not work when booted from a logical  
partition. Ask the kernel developers about that.

GParted should display whether your FAT32 partition is a primary or a  
logical one. (Logical partitions are contained within extended  
partitions.) If you recreate the FAT32 partition with GParted, it should  
also allow you to select whether it should be logical or primary.

(Personally, I'd prefer GParted over the Windows disk manager for most  
partitioning-related work anyway.)

> I made the FreeDOS partition active from XP, and tried rebooting.  This  
> generated the error message above.

That Windows allowed you to make the partition active is strange. If it  
really is a logical partition, it shouldn't allow you to do that. If my  
assumption is wrong and the partition is a primary one, everything should  
work fine for you.

> Speculating the perhaps the installation hadn't installed a partition  
> boot sector to the FAT-32 partition, I rebooted the FreeDOS CD, went to  
> the C: drive, and issued the command
> sys C:
> which reported sectors/trk: 63, heads: 255 hidden: 78397200
> FAT starts at 4AC3F10 + 26 (78397200 + 38)
> Boot sector load seg ... 60h
> The word "hidden" next to the number that curiously matches where "FAT  
> starts" has me suspicious, for some reason. :-)

"Hidden sectors" is the usual term for "sectors in front of this  
partition", and was just abbreviated to "hidden" here. "FAT starts" means  
the first FAT's first sector, which of course is inside the partition.  
It's somewhat useless, but this message from SYS always displays the same  
number twice. Anyway the "hidden" number doesn't mean the partition itself  
is hidden at all (although I understand your suspicion).

> I found a prior article on the mailing list in which someone reported,  
> around 2007, that FreeDOS had problems with FAT32, sometimes mistaking  
> FAT32-LBA for FAT32-CHS, or something to that effect.

It might be caused by this. You can update your SYS program with a version  
 from kernel 2039 first, that could fix the problem already. This version  
of SYS also allows you to overwrite SYS's broken auto-detection (the only  
actual problem) using the option "/FORCE:LBA" (which isn't documented for  
some reason).

> The author indicated that there exists a Perl script (!!!) to fix this.

Sounds adventurous. That might have refered to the Linux script which was  
written so a boot sector could be written to a DOS partition from Linux.  
This however is a SYS replacement, not a fix for the broken SYS. It won't  
help you if an updated SYS doesn't.

> Does anyone have insight into this?  Is it the 1024 cylinder problem?

If anything with cylinders is involved, SYS would have installed the CHS  
boot code (which can't work for your partition). With LBA, the boot code  
and kernel and operating system don't have to care about cylinders or  
heads or tracks at all.

> Is there a practical workaround besides using FAT16 (kind of ugly for an  
> almost 1 Gb partition)?

FAT16 possibly wouldn't help either. And I'd use it only for partitions up  
to 512 MiB anyway, anything larger than that is inefficient.

> Sorry for the long message.  I'm never sure how much detail to include.
> I know that too little is pointless, since nobody can help if they don't
> have the facts.

That's right. So writing a long mail is indeed better. You don't have to  
apologize for that, even if we don't need all information you sent.

Regards,
Christian

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user