Boot USB analysis

In this case I wanted to see how the BIOS assignment of drives was used to read multiple sectors on the drive that I am loaded from. It used to be that you just select 80h and the drive number in DX, but things have gotten more complicated when you have USB and CD and DVD, and even keyboards and mouse that assign themselves to the INT 16h interface. SO I am taking apart a boot program that installs Ubuntu 10.04 to see the first steps to get a complete IPL into the memory. I was using x86dis and it had no option for real mode 16 bit code so I am using ndisasm which actually interfaces to objdump I have seen, even though :

ldd /usr/bin/ndisasm
actually shows no library association, though it can be a loaded association. IDK.
strings -n 8 -t x imageUSB4g.bin
ndisasm imageUSB4g.bin | grep -v " 0000 "| cut -d " " -f 1,13,14,15,16,17,18,19,20,21,22 | sed -e "s/ //g" | sed -e "s/00000//"

ndisasm img.bin | grep -v " 0000 " | cut -d " " -f 4-

I did find out a new trick with cut to select the 4th field and all the rest on the line or all before the 4th with the above syntax. It is different than shell or python, but at least it is there.

0 comments:

Automated Intelligence

Automated Intelligence
Auftrag der unendlichen LOL katzen