flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Simple Booter Questions Goto page Previous 1, 2, 3 |
Author |
|
Alphonso 31 Mar 2008, 11:36
Well I had a look around the web and the only reason I could see that PeToUSB would not find your USB flash on Vista is if it wasn't run under Administrator / elevated priviledges, something to do with UAC perhaps. Maybe someone else with Vista would be kind enough to confirm.
Something is not right and I think you need to get at least a known working bootable USB flash to work on your machine first. I can update the code for you to show if it's booting from boot sector or MBR but with that message it sounds like it's not recognising the flash as bootable at all. Code: ORG 7c00h mov ax,cs mov ds,ax mov es,ax mov cx,MBRMessL mov si,MBRMess mov ah,0eh @@: lodsb int 10h dec cx jnz @b mov ah,0 int 16h int 19h MBRMess db 0dh,0ah,'MBR Boot Loader',0dh,0ah MBRMessL=$-MBRMess times 1beh-($-$$) db 0 ;Pad to first table db 80h ;Active at 1BE db 1 ;Start head dw 1 ;Start Cyl 0, Sec 1 db 06h ;File System db 254 ;End Head dw 063fh ;End Cyl 6, Sec 63 dd 3fh ;63 Sectors before dd 128000-63 ;number of sectors ;Size is 64M times 510-($-$$) db 0 ;Pad to signature dw 0AA55h ;Signature at 1FE times 62*512 db 0 ;pad 62 more sectors org 7c00h ;Boot Sector jmp short Start nop OEM: db 'AES' times 8-($-OEM) db 20h dw 512 ;Bytes/sect db 4 ;Sect/cluster dw 1 ;Reserved Sectors db 2 ;Fattys dw 512 ;Rootys dw 0 ;few sectors db 0f8h ;Media type dw 125 ;Sect/Fat dw 63 ;Sect/track dw 255 ;Heads dd 63 ;Sectors before dd 128000-63 ;lots of sectors db 80h ;Drive No. db 0 ;Dirty db 29h ;Sig dd 0 ;SNo. VLab: db 'AES' ;Label times 11-($-VLab) db 20h FSType: db 'FAT16' ;File system type times 8-($-FSType) db 20h dd 0,0 ;Reserved Start: mov ax,cs mov ds,ax mov es,ax mov cx,MessL mov si,Mess mov ah,0eh @@: lodsb int 10h dec cx jnz @b mov ah,0 int 16h int 19h Mess db 0dh,0ah,'USB Boot Sector',0dh,0ah MessL=$-Mess times 510-($-$$) db 0 ;Pad to Sig dw 0AA55h ;Signature Code: dd if=\\?\Device\Harddisk1\Partition0 of=check.bin bs=32k count=1 |
|||
31 Mar 2008, 11:36 |
|
AlexP 31 Mar 2008, 12:53
Every time I write to the USB I import it back to a file to check, and I double-check by opening up the flash drive with 'hex workshop'. I know it is not writing to the USB that is the problem, and with Vista I've always had weird problems with Administrator. Sometimes it says I have it, but others it says I do not have the privilege?! I'll continue to look around for an actual bootable one like you said, there has to be something online. Thanks again, and do you (anybody?) know if I could simply use a bootable CD, I think it would be easier.
|
|||
31 Mar 2008, 12:53 |
|
revolution 31 Mar 2008, 13:00
Bootable CD's should be easy, they have a 2k sector size. And there is already an example on this board somewhere, I remember seeing it a few years back. Perhaps searching something like Joliet will yield some results?
Search grasshopper, it is the path to treasure of untold riches. |
|||
31 Mar 2008, 13:00 |
|
revolution 31 Mar 2008, 13:04
Oh here it is, I did your search for ya:
http://board.flatassembler.net/topic.php?t=4415 your welcome |
|||
31 Mar 2008, 13:04 |
|
AlexP 31 Mar 2008, 13:35
Thanks!
I'll burn to CD and try out with a little int 0x13. |
|||
31 Mar 2008, 13:35 |
|
Alphonso 31 Mar 2008, 14:13
Optical I would imagine covers blueray, HD, DVD CD or any drive that uses optics (laser)
Guessing with the Vista stuff, it would appear being logged in as Administrator does not mean programs will be run privileged. You might have to configure DD, PeToUSB & PTEDIT as per here Hope this helps, if not I am at a loss as to why those programs don't work for you. |
|||
31 Mar 2008, 14:13 |
|
AlexP 31 Mar 2008, 14:27
I'll try it out when I get home, now I am in school... It should be a lot of fun when it actually gets to work, and I didn't think that a CD had so much on it, nevermind the bootloader and kernel. After I get something to boot (hopefully), I'll start learning 16-bit programming and work on it. I'd imagine that int 0x13 will cover loading bytes from the CD into memory, I'll have to check that out. Thanks again Alphonso!
|
|||
31 Mar 2008, 14:27 |
|
Dex4u 31 Mar 2008, 17:30
For making a bootable CD, you simply, first make a bootable floppy image, then you go into your burn software and click make project bootable or something like that, it asks you for a bootable image point it to the floppy one you made.
It will add 2 .bin file to the CD and now the CD is bootable. Once burnt, you can add other stuff to the CD, but you can only get at whats on the floppy image (from realmode), without writing a atapi driver. |
|||
31 Mar 2008, 17:30 |
|
AlexP 31 Mar 2008, 23:26
Thank you, but can I also use the CD bootcode that Revolution gave me a link to? And by a bootable floppy image I'm guessing you mean a simple 512 byte bootloader, right? Just the jump, the code, and then the signature? I'll try it, but I don't have any burning software... I'll find something online. Maybe Windows Media Player will work?...
[edit]: WMP does not work, I'll get NERO (I found tutorial online) [edit2]: If I get the darn thing booted, I'll just use realmode to load the file into memory. I'll make some sort of a file format for the OS (like length/name appended or something) so I can figure it out at runtime. I did see that I can just use FASM's 'file' directive to organize all of my code into several source files, like: Code: ; bootloader code file 'kernel.bin' file 'api.bin' file 'monkeys.bin' ; just in case... Sorry to say I'm taking a little time off from this to work on the project at hand, I tired REvolution's juliet but my burning software just wasted 2 CD's trying to get it to burn the entire code, apparently 'align 2048' wasn't the way to do it. |
|||
31 Mar 2008, 23:26 |
|
edfed 16 Apr 2008, 17:41
look at this.
maybe it is the reason why normal BPT don't work using flash drives. |
|||
16 Apr 2008, 17:41 |
|
Goto page Previous 1, 2, 3 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.