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.
![burn boot.elf to cd burn boot.elf to cd](https://cdn.sparkfun.com/assets/5/b/2/1/1/52a9f90c757b7f7e2c8b4567.png)
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.
#BURN BOOT.ELF TO CD HOW TO#
How to run the examples on x86 real hardware
![burn boot.elf to cd burn boot.elf to cd](https://miro.medium.com/max/1400/1*L-GM0pYLDjPnze7QJYQZGg.png)
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.
![burn boot.elf to cd burn boot.elf to cd](https://static1.makeuseofimages.com/wordpress/wp-content/uploads/2020/10/muo-diy-raspberrypi-berryboot-extract.png)
Let's create and run some minuscule bare metal hello world programs that run without an OS on: