So I got a new computer today, and tried to boot my OS from a USB on there. Legacy mode, and prior, on other systems, it worked fine. However, for whatever reason it refuses to work on this laptop. I'm curious what could possibly be the problem.
In the BIOS, I set the Legacy Mode to [Enabled] and Secure Boot to [Disabled]. Afterwards, I went to the Boot Order Menu (F9) and selected the option: USB Hard Drive - 8.07. However, upon the USB being 'ran', it comes up with the message:
Reboot and select proper boot device, or Insert boot device and press any key to continue
Obviously the USB for whatever reason isn't being ran correctly. The code for the test OS has ran correctly on another computer (With a different USB, mind you, and no, I do not have access to that USB). It's interesting to note that even on that computer, USB's of size greater than 8 GB wouldn't run for some reason. The size of this USB is 8 gb, but i'm not sure if that's relevant to anything.
Any idea on how I can get the USB to correctly boot in Legacy Mode?
Here's the code to the OS:
Code: Select all
BITS 16
org 0x7C00
start:
mov ax, 0
mov ds, ax
mov es, ax
mov fs, ax
mov gs, ax
mov ss, ax ;Puts 0 into the segment pointer, we are using real memory.
mov sp, 0x7C00 ;Moves 7C00 into the stack pointer, so that all data <7C00 is stack.
call print_string ;Calls print string.
jmp Exit
;Prints the test string for now.
print_string:
mov si, MESSAGE
.nextChar:
mov ah, 0x0E
mov al, [si]
cmp al, 0x0
je .end
int 10h
add si, 1
jmp .nextChar
.end:
ret
MESSAGE db "Hello world!", 0
Exit:
times 510-($-$$) db 0 ; Pad remainder of boot sector with 0s
dw 0xAA55 ; The standard PC boot signature
Any ideas or suggestions would be greatly appreciated! (And if your response is to use a Virtual Emulator, I don't want that as an answer for this particular case for the sole fact that I'm retrying to get it working on physical hardware like it did prior before going back to emulation.)