OPNsense Forum

Archive => 16.7 Legacy Series => Topic started by: Taomyn on September 02, 2016, 07:48:40 pm

Title: [SOLVED] Cannot create bootable USB stick
Post by: Taomyn on September 02, 2016, 07:48:40 pm
I'm trying to create a USB stick to boot my "Jetway JNF9N-2930" based mini-ITX PC currently running Sophos UTM, but nothing I do works. When I use Rufus to create a bootable USB from OPNsense-16.7-OpenSSL-vga-amd64.img I end up with something that won't boot. It tries but just resets the machine and loops round doing just that - I also tested it on a spare laptop and it just says "No operating system found".

I thought to try the OPNsense-16.7-OpenSSL-cdrom-amd64.iso but Rufus simply says "This image is either non-bootable, or it uses a boot compression method that is not supported by Rufus.." - I'm running v2.10.973 and using Windows 10. I know Rufus works because I created another boot USB drive, the same stick, for a Dell Wyse thin-PC and before that a bootable micro-SD for running LibreELEC.

Any ideas?
Title: Re: Cannot create bootable USB stick
Post by: weust on September 02, 2016, 08:13:44 pm
Only thing I can think of is corruption in the files you've downloaded.
Have you checked against the md5 files, for example?
Perhaps even a different download mirror...
Title: Re: Cannot create bootable USB stick
Post by: franco on September 02, 2016, 10:12:40 pm
Hi Taomyn,

We have see these issues pop up in Windows, where it is exceptionally hard to write a seemingly raw sequence of bytes from a file to a USB stick. There are a couple of caveats to be aware of:

(1) Since version 1.3.2, Rufus support UEFI as well as GPT for installation media, meaning that it will allow you to install Windows 7, Windows 8 or Linux in full EFI mode. However, Windows Vista or later is required for full UEFI/GPT support. Because of OS limitations, Windows XP restricts the creation of UEFI bootable drives to MBR mode.[1]

(2) While the image can be written successfully in DD Image mode, once written you will NOT be able to repartition/reformat your USB from Windows if you used any application that tried to clean the drive, such as diskpart or Rufus 2.9 or earlier.
This is linked to the fact that the Windows "clean disk" command (IOCTL_DISK_CREATE_DISK) does not properly erase all of the MBR/GPT structures and leaves artefacts behind that Windows cannot handle properly. Unfortunately, this means that the only option to recover your drive is to erase it in Linux...
Rufus 2.10 will include a workaround, so that, at the very least, it does not leave your drive inoperable from Windows, after trying to reformat a drive where Chromium was installed. But, because this is essentially a Windows bug, you will need to be cautious about which application you use to repartition or reformat a drive after installing Chromium on it.[2]

(3) If you are looking for a USB stick, it may be better to use the USB stick image as opposed to converting an ISO. The VGA image is what you're looking for, cutting out the magic that rufus does to create a bootable USB image. ISO images are mainly for VMs, where they work without having to be converted.

(4) Using any Linux or BSD to write the USB stick has never had any of the above issues.


Cheers,
Franco

[1] https://rufus.akeo.ie/
[2] https://github.com/pbatard/rufus/wiki/FAQ
Title: Re: Cannot create bootable USB stick
Post by: Taomyn on September 02, 2016, 11:01:46 pm
Only thing I can think of is corruption in the files you've downloaded.

Thanks but it wasn't that.

Hi Taomyn,

We have see these issues pop up in Windows, where it is exceptionally hard to write a seemingly raw sequence of bytes from a file to a USB stick. There are a couple of caveats to be aware of:


I didn't understand some of what you wrote but I got the general gist of most of it. I logged into my Fedora server that I use for ownCloud, copied over the vga image then used "dd" to write it to my USB stick as per the site example. After confirming that the partitions were present and ejecting the drive, I was finally able to test boot my laptop to prove it works. Odd how this is probably the first time I've had issues using Rufus to create the bootable drive.

Many thanks for the help, you've already been 1000% more helpful than Sophos or their "community" forums ever were, so I'm really looking forward to proceeding now. Though it will have to wait until Sunday now as it's late for me.
Title: Re: Cannot create bootable USB stick
Post by: franco on September 03, 2016, 10:19:36 am
Sure thing. :)
Title: Re: Cannot create bootable USB stick
Post by: Zapp on September 03, 2016, 08:34:18 pm
EDIT: Mental note to myself, read all of the posts before replying....

   /Jonas...

Title: Re: Cannot create bootable USB stick
Post by: packet loss on September 04, 2016, 04:55:25 am
Toamyn I usually use USB Image Tool which works great in Windows. It's does require Net framework to use.

http://www.alexpage.de/usb-image-tool/download/ (http://www.alexpage.de/usb-image-tool/download/)
Title: Re: Cannot create bootable USB stick
Post by: Taomyn on September 05, 2016, 09:57:08 am
Toamyn I usually use USB Image Tool which works great in Windows. It's does require Net framework to use.

http://www.alexpage.de/usb-image-tool/download/ (http://www.alexpage.de/usb-image-tool/download/)

Thanks, I'll remember to try that for the next boot USB I need to create.