flat assembler
Message board for the users of flat assembler.
![]() Goto page 1, 2 Next |
Author |
|
Madis731 20 Jan 2005, 17:49
...and why can't I make dual-boot with MenuetOS and Win2000
![]() I made a special FAT32 20MB partition in the beginning and let the rest of the HDD remain NTFS(it nearly impossible to convert it to FAT32). Hmm, MenuetOS booted fine, but NTLDR couldn find the other OS (yes the Win2000 that should be in the multi(0)disk(0)rdisk(0)partition(2) now.) I hoped that Menuet would push Windows from partition 1 to 2, because partition 1 was MenuetOS. When that didn't work I deleted the 20MB and now it stays empty at the beginning of the drive ![]() |
|||
![]() |
|
spideros1 20 Jan 2005, 19:43
It's the best to format disk to fat32 using mkdosfs in linux. You just use mkdosfs -F 32 somedevice and you can even have fat32 floppy
![]() |
|||
![]() |
|
bubach 21 Jan 2005, 07:38
a fat32 floppy..?
![]() |
|||
![]() |
|
Endre 21 Jan 2005, 09:06
bubach wrote: a fat32 floppy..? For this you would need a very big ![]() |
|||
![]() |
|
gLes 21 Jan 2005, 14:06
Madis731 wrote: ...and why can't I make dual-boot with MenuetOS and Win2000 As far as I know NTLDR won't boot anything other than Windows operating Systems ![]() ![]() ![]() |
|||
![]() |
|
gLes 21 Jan 2005, 14:10
Endre wrote: For this you would need a very big I'd like to see an NTFS formatted floppy ![]() ![]() |
|||
![]() |
|
f0dder 21 Jan 2005, 16:28
gLes, NTLDR will boot other OSes just fine, you just need the bootsector in a file on the drive. Read linux HOWTOs.
gLes, www.sysinternals.com has an article on NTFS formatted floppy. |
|||
![]() |
|
gLes 21 Jan 2005, 16:36
f0dder wrote: gLes, NTLDR will boot other OSes just fine, you just need the bootsector in a file on the drive. Read linux HOWTOs. Well on it's own it surely won't if you need to read Linux HOWTOs ![]() Shouldn't have asked ![]() |
|||
![]() |
|
f0dder 21 Jan 2005, 19:54
It does it on it's own, it's just not documented. You need to get a bootsector into a file, just like NTLDR does when booting 9x partitions.
|
|||
![]() |
|
Endre 21 Jan 2005, 20:05
SPTH wrote: Hi! Calculating physical sectors (not speaking about heads, and tracks) from logical ones is not so simple: Note, logical sectors are relative to the beginning of the given partition The physical position of a logical sector is given by 3 coordinates: 1. sector number in the given track (1..max number of sectors per track) 2. head number (0..max number of heads-1) 3. track number (0..max number of tracks-1) When going forward on the disk it will first change the sector count then the head count and last the track count. example: pretend we have a drive with 2 heads, 3 sectors per track and 2 tracks. So we have 12 sectors on the disk. Thus the physical addresses of the sectors are: sector 1 is at (t:0, h:0, s:0) sector 2 is at (t:0, h:0, s:1) sector 3 is at (t:0, h:0, s:2) sector 4 is at (t:0, h:1, s:0) sector 5 is at (t:0, h:1, s:1) sector 6 is at (t:0, h:1, s:2) sector 7 is at (t:1, h:0, s:0) sector 8 is at (t:1, h:0, s:1) sector 9 is at (t:1, h:0, s:2) sector 10 is at (t:1, h:1, s:0) sector 11 is at (t:1, h:1, s:1) sector 12 is at (t:1, h:1, s:2) So if I want to reach the logical sector 9 then I have to use the physical position (t:1, h:0, s:2). In the above example I intentionally used sector/track number 3 to make it clear that individual coordinates don't have to be conforming to the base 2 digit bounds. Endre. |
|||
![]() |
|
SPTH 24 Jan 2005, 15:22
Hi Endre!
Thank you for your answere. Well, but still I dont know how I can get the sector of the Root_Directory. I thought this: 1sector=512 byte Root_Cluser*SecPerCluster=RootSector. but that's not true as far as I've tested. I've tested it with HexEditor at my two Partitions. How can I get the Sectore of the root_directory? greets, ... |
|||
![]() |
|
Endre 24 Jan 2005, 20:06
SPTH wrote: Hi Endre! You calculate RootSector correctly. But this gives a relative logical sector number and not a physical one. 1.) you have to read the given entry of the partition table to determine the absolute logical sector number of the beginning of your partition. The coordinates of the parttion table: physical: track=0; head=0; sector=1; or absolute logical: sector=0; for int 0x13 you need the physical data. 2.) As mentioned RootSector is relative logical. That means that it starts from beginning of the partition. RootSector_Abs = RootSector + Partition_Start 3.) Now you have an absolute logical sector number which you have to convert to physical coordinates (recall: track, head, sector) sector = (RootSector_Abs % BPB_SecPerTrk) + 1 head = (RootSector_Abs / BPB_SecPerTrk) % BPB_NumHeads track = (RootSector_Abs / BPB_SecPerTrk) / BPB_NumHeads Maybe I've made mistakes at some points. I tried just to explain the main idea of FAT addressing. Gruß Endre |
|||
![]() |
|
SPTH 25 Jan 2005, 06:31
Thank you Endre!
I think now I understand it. I'll try tonight if it really works. greets, ... |
|||
![]() |
|
SPTH 15 Feb 2005, 22:07
Hi again!
well, finally I had enough time to code again (damn school). OK, still the same damn problem: BRB_Root_Cust: 0xE9 = 233 SectPerClus: 0x20 = 32 relative Root_Directory: 233*32=7456 1 partition starts at: 0x3F = 63 That means, that the Root_Directory_Entry should be at: 7456+63=7519 Sector But that's NOT true ![]() it is at Sector 19094. How comes that value? I've tested: - Partition really starts at Sector 63(+1). - BRB_Root_Cust and SecPerClus are right values - Real Root_Directory_Entry ARE at 19094. I dont have any idea what is wrong in my calculation. I've done the CHS calculation: Sector = ((LBA Mod Total Sectors) +1) CylHead = (LBA Div Total Sectors) Head = (CylHead Mod (Total Heads + 1)) Cylinder = (CylHead Div (Total Heads + 1)) But: It returned a value (nearly) 7519. I had some minor errors, but not that big. So some major things aren't right at my calculation. I've searched for hours and even tested everything x times. Does anybody have an idea??? much thanks + looking for an answere, SPTH |
|||
![]() |
|
Wildwest 16 Feb 2005, 14:21
Recently Mario79 (author of many fixes for FAT32 and author of FAT16 support) said what MS docs is shit and FAT32 and FAT16 have undocumented formulas for calculating some things.
I think: root_Directory is included in this hide_from_non-MS-programmers_formulas_list. E-mail to Mario79 - he know truth. |
|||
![]() |
|
sonny73044 16 Feb 2005, 15:02
From what I can tell the root directory is not in a fixed location:
http://www.microsoft.com/whdc/archive/fat32preinstall.mspx http://www.ntfs.com/fat-boot-modif.htm http://www.systweak.com/fat32/fat4.htm It looks as if your best bet is going to be to try to read the BIOS Parameter Block (BPB) which should tell you the location of the root directory _________________ Sonny |
|||
![]() |
|
SPTH 16 Feb 2005, 20:42
Hi!
much thanks for your help! well, i have no time to read the sites today, but tomorrow and,yes, i'll contact Mario79! thanks for the idea! greets, ... |
|||
![]() |
|
Octavio 16 Feb 2005, 23:50
offset in the boot sector
13 ;db sectors per cluster 14 ;dw fat offset or reserved sectors 16 ;db number of fats 44 ;dd root cluster 36 ;dd sectors per fat first sector of fat32 directory is : (boot sector)+(number of fats)*(sectors per fat)+(reserved sectors)+(root cluster-2)*(sectors per cluster) |
|||
![]() |
|
SPTH 17 Feb 2005, 10:26
cool, that sounds differnet to the old version. i'm going to test it today afternoon.
about Mario79: i've searched his profil for the email-addy, but mario79@ezmail.ru does not work, and mario79@email.ru also not... Does anybody know how to contact him? greets, Mario |
|||
![]() |
|
Goto page 1, 2 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.