Hi,
The other day I successfully booted my own code.
I initially attempted to burn bootable code to a blank USB drive that I had.
I wrote my source code, used NASM to assemble it, and used dd to burn it to the first sector of that spare USB.
I then attempted to boot my code, but it failed on my laptop.
My laptop just booted Windows instead.
I thought that maybe my laptop which is fairly new had some UEFI stuff going on preventing my code from being booted.
So I tried to boot my code on my older desktop which is old to enough to have been shipped with Windows 7.
I don't think that my desktop has crazy UEFI security stuff going on.
But, my code failed again and did not boot.
I looked at my binary with a hex editor just to make sure that 0xaa55 was at the end, and it was.
I then burned my binary onto a different USB drive that I had.
This time it worked.
So, why did the first USB drive fail but the second worked?
The other day I successfully booted my own code.
I initially attempted to burn bootable code to a blank USB drive that I had.
I wrote my source code, used NASM to assemble it, and used dd to burn it to the first sector of that spare USB.
I then attempted to boot my code, but it failed on my laptop.
My laptop just booted Windows instead.
I thought that maybe my laptop which is fairly new had some UEFI stuff going on preventing my code from being booted.
So I tried to boot my code on my older desktop which is old to enough to have been shipped with Windows 7.
I don't think that my desktop has crazy UEFI security stuff going on.
But, my code failed again and did not boot.
I looked at my binary with a hex editor just to make sure that 0xaa55 was at the end, and it was.
I then burned my binary onto a different USB drive that I had.
This time it worked.
So, why did the first USB drive fail but the second worked?