Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Boot 512byte bootloader from USB (ARMx86)

Tags:

assembly

boot

It is a simple non-OS-specific assembly program designed to work with my PC's architecture. Compiled by NASM's Linux version.

I tried to place it into the USB and when I selected to boot from the USB in BIOS, it did try to boot from the USB. And silence. Hardware kept running but my program was supposed to print characters to the screen. Just a black screen with a flashing white cursor on the top left (I think it belongs to BIOS).

Maybe BIOS didn't count my "file" as a boot sector.

Here is the USB content (screenshot from Win7, not in English but you can very well easily understand what it is):

Properties

enter image description here Do I need something to make USB drive bootable? Do I need to partition it like a master boot record?

like image 431
ArdaGuler Avatar asked Jan 18 '26 04:01

ArdaGuler


1 Answers

A few years ago I was successfully created a bootable shell emulator which was supposed to boot from USB drive, I was also stucked many times figuring out the issue, but in order to make it happen you need to put the MBR which will be your boot program at very first sector of the drive, with special boot signature, it has to be 512 bytes long, from there you can boot any other sector on the drive which will contain your rest of the bootable programs. so make sure that your boot loader code is correct and at very first sector of the drive.

http://wiki.osdev.org/Bootloader

http://forum.osdev.org/viewtopic.php?f=1&t=20561

Also make sure your system supports USB boot feature, you can easily figure it out from BIOS boot settings.

like image 190
U.Swap Avatar answered Jan 21 '26 09:01

U.Swap



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!