Page 1 of 1
HDD Booting
Posted: Thu Jun 21, 2007 11:03 pm
by sampath
Hi All,
I hav written one FAT16 boot sector code and loading into the the 4th partition(primary DOS partition) in my PC, which already has DOS and Windows 2000 in it .After loading I am trying to boot into the code using the XOSL(open source boot manager).The control is comming to my boot sector code.But,its not reading the root directory structure of that partition properly.After reading the root directory structure I am printing its not having the file name entries instead some junk values.
I am not sure whether I am missing any step ?? my BPB entries are proper.
Tx,
Sampath S
Posted: Fri Jun 22, 2007 10:33 am
by mathematician
Assuming that you tested the boot sector on something like a floppy, what use are you making of the pointer to the partition table - supplied to your boot code by the MBR?
Posted: Fri Jun 22, 2007 9:40 pm
by Speewave
being that i am a noob at OSDevelopment i would'nt mess with MBRs i know a couple things you can try:
Try another Bootloader. GRUB is really good! better then the Windows Dual Boot thing.
if anything Backup All Data and format the thing
and try a Defrag on DOS or windows. this is possible!
if it is acknowledged but not read. Try this. Defraging makes PC's Run faster because the OS (depending which you got) try's to decode the fragments to get it running with out Defrag. the os you are using might not have an advanced method of this.
Posted: Sat Jun 23, 2007 2:23 am
by Combuster
Have you tried printing the LBA and/or CHS value to the screen to see if they are correct. With partitioning filesystems do not start from sector 0 so you have to adjust the computation accordingly.
Posted: Mon Jun 25, 2007 3:04 am
by sampath
Tx for ur thoughts,I am adding the Hidden sectors count of BPB which gives the start sector of the partition to the LBA everytime i read a sector. But still its reading some junk values.
Sampath S
Posted: Mon Jun 25, 2007 4:32 am
by sampath
when I printed the CHS value the cylinder value was 2021 but the BIOS INT 13 supports cylinder value upto 1023 only.Is it tht using BIOS interrupts I can't access huge memory areas ??
Posted: Mon Jun 25, 2007 4:47 am
by Combuster
Only some bioses have that limitation. Most modern bioses don't have that limit anymore, by providing a special LBA bios call:
http://www.ctyme.com/intr/rb-0708.htm
Posted: Mon Jun 25, 2007 5:38 am
by sampath
You are correct I was not using the Int 13h extension,now I am trying with it.Hope this will resolve my issue.
tx 4 all...
Sampath S