flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Bootloader HELP! |
Author |
|
DataHunter2009 16 Jun 2005, 18:10
You have to copy your kernel to the floppy first. Then rawrite the bootloader after that. If you put the boot loader on first, then Windows knows it's a bootable disk so it won't let you do anything to it except format it. If you put the bootloader on last, then Windows treats it like a regular floppy until it's written.
|
|||
16 Jun 2005, 18:10 |
|
Redragon 16 Jun 2005, 19:18
Actually, windows dosent know it is a bootable disk, the reason you cant read it is beacuse it was written to the floppy using rawrite, in a raw format, windows cannot read raw formats unless you use rawread.. its not because it is bootable
|
|||
16 Jun 2005, 19:18 |
|
Dex4u 16 Jun 2005, 21:28
Some people miss the bit next to the BPB, you should include all this:
Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Boot sector starts here ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; jmp short start nopbsOemName DB "YourOS " ; 0x03;;;;;;;;;;;;;;;;;;;;;;; BPB starts here ;;;;;;;;;;;;;;;;;;;;;;;bpbBytesPerSector DW ? ; 0x0BbpbSectorsPerCluster DB ? ; 0x0DbpbReservedSectors DW ? ; 0x0EbpbNumberOfFATs DB ? ; 0x10bpbRootEntries DW ? ; 0x11bpbTotalSectors DW ? ; 0x13bpbMedia DB ? ; 0x15bpbSectorsPerFAT DW ? ; 0x16bpbSectorsPerTrack DW ? ; 0x18bpbHeadsPerCylinder DW ? ; 0x1AbpbHiddenSectors DD ? ; 0x1CbpbTotalSectorsBig DD ? ; 0x20;;;;;;;;;;;;;;;;;;;;; BPB ends here ;;;;;;;;;;;;;;;;;;;;;bsDriveNumber DB ? ; 0x24bsUnused DB ? ; 0x25bsExtBootSignature DB ? ; 0x26bsSerialNumber DD ? ; 0x27bsVolumeLabel DB "NO NAME " ; 0x2BbsFileSystem DB "FAT12 " ; 0x36;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Boot sector code starts here ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
|||
16 Jun 2005, 21:28 |
|
THEWizardGenius 17 Jun 2005, 04:17
You have to put 55AAh at the end. I recommend using John Fine's PARTCOPY.EXE, and I use a batch file to copy the bootloader so I don't have to deal with the commandline options.
|
|||
17 Jun 2005, 04:17 |
|
Dex4u 17 Jun 2005, 16:34
He says he has:
Quote:
|
|||
17 Jun 2005, 16:34 |
|
Geek 21 Jun 2005, 11:59
Thanks again for all the help,
I have tryed putting the kernel file on the disk before I install the boot sector but I still have'nt been successfull. I will try dex4u's tip next and see what I get. Thanks again. _________________ Death is not the opposite of life, rather, it is the absence of it. |
|||
21 Jun 2005, 11:59 |
|
Octavio 21 Jun 2005, 13:28
The boot sector is not enought ,the fat tables must be initialized ,and also the root directory.
|
|||
21 Jun 2005, 13:28 |
|
Dex4u 21 Jun 2005, 14:10
@Geek, Assemble your boot code as a bin file, with all the above BPB + the other bits , + the 0x55AA at the end.
Then format your floppy in windows and then get "bootprog.zip" from here: http://alexfru.chat.ru/epm.html#bootprog in is a program called "BOOTABLE.EXE" To use it do this: Quote:
Then you should be able to read it in windows. |
|||
21 Jun 2005, 14:10 |
|
Geek 21 Jun 2005, 16:18
I will try that tool, from dex4u.
But Octavio made a good point I hav'nt setup the FAT tables or to root directory yet, and I am unsure how to do that. What happens is when I boot my system using the my OS disk, the computer executes the code in the boot sector, but it freazes when it tries to load the Kernel file. Once again I thank all for the help. _________________ Death is not the opposite of life, rather, it is the absence of it. |
|||
21 Jun 2005, 16:18 |
|
Dex4u 21 Jun 2005, 18:09
If you use a fat12 formated floppy, that what the format does, you do not need to set them up, unless you are write to the floppy raw, which could over write them(some people use this method).
But i think its easer to write it like whats in BOOTPROG.ZIP. Heres what to do get bootprog.zip and follow the read me in the zip, then you will be able to just put your kernel file on the floppy from windows just like any other file, and it will boot it. Last edited by Dex4u on 21 Jun 2005, 19:07; edited 2 times in total |
|||
21 Jun 2005, 18:09 |
|
zhak 21 Jun 2005, 18:21
Bart Lagerweij's BFI.EXE is a good (even VERY good) tool to make FAT12 formatted floppy images. You can specify a bootsector code and a directory to write its contents to a virtual floppy.
|
|||
21 Jun 2005, 18:21 |
|
Geek 23 Jun 2005, 13:01
Thanks dex4u!
I tryed the Bootable.exe program that you sugested and it worked. Thank you so much. _________________ Death is not the opposite of life, rather, it is the absence of it. |
|||
23 Jun 2005, 13:01 |
|
Adam Kachwalla 18 Jun 2006, 00:00
If you are using Windows, open up CMD and type this:
Code: DEBUG N bootloader.bin L 0 W 0 0 0 1 Q |
|||
18 Jun 2006, 00:00 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.