Reinstalling via serial console not working
-
A few days ago my UPS batteries of my Tripplite UPS went dead, shortly after giving a first alarm and this made my pfSense box on a Watchguard XTM510 reboot several times in a row.
Due to this the ZFS filesystem became corrupt :-) and a boot was no longer possible.
I had a backup of the config on my NAS, so no worries, quick reinstall and i thought it would be ok again... well no...
I prepared a memstick with serial interface and tried to reinstall pfsense.
Every time i got an error that the filesystem was read only and could not write to it. I could not type any key through the serial interface.
So i connected a keyboard directly to the Watchguard box.
After that i could get into the BIOS of the Watchguard box.
I tried with 3 different USB memory sticks, same result.
I wrote the USB sticks with 3 different softwares, same result.
Finally, I took one of my old systems with VGA output - put the pfSense SSD in it, wrote a memstick with the VGA interface and installation worked from the first time!
Then i have put the SDD in my Watchguard again, restored the config and i was up and running again.
More interesting, the screen output and keyboard input worked right away again.
In the boot messages i see: Dual Console: Serial Primary, Video Secondary. So both outputs are active!
Conclusion: there is apparently something wrong with the pfsense USB image for memstick with serial interface (pfSense-CE-memstick-serial-2.7.2-RELEASE-amd64.img.gz). Also read this in other messages on this forum.
You might as well use the pfSense image with the VGA interface. This one works!
And you can perfectly install pfSense in another system and take the SSD out and put it in the target system.
Wanted to share this with you, i lost a lot of time, maybe it helps someone else in the same situation. -
I tested that image in a range of devices including an XTM5 and it booted as expected.
Do you have the actual error it was showing?
Steve
-
Hi Steve,
Thanks for your swift response.
I have saved a lot of the output messages from the serial console during the different scenario's I tried.
I cut and paste the most interesting ones for you (i hope):This is the part that says "read only file system"
ada0: <CT250MX500SSD1 M3CR020> ACS-3 ATA SATA 3.x device
ada0: Serial Number 1826E1461C67
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 512bytes)
ada0: Command Queueing enabled
ada0: 238475MB (488397168 512 byte sectors)
da0 at umass-sim0 bus 0 scbus5 target 0 lun 0
da0: <Generic USB SD Reader 9.01> Removable Direct Access SCSI-2 device
da0: Serial Number TDSEVQV9
da0: 40.000MB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
da0: quirks=0x2<NO_6_BYTE>
da0: Write Protected
da1 at umass-sim0 bus 0 scbus5 target 0 lun 1
da1: <Generic Flash Disk 8.01> Removable Direct Access SCSI-2 device
da1: Serial Number TDSEVQV9
da1: 40.000MB/s transfers
da1: 7894MB (16166912 512 byte sectors)
da1: quirks=0x2<NO_6_BYTE>
random: unblocking device.
Dual Console: Serial Primary, Video Secondary
No suitable dump device was found.
/etc/rc: WARNING: hostid: unable to figure out a UUID from DMI data, generating a new one
Setting hostuuid: c8114207-3c01-4b72-a715-4fd6f8d64409.
Setting hostid: 0x229df0ce.
Starting file system checks:
/dev/ufs/FreeBSD_Install: FILE SYSTEM CLEAN; SKIPPING CHECKS
/dev/ufs/FreeBSD_Install: clean, 30611 free (11 frags, 3825 blocks, 0.0% fragmen tation)
eval: cannot create /etc/hostid: Read-only file system
/etc/rc: WARNING: could not store hostuuid in /etc/hostid.
eval: cannot create /etc/machine-id: Read-only file system
/etc/rc: WARNING: could not store hostuuid in /etc/machine-id.
Mounting local filesystems:.
mkdir: /tmp/.diskless.415d4a6643f2f8ba8c88352f310a605bed2a03139940635859cfbb5837 8cd9df: Read-only file system
Autoloading module: ichsmb
ichsmb0: <Intel 82801GB (ICH7) SMBus controller> port 0x400-0x41f irq 19 at devi ce 31.3 on pci0
smbus0: <System Management Bus> on ichsmb0
ELF ldconfig path: /lib /usr/lib /usr/lib/compat
32-bit compatibility ldconfig path:
fxp0: link state changed to DOWN
/etc/rc: WARNING: $hostname is not set -- see rc.conf(5).
Setting up harvesting: [CALLOUT],[UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,[NET_ETHE R],NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED
Feeding entropy: dd: /entropy: Read-only file system
dd: /boot/entropy: Read-only file systemIt was stuck several times on the type of keyboard selection and unable to type something in:
Updating /var/run/os-release done.
Starting syslogd.
Mounting late filesystems:.
Starting local daemons:/dev/md3: 8.0MB (16384 sectors) block size 32768, fragmen t size 4096
using 4 cylinder groups of 2.03MB, 65 blks, 384 inodes.
super-block backups (for fsck_ffs -b #) at:
192, 4352, 8512, 12672
Welcome to pfSense!
Please choose the appropriate terminal type for your system.
Common console types are:
ansi Standard ANSI terminal
vt100 VT100 or compatible terminal
xterm xterm terminal emulator (or compatible)
cons25w cons25w terminal
Console type [vt100]After that i got several exits to the kernel debugger and only possible to reboot:
Console type [vt100]: KDB: enter: manual escape to debugger
[ thread pid 12 tid 100010 ]
Stopped at kdb_enter+0x32: movq $0,0x234a4c3(%rip)
db>
db>
db>
db>
db>
db>
db>
db>
db>
db>
db>I also got a warning about a speaker device: (but not relevant here i suppose)
WARNING: Device "spkr" is Giant locked and may be deleted before FreeBSD 14.0.
netgate0: <unknown hardware>And even after reboot the LCDd deamon is not started properly. Still investigating that one.
Hopes this helps. If you need more or something specific, let me know. And keep up the good work with pfSense! Really love it!
Big thanks! -
@DiDiWa said in Reinstalling via serial console not working:
WARNING: Device "spkr" is Giant locked and may be deleted before FreeBSD 14.0.
netgate0: <unknown hardware>Those are expected and not an issue.
The other things look like filesystem issues. Was the the first boot from the USB device? Or had it failed to boot previously?
What is it actually booting from there? It seems odd that it would have two daX devices in an xtm5.
-
Hi @stephenw10,
My XTM5 has an internal compact flash reader, but i only have a CF card of 1GB and the uncompressed image of pfsense is now just a bit bigger than 1 GB... So that was not a option any more for me.
So i put the pfsense image for serial console on a Usb stick and that is where i got the above problems.
Booting from the SSD was no longer an option (boot files not found)'
To give you the full context. I also had the problem that the list of available packages was no longer visible. I executed the rehash instructions as i found on the forum. And they were showing again. I installed Suricata and was configuring it. Then the UPS started flipping and rebooting multiple times.
Thanks for your time.
PS my problem is solved. Just wanted to give my troubleshooting info back to the community. -
Ok. The CF is an ATA device though. That second daX device is odd:
Generic USB SD Reader 9.01
Is it a SD card in an adapter? -
Indeed, i did try to install it also from a generic SD card reader that can read all kinds of memory cards. But as already stated this was not an option because i only had a 1GB Compact Flash card.
After that i continued to install it via the USB memory stick image with serial output..
I'm still wondering why the memstick image with serial did not work and the one with VGA did.
I did not try to do the ultimate test to install the memstick image with VGA console directly on the XTM510 simply because this is my production gateway to the internet.
When my testbench of my homelab is up and running again, i can do some more tests and let you know.
Thanks!