
Those are printed by the firmware, and serve to identify the system.Īnd on the T430 we just get a blank screen with a blinking cursor: Note that even without doing anything, a few characters are already printed on the screen.

Here we create one with a single printf call: printf '\364%509s\125\252' > main.img On x86, the simplest and lowest level thing you can do is to create a Master Boot Sector (MBR), which is a type of boot sector, and then install it to a disk. Then, here I have to press F12 to select the USB as the boot device:įrom there, I can select the USB as the boot device like this:Īlternatively, to change the boot order and choose the USB to have higher precedence so I don't have to manually select it every time, I would hit F1 on the "Startup Interrupt Menu" screen, and then navigate to: It is often possible to configure the search order in those menus.įor example, on my T430 I see the following.Īfter turning on, this is when I have to press Enter to enter the boot menu: If that is not the default behavior of your machine, keep hitting Enter, F12, ESC or other such weird keys after power-on until you get a boot menu where you can select to boot from the USB. This means making the firmware pick USB before hard disk. you could wipe your disk or brick the hardware by mistake: only do this on old machines that don't contain critical data! Or even better, use cheap semi-disposable devboards such as the Raspberry Pi, see the ARM example below.įor a typical x86 laptop, you have to do something like:īurn the image to an USB stick (will destroy your data!): sudo dd if=main.img of=/dev/sdX

Remember that running examples on real hardware can be dangerous, e.g. How to run the examples on x86 real hardware The code of all x86 examples below and more is present on this GitHub repo. The QEMU tests have been on an Ubuntu 18.04 host with the pre-packaged QEMU 2.11.1. We will also try them out on the QEMU emulator as much as possible, as that is safer and more convenient for development.


Let's create and run some minuscule bare metal hello world programs that run without an OS on:
