OPNsense Forum

Archive => 17.1 Legacy Series => Topic started by: CraigHead on February 13, 2017, 08:39:18 am

Title: Opnsense not installing? Alternative method to get it done!
Post by: CraigHead on February 13, 2017, 08:39:18 am
Like many of you, I was having trouble with the .img files for 16.7 and 17.x to install (or even boot for that matter).


It wasn't until I realized that it's probably easier to install the FreeBSD Release Mini-Memstick image and once that's finished simply follow the Opnsense-Bootstrap instructions here.
https://github.com/opnsense/update/blob/master/README.md (https://github.com/opnsense/update/blob/master/README.md)

This method worked well and was very "Easy". I figured this out only after many hours trying to get the provided opnsense .img files (and .iso CDROM image) to boot. I wish I would had known about this to begin with because this process only took 30 minutes from start to finish with a OOB opnsense install.

Anyone else do it this way too?
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: alfemann on February 17, 2017, 02:21:41 pm
God, yes!
I don't understand why, but I tried on two different machines and was not able to make a bootable/installable USB or DVD. I tried all the relevant images, but no go. The closest I got was once on a USB - the words "gptboot: primary GPT table checksum mismatch" flashed by before it rebooted in an endless cycle.
In the end I spent some time googling etc, and LUCKILY - I found this post. Thank you for saving what little was left of my hair  ;D
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: CraigHead on February 19, 2017, 09:20:06 pm
I am glad I helped someone! Yeah pulled out almost all my hair and killed a few brain cells trying to make this work. Spread the word! This is the only method (and by far the easiest) I have found that works 100%. I've built 3 other OpnSense firewalls since for work related needs using the same method and never looked back.
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: franco on February 20, 2017, 01:58:28 pm
I pinned this topic. Glad this works. :)
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: dominik on February 24, 2017, 03:45:01 pm
I got it working this way (using Windows 10):

(if you dont know what are you doing, dont use it!)

1. ) Burn THIS ISO TO CD (NO DVD!)
https://mirror.auf-feindgebiet.de/opnsense/releases/16.7/OPNsense-16.7-OpenSSL-cdrom-i386.iso.bz2

2. ) Connect USB-Stick

Run "diskpart" (Windows + R ) with Administratorrights:
Code: [Select]
1. LIST DISK
// YOU NEED TO KNOW WHICH DISK IS YOURE STICK  ( RECOGNIZEABLE BY SIZE )
2. SELECT DISK x
// x IS THE DISK ID OF YOURE USB STICK
3. CLEAN
// KNOW EVERY PARTITION ON YOURE USB STICK IS REMOVED
4. CONVERT MBR
// CONVERT YOURE USB STICK TO MBR
5. CREATE PARTITION PRIMARY
// CREATE A NEW PARTITION
6. SELECT PARTITION 1
7. FORMAT FS=NTFS quick
// FORMAT THE PARTITION WE CREATED ON "5" AS NTFS
8. EXIT

After using diskpart, we download: YUMI (https://www.pendrivelinux.com/yumi-multiboot-usb-creator/)

and we add opnsense as "Try an Unlisted ISO (GRUB)".
ISO is the same as for the CDROM.
(https://mirror.auf-feindgebiet.de/opnsense/releases/16.7/OPNsense-16.7-OpenSSL-cdrom-i386.iso.bz2)

After this step you can connect the usb stick and the cd into the pc.
You boot from USB Stick.... and now you could run / install opnsense without problems ....

I am ready to answer you question :).

Greeets
Dominik
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: Arakangel Michael on March 20, 2017, 06:02:12 am
I recently tried loading 17.1.x a few different ways, since none of them worked:

Rufus, Physdiskwrite, unetbootin (personal favorite)

Yumi

At the very bottom of the list under 'STEP 2: Select a distribution to put on...'

'Try unlisted iso (GRUB from RAM)'

This one loaded the whole image into a virtual cd-rom drive in RAM. It still failed with the same 'error 19' as the other methods, though.

I had seen someone mention disabling ACPI, so I did that via the OpnSense boot menu, which just resulted in a different error.

The images were written from a Win 8 x64 host. I haven't had issues writing images for Linux, or ESXi.

I finally was able to install the image using Zalman's Virtual Optical drive. You basically just load on ISO under the '_ISO' folder, and select either 'Dual' (both HDD, and CD-ROM over an internal usb hub), or 'Optical'. It works great, but I would love to the get the grub installer method working.

I do have a couple of spare PCs available I can test other boot methods on, if you guys have any ideas about fixing the 'error 19' or the invalid GPT partition table. Someone mentioned plugging the disk into Windows 10 fixing it (as apparently the file system was off by one block, and didn't write the GPT recovery header) Windows 8 didn't write this 2nd header for me, so it still failed with the GPT error. I tried 4 different brands of flash drives; they all behaved the same way.

There was another mention of using the Serial image version since it's MBR, but I am disabling the serial ports as they are DMA, so potentially an attack vector.
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: arlowdgreat on March 23, 2017, 03:20:02 am
hi guys, im from philippines. on my experience, opnsense is booting fine but his looking for login account. i downloaded the nano version at china mirror.

thanks
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: bartjsmit on March 23, 2017, 08:38:10 am
Default credentials are root with password opnsense

https://docs.opnsense.org/manual/install.html

Bart...
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: arlowdgreat on March 23, 2017, 02:00:41 pm
Yes, i already figured it out. Thanks man. I think the nano version is like plug and play or something. When i got logged in its already has default config. Hehe
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: mrhappydude on April 04, 2017, 04:11:36 am
I followed the instructions but it fails with a sqllite error, I removed the packages and tried again no luck.  This is by far the biggest hassle I have ever experienced with an install. 
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: CraigHead on April 04, 2017, 08:24:36 am
@MrHappyDude. Totally I can confirm your problem the exact error says:

Code: [Select]
Bootstrapping pkg from pkg+http://pkg.opnsesense.org/FreeBSD:11:amd64/17.1/latest, please wait..
Verifying signature with trusted certificate pkg.opnsense.org.20161210... done
pkg-static: warning: database version 34 is newer than libpkg(3) version 33, but still compatible
pkg-static: sqlite error while executing INSERT OR ROLLBACK INTO pkg_search(id, name, origin) VALUES(?1, ?2 || '-' || ?3, ?4); in file pkgdb.c:1544 no such table pkg_search

Can anyone help?
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: franco on April 04, 2017, 08:59:35 am
Yes, FreeBSD quarterly branch got updated a few days ago, features pkg 1.10.1:

# pkg query %v pkg

That means it upgrades the database and then our pkg 1.9.4 can't use it anymore. It will be fixed when we incorporate pkg 1.10 into OPNsense, likely for 17.1.5, but that depends on testing.

The problem is at best 1-2 days old. But there's nothing we can do about this now. In fact it says "but still compatible", and then it errors out which means it's not compatible.


Cheers,
Franco
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: CraigHead on April 05, 2017, 11:15:20 pm
Thanks for replying @franco. We'll keep an eye out for that release.
Any ideas on a work-around?
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: franco on April 05, 2017, 11:21:11 pm
https://github.com/opnsense/update/blob/master/bootstrap/opnsense-bootstrap.sh#L139

Right here add "rm -f /var/db/pkg/*" -- there is actually no reason to keep this empty database around?


Cheers,
Franco
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: CraigHead on April 09, 2017, 07:57:12 pm
https://github.com/opnsense/update/blob/master/bootstrap/opnsense-bootstrap.sh#L139

Right here add "rm -f /var/db/pkg/*" -- there is actually no reason to keep this empty database around?


Cheers,
Franco

I can confirm this helped me get back up and running. Thanks Franco! I had a hardware failure (Fit-PC4) that caused me to loose the machine (crappy BIOS). I had to build a completely different machine and this really helped me get back on my feet.
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: franco on April 10, 2017, 07:15:09 am
Hi Craig,

Ok, I will try to come up with something for the script that does this automatically.


Cheers,
Franco
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: boxx.dk on July 19, 2017, 10:03:59 am
Hi

This problem still exists with 17.1.4 ....

The img file cannot be written correctly to USB sticks, nor converted to ISO. It simply crashes the tools.

The img files must be incompatible or corrupted (though the downloaded SHA match) ?
Title: Re: Opnsense not installing? Alternative method to get it done!
Post by: franco on July 19, 2017, 10:05:59 am
It was fixed here:

https://pkg.opnsense.org/snapshots/OPNsense-17.1.8-OpenSSL-vga-amd64.img.bz2

And subsequently here:

https://pkg.opnsense.org/releases/17.7.r1/


Cheers,
Franco