OPNsense Forum

Archive => 18.1 Legacy Series => Topic started by: hilfubsi on February 06, 2018, 07:11:14 pm

Title: Unable to install from serial image on APU2
Post by: hilfubsi on February 06, 2018, 07:11:14 pm
TLDR: The solution is just to try another USB memory stick. I used a 16GB Kingston USB2 on the APU's USB3 port and it worked without a hitch whereas I couldn't get the SanDisk UltraFit 16GB USB3 stick to work.

I can't boot the OPNsense serial image on an APU2 using a USB3 flash drive.

I tried the serial images for 18.1 and 17.7.5 (couldn't find any other version anywhere)

The error is:

Code: [Select]
da0 at umass-sim0 bus 0 scbus2 target 0 lun 0
da0: <SanDisk Ultra Fit 1.00> Removable Direct Access SPC-4 SCSI device
da0: Serial Number xxxxxxxxxxxxxxxxxxxxxxx
da0: 400.000MB/s transfers
da0: 14663MB (30031250 512 byte sectors)
SMP: AP CPU #2 Launched!
SMP: AP CPU #1 Launched!
SMP: AP CPU #3 Launched!
da0: quirks=0x2<NO_6_BYTE>
Timecounter "TSC" frequency 998163109 Hz quality 1000
Trying to mount root from ufs:/dev/ufs/OPNsense_Install [ro,noatime]...
Mounting filesystems...
tunefs: soft updates set
GEOM_MIRROR: Force device OPNsenseMirror start due to timeout.
GEOM_MIRROR: Device mirror/OPNsenseMirror launched (1/2).
(da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 00 00 10 00 00 10 00
(da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(da0:umass-sim0:0:0:0): Retrying command
(da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 00 00 10 00 00 10 00
(da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(da0:umass-sim0:0:0:0): Retrying command
(da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 00 00 10 00 00 10 00
(da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(da0:umass-sim0:0:0:0): Retrying command
(da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 00 00 10 00 00 10 00
(da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(da0:umass-sim0:0:0:0): Retrying command
(da0:umass-sim0:0:0:0): WRITE(10). CDB: 2a 00 00 00 00 10 00 00 10 00
(da0:umass-sim0:0:0:0): CAM status: CCB request completed with an error
(da0:umass-sim0:0:0:0): Error 5, Retries exhausted
tunefs: /: failed to write superblock

I don't have a USB2 bracket to connect like this blog post suggests https://eerielinux.wordpress.com/2017/06/20/building-a-bsd-home-router-pt-5-installing-opnsense/

How do I install OPNsense?
Title: Re: Unable to install from serial image on APU2
Post by: franco on February 06, 2018, 07:50:02 pm
Use dd(1) with Nano image on target media and boot. If it beeps it's done! :)


Cheers,
Franco
Title: Re: Unable to install from serial image on APU2
Post by: hilfubsi on February 07, 2018, 01:11:24 am
That worked, thanks.

My SSD is 16GB, but OPNsense only takes 3GB. I thought it would auto-expand on the first run?

Also, should I run opnsense-installer afterwards?

I find it very slow to boot, it takes maybe two minutes to go from power on to the jingle.
Title: Re: Unable to install from serial image on APU2
Post by: marjohn56 on February 07, 2018, 01:23:54 am
For APU2, download the serial  AMD64 image, on windows you can use Rufus to write the DD image to USB, Boot from the USB by hitting F10 as soon as the APU boots, select the USB as the boot device. Let it do its thing, opesense will start and load.

Once you hit the login prompt. Enter 'Installler' as the username, then the password is 'opnsense', follow the prompts and just let the installer do it's own thing, default settings all the way. If you don't install it, it's just running from the USB stick, not the SSD. On an APU2, it takes around around 90 seconds to boot to the tune.
Title: Re: Unable to install from serial image on APU2
Post by: hilfubsi on February 07, 2018, 02:21:37 am
I used dd to write the nano image to the mSATA drive, there is no USB plugged in. But it only uses 3GB of the 16GB. The nano image doesn't have the installer user, only root. And the serial image doesn't boot because of problems with BSD and USB3 apparently.
Title: Re: Unable to install from serial image on APU2
Post by: marjohn56 on February 07, 2018, 08:28:28 am
OK, well you can install from a USB stick as I and thousands of others have done so. As I use APU2's for testing I must have done it on countless occasions, at least three times last weekend. :)

Here's my usage.

Title: Re: Unable to install from serial image on APU2
Post by: nivek1612 on February 07, 2018, 11:48:56 am
As @marjohn said serial install works like a charm I use it all the time on my test unit never had an issue
Title: Re: Unable to install from serial image on APU2
Post by: hilfubsi on February 07, 2018, 03:01:12 pm
Which BIOS version do you use on your APU2s? There are so many that it's confusing.

Or maybe I'm doing something wrong. I download the 18.1-serial image, I use Etcher to write the image to a 16GB Sandisk Ultra Fit USB3 flash memory, then I plug in one of the USB3 ports on the APU2, plug the power in, press F10. If the USB is in the list, I select to boot from it; if not, I choose the setup option, don't change anything, move the USB stick to the other USB port, press x, F10 again, etc until I see it in the list.

Then I use the default options to boot, and it will eventually fail with the message above.

Anything you can spot that I'm doing wrong?
Title: Re: Unable to install from serial image on APU2
Post by: astrandb on February 07, 2018, 03:07:05 pm
I had similar problems when using a 16GB USB3 stick but after changing to a 4GB USB2 it has worked every time.
Title: Re: Unable to install from serial image on APU2
Post by: nivek1612 on February 07, 2018, 03:10:17 pm
BIOS
Vendor: coreboot
Version: 4.0.7
Release Date: Tue Feb 28 2017

I build the usb image on a mac using 
 
sudo dd  if=<file>.img of=/dev/rdiskX bs=64k

X is the disk number of the USB

Have you tried another USB stick I have a 16GB Sansdisk that never works but a 2GB Sandisk that is fine
Title: Re: Unable to install from serial image on APU2
Post by: marjohn56 on February 07, 2018, 03:36:10 pm
It's a bit flaky...

I have a number of USB sticks, ranging from a couple of Gb to 128Gb, USB2 and USB3. Some will work and some will not... and some will work some of the time. I've also killed a few completely in the process.

Best answer is to try several, one of them WILL work. :)

Don't expect opnsense to fill the SSD, it's not that large.
Title: Re: Unable to install from serial image on APU2
Post by: hilfubsi on February 07, 2018, 04:07:32 pm
It's a bit flaky...

I have a number of USB sticks, ranging from a couple of Gb to 128Gb, USB2 and USB3. Some will work and some will not... and some will work some of the time. I've also killed a few completely in the process.

Best answer is to try several, one of them WILL work. :)

Don't expect opnsense to fill the SSD, it's not that large.

I have tried a 1GB but it's too small and I can't write the whole serial image to it. I would expect OPNsense to expand to the whole disk size because I want to run a transparent proxy for apt packages and http data. It's also complaining that it can't update because there isn't enough free space left on the device so I can't upgrade to 18.1.1

I was thinking this is because of the nano image that goes out of its way to minimize writes etc, and that installing the standard serial image would help with that.
Title: Re: Unable to install from serial image on APU2
Post by: marjohn56 on February 07, 2018, 04:17:00 pm
The image I posted earlier shows how much space opnsense takes up on the SSD after an install, before adding any other features. What you decide to add after install is up to you.

Just get hold of a 2 or 4Gb USB stick and follow the instructions given in this thread. There is very little expansion if any once the image is on the stick, that's why it can run from the stick. In the case of installing,  it's just an SSD format, file system creation and a duplication process from the USB to the SSD. It's complaining it cannot update because it's not installed on the SSD, you're running it from the USB or it appears from a memory card, which is dog slow.

Read this:

https://docs.opnsense.org/manual/install.html (https://docs.opnsense.org/manual/install.html)
Title: Re: Unable to install from serial image on APU2
Post by: hilfubsi on February 07, 2018, 04:20:30 pm
The image I posted earlier shows how much space opnsense takes up on the SSD after an install, before adding any other features. What you decide to add after install is up to you.

Thanks, I didn't notice the attached image. My disk usage with the nano image is different and it uses only 3GB out of the 16GB, cf. attachment.
Title: Re: Unable to install from serial image on APU2
Post by: hilfubsi on February 07, 2018, 05:52:33 pm
I was able to boot and install with a Kingston 16GB usb2 stick in the usb3 ports. But now I'm getting the dreaded error 19. So close!

--edit: I rebooted again and it failed with this:
Code: [Select]
usbus1: 480Mbps High Speed USB v2.0
isab0: <PCI-ISA bridge> at device 20.3 on pci0
isa0: <ISA bus> on isab0
sdhci_pci0: <Generic SD HCI> mem 0xf7f27000-0xf7f270ff at device 20.7 on pci0
sdhci_pci0: 1 slot(s) allocated
orm0: <ISA Option ROM> at iomem 0xef000-0xeffff on isa0
ppc0: cannot reserve I/O port range
uart0: <16550 or compatible> at port 0x3f8 irq 4 flags 0x10 on isa0
uart0: console (115200,n,8,1)
uart1: <16550 or compatible> at port 0x2f8 irq 3 on isa0
hwpstate0: <Cool`n'Quiet 2.0> on cpu0
Timecounters tick every 1.000 msec
nvme cam probe device init
ugen0.1: <0x1022 XHCI root HUB> at usbus0
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <SATA SSD SBFM01.1> ACS-4 ATA SATA 3.x device
ada0: Serial Number 8EFA077A1AE701738346
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 15272MB (31277232 512 byte sectors)
uhub0: <0x1022 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
ugen1.1: <AMD EHCI root HUB> at usbus1
[ thread pid 15 tid 100073 ]
Stopped at      vga_bitblt_one_text_pixels_block+0x135: movl    (%rax,%r13,4),%ebx
db>

Then I typed `reboot` and now it started up just fine...
Title: Re: Unable to install from serial image on APU2
Post by: marjohn56 on February 07, 2018, 05:56:00 pm
What are you using to write the USB?

I've never seen the dreaded error 19.... ever.
Title: Re: Unable to install from serial image on APU2
Post by: hilfubsi on February 07, 2018, 06:43:22 pm
OK, well you can install from a USB stick as I and thousands of others have done so. As I use APU2's for testing I must have done it on countless occasions, at least three times last weekend. :)

Here's my usage.

Where did you find your dark theme?
Title: Re: Unable to install from serial image on APU2
Post by: franco on February 07, 2018, 06:49:47 pm
It's currently under development by marjohn56 himself. You can install from the command line:

# pkg install os-theme-rebellion

Then go to System: Settings: General and select the theme.


Cheers,
Franco
Title: Re: Unable to install from serial image on APU2
Post by: hilfubsi on February 07, 2018, 07:08:16 pm
What are you using to write the USB?

I've never seen the dreaded error 19.... ever.

I used Etcher on Linux with the 18.1-serial image.

The error 19 is about GPT/MBR. I don't quite understand what the problem is, but the drive I was installing to had a dos partition table and I chose GPT/UEFI in the installer (since it's the recommended option). Then I deleted all the partitions on the SSD, switched to GPT partition scheme, and selected GPT/UEFI again in the installer. That's what I'm running now. I'm afraid to reboot the router :D
Title: Re: Unable to install from serial image on APU2
Post by: marjohn56 on February 07, 2018, 10:35:52 pm
Job done...  that's the easy part done anyway. :)