flat assembler
Message board for the users of flat assembler.

Index > OS Construction > USB Bootloader

Author
Thread Post new topic Reply to topic
dilipcs1992



Joined: 06 Apr 2012
Posts: 8
dilipcs1992 20 Jun 2012, 18:50
Hi Everyone!
i'm trying to boot a toy os from the usb stick and i'm using dd to copy bootloader to the usb
dd.exe bs=512 count=3 if=bootloader.bin of=//./USBDrive: ------> to copy boot loader to the pendrive and it works
and i've copyied kernel file to the pendrive.
when i boot from the pendrive my boot loader is throwing a read error(it's not finding my kernel...!)

i'm following same procedure to copy bootloader and kernel to floppy disk and it works fine but i've problem with pendrive
please Help........ Exclamation
Post 20 Jun 2012, 18:50
View user's profile Send private message Reply with quote
cod3b453



Joined: 25 Aug 2004
Posts: 618
cod3b453 20 Jun 2012, 20:54
When you say you have copied the kernel file, did you use dd to place it or the host OS (windows/unix) ? Are you loading the kernel using file system lookup or absolute addressing?
Post 20 Jun 2012, 20:54
View user's profile Send private message Reply with quote
dilipcs1992



Joined: 06 Apr 2012
Posts: 8
dilipcs1992 21 Jun 2012, 09:27
i'm using windows as host os to copy kernel and I'm loading kernel using file system lookup
Post 21 Jun 2012, 09:27
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 21 Jun 2012, 12:25
dilipcs1992 wrote:
i'm using windows as host os to copy kernel and I'm loading kernel using file system lookup

When you say system lookup, do you mean fat, if so you need different code than floppy, as the usb fob will be formated with fat16 or fat32.
You also have the problem that you are over writing BPB of the fat.
The default BPB that you get with demo boot loaders, is for fat12.
Post 21 Jun 2012, 12:25
View user's profile Send private message Reply with quote
dilipcs1992



Joined: 06 Apr 2012
Posts: 8
dilipcs1992 22 Jun 2012, 19:51
i have tried mike gonta's fat32 usb boot loader still same result..
Post 22 Jun 2012, 19:51
View user's profile Send private message Reply with quote
cwpjr



Joined: 03 Jul 2012
Posts: 44
cwpjr 08 Jul 2012, 00:32
Dumb question. Does dd make a mbr and does USB use mbr's to boot?
Post 08 Jul 2012, 00:32
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20363
Location: In your JS exploiting you and your system
revolution 08 Jul 2012, 00:40
Whether or not you use an MBR is up to you. The BIOS will not enforce any requirement on the boot sector other than the last two byte signature requirement.
Post 08 Jul 2012, 00:40
View user's profile Send private message Visit poster's website Reply with quote
cwpjr



Joined: 03 Jul 2012
Posts: 44
cwpjr 08 Jul 2012, 02:01
My initial search for the standards for bios / usb boot bring up various tools for creating bootable this and that. Any suggestions
Post 08 Jul 2012, 02:01
View user's profile Send private message Reply with quote
Dex4u



Joined: 08 Feb 2005
Posts: 1601
Location: web
Dex4u 08 Jul 2012, 02:08
revolution wrote:
Whether or not you use an MBR is up to you. The BIOS will not enforce any requirement on the boot sector other than the last two byte signature requirement.
This is not 100% true, for example if you boot using USB under floppy emulation and your boot code does not have a BPB, it will not boot.
If it supports usb hdd emulation, it works with or without BPB.

This is from 100's of test on real PC.
Post 08 Jul 2012, 02:08
View user's profile Send private message Reply with quote
egos



Joined: 10 Feb 2009
Posts: 144
egos 08 Jul 2012, 07:49
cwpjr wrote:
Dumb question. Does dd make a mbr and does USB use mbr's to boot?
Good question. USBDrive: could be placed in partition or in whole disk. In first case the partition could be not marked as active. And I hope that "dd ..." command writes BPB taken from the disk.

_________________
If you have seen bad English in my words, tell me what's wrong, please.
Post 08 Jul 2012, 07:49
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.