Posted by & filed under AWS/Linux/Unix/Devops stuff.

For some reason my attempts at creating an Ubuntu USB drive using UNetbootin were failing me, I was seeing error messages about being unable to find the operating system at boot time while booting off of my USB drive. The following is what I did to address this issue 

I struggled in creating a bootable Ubuntu USB drive for some time recently. I could have sworn that I had done this in the past without any additional steps being necessary, but this time around the PC I was trying to boot reported that it couldn’t find the operating system.

As it turns out the MBR (master boot record) needed a repair on the USB drive. I was able to fix this by plugging the USB drive into another Ubuntu/Debian machine and installing “mbr” (i.e. sudo apt-get install mbr), and this will obviously work in other Linux distros too for where this package is available. Once this was done, I needed to figure out the device node for my USB drive which I did via a:

sudo fdisk -l

in my case it was /dev/sdf, and then:

sudo install-mbr /dev/sdf

At this point when I attempted to boot the USB drive I was getting this weird MBR command prompt. This I don’t understand or can’t explain (unless this is some sort of fallback grub/bootloader substitute?), but some info I found online pointed me at pressing “a”, followed by “1″. This worked in booting the USB drive!