Alix2d3 - can't upgrade from 2.1_RC0 to RC1
-
I suggest you execute the following shell command on the pfSense console:```
dd if=/dev/ad0 of=/dev/null -
ok. did that and it comes back with:
8211168+0 records in
8211168+0 records out
4204118016 bytes transferred in 2223.790851 secs (1890519 bytes/sec) -
The really great thing about this little flash drives is they are so cheap that when one crashes you can toss it and replace it with no great financial burden.
-
ok. did that and it comes back with:
If there were no errors reported on the console or in the system log the flash card is probably ok and I would guess you were probably hit by a file system error which is now lost because the slice was overwritten.
-
Does that mean I can duplicate the good slice I'm currently on to the one that didn't boot before and then try another upgrade?
-
Try and see for yourself? Otherwise, don't get me wrong, but a new CF card costs $16.
-
$16 is really abit pricey…
On E-Bay you can get them for anywhere between $(We will actually pay you to take our stuff) - $6
Apparently, somewhere in China there is a factory where the workers actually must pay for the honour of making CF cards to give away....
-
$16 is really abit pricey…
I'd rather get the "abit pricey" original CF card which is tested to work with the board, notably with UDMA-100, rather that getting random fake crap from eBay. Not really worth saving the price of 1-2 Big Macs.
-
Ummmm. Burgers. OK. $16
-
an industrial grade 4gb cf card ain't that cheap.
-
"Industrial Grade" isn't a spec, although sellers like you to think it is.
I would look at actual specs like MTTF, read rate, write rate, number of rewrite cycles it will endure, operating temp etc and go by things like that.
You might come out cheaper and just as reliable.I've never ever, not even once had a flash media actually fail me EXCEPT when I didn't realize the problem with running journaling file systems on a NAND media and so crashed 2 with frequent writes. I also quickly learned that once you have screwed a flash drive, toss it. You can't trust it any more.
I'd buy a new one.
-
And here is the error I get when duplicating the slice:
Warning: file_put_contents(/tmp/pfsense1/etc/fstab): failed to open stream: No such file or directory in /etc/inc/pfsense-utils.inc on line 2132
-
Well… then you clearly cannot duplicate the slice. Time to move on, don't you think?
-
There is likely more to the errors farther inside of the upgrade log.
try to upgrade again, then go to Diag > NanoBSD and view the full upgrade log, and post it.
You'll also see errors like that when your CF is perfectly good but it was imaged with an "-upgrade" .img initially rather than an actual full NanoBSD .img file.
-
Have you tried removing all the packages from the installation? I assume that the V2 release is much larger than the older V1 release because I've found that AVAHI will not build under 2.0 and the traffic shaper crashes under 2.0. If 2.1 doesn't fix these issues then it's probably time to toss the nano version.
-
it's a bit long but here is the upgrade log:
NanoBSD Firmware upgrade in progress…
Installing /root/latest.tgz.
SLICE 2
OLDSLICE 1
TOFLASH ad0s2
COMPLETE_PATH ad0s2a
GLABEL_SLICE pfsense1
Wed Aug 7 07:07:18 BST 2013total 8
dr-xr-xr-x 8 root wheel 512B Aug 4 21:57 .
drwxr-xr-x 24 root wheel 512B Aug 4 21:58 ..
crw-r----- 1 root operator 0, 56 Aug 4 21:57 ad0
crw-r----- 1 root operator 0, 57 Aug 4 21:57 ad0s1
crw-r----- 1 root operator 0, 60 Aug 4 21:57 ad0s1a
crw-r----- 1 root operator 0, 58 Aug 6 17:31 ad0s2
crw-r----- 1 root operator 0, 78 Aug 6 17:31 ad0s2a
crw-r----- 1 root operator 0, 59 Aug 4 21:57 ad0s3
crw------- 1 root operator 0, 28 Aug 4 21:57 ata
crw------- 1 root wheel 0, 11 Aug 7 07:07 bpf
lrwxr-xr-x 1 root wheel 3B Aug 4 21:57 bpf0 -> bpf
crw------- 1 root tty 0, 4 Aug 7 07:07 console
crw-rw-rw- 1 root wheel 0, 44 Aug 4 21:57 crypto
crw-rw-rw- 1 root wheel 0, 10 Aug 4 21:57 ctty
crw-rw---- 1 uucp dialer 0, 35 Aug 4 21:57 cuau0
crw-rw---- 1 uucp dialer 0, 36 Aug 4 21:57 cuau0.init
crw-rw---- 1 uucp dialer 0, 37 Aug 4 21:57 cuau0.lock
crw-rw---- 1 uucp dialer 0, 41 Aug 4 21:57 cuau1
crw-rw---- 1 uucp dialer 0, 42 Aug 4 21:57 cuau1.init
crw-rw---- 1 uucp dialer 0, 43 Aug 4 21:57 cuau1.lock
crw------- 1 root wheel 0, 5 Aug 4 21:57 devctl
cr-------- 1 root wheel 0, 54 Aug 4 21:57 devstat
dr-xr-xr-x 2 root wheel 512B Aug 4 21:57 fd
crw------- 1 root wheel 0, 13 Aug 4 21:57 fido
crw-r----- 1 root operator 0, 3 Aug 4 21:57 geom.ctl
crw------- 1 root wheel 0, 23 Aug 4 21:57 io
crw------- 1 root wheel 0, 8 Aug 4 21:57 klog
crw-r----- 1 root kmem 0, 15 Aug 4 21:57 kmem
dr-xr-xr-x 2 root wheel 512B Aug 4 21:57 led
crw-r----- 1 root operator 0, 62 Aug 4 21:58 md0
crw-r----- 1 root operator 0, 64 Aug 4 21:58 md1
crw------- 1 root wheel 0, 47 Aug 4 21:57 mdctl
crw-r----- 1 root kmem 0, 14 Aug 4 21:57 mem
crw------- 1 root kmem 0, 16 Aug 4 21:57 nfslock
crw-rw-rw- 1 root wheel 0, 25 Aug 7 07:07 null
crw-r--r-- 1 root wheel 0, 27 Aug 4 21:57 pci
crw-rw---- 1 root proxy 0, 45 Aug 4 21:57 pf
crw-rw-rw- 1 root wheel 0, 9 Aug 4 21:57 ptmx
dr-xr-xr-x 2 root wheel 512B Aug 4 22:31 pts
crw-rw-rw- 1 root wheel 0, 6 Aug 4 21:57 random
crw------- 1 root wheel 0, 24 Aug 4 21:57 speaker
lrwxr-xr-x 1 root wheel 4B Aug 4 21:57 stderr -> fd/2
lrwxr-xr-x 1 root wheel 4B Aug 4 21:57 stdin -> fd/0
lrwxr-xr-x 1 root wheel 4B Aug 4 21:57 stdout -> fd/1
crw------- 1 root wheel 0, 32 Aug 4 21:57 ttyu0
crw------- 1 root wheel 0, 33 Aug 4 21:57 ttyu0.init
crw------- 1 root wheel 0, 34 Aug 4 21:57 ttyu0.lock
crw------- 1 root wheel 0, 38 Aug 4 21:57 ttyu1
crw------- 1 root wheel 0, 39 Aug 4 21:57 ttyu1.init
crw------- 1 root wheel 0, 40 Aug 4 21:57 ttyu1.lock
crw------- 1 uucp dialer 0, 72 Aug 4 21:58 tun1
dr-xr-xr-x 2 root wheel 512B Aug 4 21:57 ufs
dr-xr-xr-x 2 root wheel 512B Aug 4 21:57 ufsid
lrwxr-xr-x 1 root wheel 9B Aug 4 21:57 ugen0.1 -> usb/0.1.0
lrwxr-xr-x 1 root wheel 9B Aug 4 21:57 ugen1.1 -> usb/1.1.0
lrwxr-xr-x 1 root wheel 6B Aug 4 21:57 urandom -> random
dr-xr-xr-x 2 root wheel 512B Aug 4 21:57 usb
crw-r--r-- 1 root operator 0, 46 Aug 4 21:57 usbctl
crw------- 1 root operator 0, 55 Aug 4 21:57 xpt0
crw-rw-rw- 1 root wheel 0, 26 Aug 4 21:57 zero-rw-r--r-- 1 root wheel 78M Aug 7 07:05 /root/latest.tgz
MD5 (/root/latest.tgz) = 9697bd6338477034e2fbb8ad53e5ee33
/dev/ufs/pfsense1 on / (ufs, local, noatime, synchronous)
devfs on /dev (devfs, local)
/dev/ufs/cf on /cf (ufs, local, noatime, synchronous)
/dev/md0 on /tmp (ufs, local)
/dev/md1 on /var (ufs, local)
devfs on /var/dhcpd/dev (devfs, local)last pid: 23896; load averages: 1.43, 0.61, 0.29 up 2+09:09:25 07:07:23
50 processes: 1 running, 49 sleepingMem: 77M Active, 76M Inact, 61M Wired, 3072K Cache, 33M Buf, 13M Free
Swap:PID USERNAME THR PRI NICE SIZE RES STATE TIME WCPU COMMAND
68586 root 1 76 20 3644K 1312K wait 1:51 0.00% sh
40230 root 1 64 20 3264K 1220K select 1:18 0.00% apinger
99879 nobody 1 44 0 5512K 2412K select 0:46 0.00% dnsmasq
64552 zabbix 1 64 20 4532K 1676K nanslp 0:43 0.00% zabbix_agentd
2041 root 1 76 0 35808K 24784K accept 0:26 0.00% php
7528 dhcpd 1 44 0 11456K 7672K select 0:23 0.00% dhcpd
27023 root 1 64 20 6280K 6300K select 0:21 0.00% ntpd
295 root 1 76 20 3352K 1124K kqread 0:21 0.00% check_reload_status
94442 root 1 44 0 9028K 6204K kqread 0:16 0.00% lighttpd
92451 root 1 64 20 7156K 5876K select 0:07 0.00% bsnmpd
22827 root 1 44 0 5868K 1920K bpf 0:06 0.00% tcpdump
2353 root 1 64 0 35808K 24664K accept 0:05 0.00% php
9531 root 1 44 0 7880K 2944K select 0:05 0.00% mpd5
771 root 1 64 20 5808K 2280K kqread 0:04 0.00% master
49622 root 1 76 20 3356K 1316K nanslp 0:03 0.00% cron
66845 root 1 64 20 5432K 3112K select 0:03 0.00% openvpn
5502 root 1 64 20 3412K 1404K select 0:03 0.00% syslogd
8075 root 1 44 0 3264K 1764K kqread 0:03 0.00% dhcpleasesNanoBSD upgrade starting
dd if=/dev/zero of=/dev/ad0s2 bs=1m count=1
1+0 records in
1+0 records out
1048576 bytes transferred in 0.204044 secs (5138967 bytes/sec)/usr/bin/gzip -dc /root/latest.tgz | /bin/dd of=/dev/ad0s2 obs=64k
3844449+0 records in
30034+1 records out
1968357888 bytes transferred in 355.340421 secs (5539358 bytes/sec)
After upgrade fdisk/bsdlabel/sbin/fsck_ufs -y /dev/ad0s2a
** /dev/ad0s2a
** Last Mounted on /tmp/builder/_.mnt
** Phase 1 - Check Blocks and Sizes
** Phase 2 - Check Pathnames
** Phase 3 - Check Connectivity
** Phase 4 - Check Reference Counts
** Phase 5 - Check Cyl groups
6322 files, 334070 used, 3445958 free (670 frags, 430661 blocks, 0.0% fragmentation)***** FILE SYSTEM IS CLEAN *****
/sbin/tunefs -L pfsense1 /dev/ad0s2a
Checking for post_upgrade_command...File list:
/tmp/pfsense1
/tmp/pfsense1/.snapYADA….. YADA..... no errors in the files
Misc log:
fdisk: invalid fdisk partition table found
bsdlabel: /dev/ad0s3: no valid label found
bsdlabel: /dev/ad0s3: no valid label found
mount: /dev/ufs/pfsense1 : Device busy
cp: /tmp/pfsense1/etc/fstab: No such file or directory
sed: /tmp/pfsense1/etc/fstab: No such file or directory
umount: /tmp/pfsense1: not a file system root directoryfdisk/bsdlabel log:
Before upgrade fdisk/bsdlabel
******* Working on device /dev/ad0 *******
parameters extracted from in-core disklabel are:
cylinders=8146 heads=16 sectors/track=63 (1008 blks/cyl)Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=8146 heads=16 sectors/track=63 (1008 blks/cyl)Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 63, size 3861585 (1885 Meg), flag 80 (active)
beg: cyl 0/ head 1/ sector 1;
end: cyl 758/ head 15/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 3861711, size 3861585 (1885 Meg), flag 0
beg: cyl 759/ head 1/ sector 1;
end: cyl 493/ head 15/ sector 63
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
start 7723296, size 102816 (50 Meg), flag 0
beg: cyl 494/ head 0/ sector 1;
end: cyl 595/ head 15/ sector 63
The data for partition 4 is:
<unused># /dev/ad0s1:
type: unknown
disk: amnesiac
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 3813
sectors/unit: 3844449
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 08 partitions:
size offset fstype [fsize bsize bps/cpg]
a: 3844433 16 unused 0 0
c: 3844449 0 unused 0 0 # "raw" part, don't edit/dev/ad0s2:
type: unknown
disk: amnesiac
label:
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 3813
sectors/unit: 3844449
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0 # milliseconds
track-to-track seek: 0 # milliseconds
drivedata: 08 partitions:
size offset fstype [fsize bsize bps/cpg]
a: 3844433 16 unused 0 0
c: 3844449 0 unused 0 0 # "raw" part, don't edit
–-------------------------------------------------------------Any idea's on that error? Strange that the disk is saying it's ok and then coming up with invalid disk partition....</unused>
-
Any idea's on that error? Strange that the disk is saying it's ok and then coming up with invalid disk partition….
First some names: The Master Boot Record (MBR) allows for 4 partitions. FreeBSD calls these slices. Each slice that specifies it is a FreeBSD slice then has a BSD label and FreeBSD partitions. A device name such as /dev/ad0s2a indicates FreeBSD partition "a" within FreeBSD slice 2 on ATA disk ad0.
Your log indicates slice 1 and 2 are OK, but slice doesn't appear to have a valid BSD label.
If I recall correctly nanoBSD should have 3 slices: one of which is used for configuration information so that information can be easily shared by the other two slices.
fdisk: invalid fdisk partition table found
bsdlabel: /dev/ad0s3: no valid label found
bsdlabel: /dev/ad0s3: no valid label found
mount: /dev/ufs/pfsense1 : Device busy
cp: /tmp/pfsense1/etc/fstab: No such file or directory
sed: /tmp/pfsense1/etc/fstab: No such file or directory
umount: /tmp/pfsense1: not a file system root directoryNote the problem is reported on slice 3 which is not reported in the disklabel log.
-
Do you know how to fix this? Is it an edit in the shell?
-
Do you know how to fix this? Is it an edit in the shell?
Uh. Rewrite the image to the card, restore configuration backup? (Note: I definitely am not convinced the card is OK, frankly I'd just dump it.)
-
fsck is not a sure-fire way to detect CF card errors (well, the same is true for SSDs and traditional HDs).
Had a suddenly appearing, strange issue with port forwarding once. Replaced the CF card. Issue solved.