Sunday, June 9, 2013

NAS4Free embedded on Compact Flash

I've been trying to get NAS4Free embedded running on a compact flash card mounted to the PATA port on an SS4200-E using an IDE to CF adapter.  I've tried installing to multiple CF cards using a live USB image, but it always throws an error when trying to find the config.xml file.

For something new, I decided to use the embedded image (instead of the live USB image).  This is a compressed file.  I use NAS4Free-x64-embedded-9.1.0.1.724.img from here: http://sourceforge.net/projects/nas4free/files/NAS4Free-9.1.0.1/9.1.0.1.724/

Of course, as soon as I went there I saw that there was an update 24 hours ago.

Anyway, I extracted the image using 7zip, then added a "img" extension, then burned the new .img file to the compact flash card using Win32DiskImager.

Then, I put the CF card on a USB reader (something different) and booted.  As usually, the serial output died after the "Welcome to NAS4Free!" menu, but this time I got the server to boot.  I enabled serial output and changed the message of the day.  Then I rebooted.  I wanted to see if the config.xml file was going to be saved or not.  I really don't know were it does get saved, if at all.

This time, it worked.  I was able to see all the boot, the MOTD, and the console setup menu.  The next step is to put the card in the IDE port and see if it works there.  If not, then either the adapter is not working or there is a conflict in BIOS.  Or there may be a bug, so I should try the latest version if this doesn't work.

When I put it in the adapter, I get this error:
Reboot and Select proper Boot device
or Insert Boot Media in selected Boot device and press a key


Turns out the adapter wasn't inserted correctly!  After booting, I got the same error as always:

*******************************************************************************
FATAL ERROR!
The device that contains the configuration file (config.xml) could not be
found. NAS4Free cannot continue booting.
*******************************************************************************

Clearly, the CF card is being mounted/treated differently when it is attached via USB vs. the CF to IDE adapter.  I tried on a newer 1GB CF card in case the bios settings were conflicting.

The serial output showed what devices are being mounted.  It probably has something to do with md0.  It only tries to find config.xml on ad0 and ad1, which are the two SATA drives in the system.

 ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
 ³                                                                            ³
 ³                                                                            ³
 ³                                                                            ³
 ³                                                                            ³
 ³  Welcome to NAS4Free!                                                      ³
 ³                                                                            ³
 ³  1. Boot NAS4Free in Normal Mode                                           ³
 ³  2. Boot NAS4Free with ACPI enabled                                        ³
 ³  3. Boot NAS4Free in Safe Mode                                             ³
 ³  4. Boot NAS4Free with verbose logging                                     ³
 ³  5. Escape to loader prompt                                                ³
 ³  6. Reboot system                                                          ³
 ³                                                                            ³
 ³                                                                            ³
 ³                                                                            ³
 ³                                                                            ³
 ³                                                                            ³
 ³  Select option, [Enter] for default                                        ³
 ³  or [Space] to pause timer  0                                              ³
 ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ

Copyright (c) 1992-2012 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 9.1-RELEASE-p3 #0 r251558M: Sun Jun  9 00:59:19 CEST 2013
    root@dev.nas4free.org:/usr/obj/nas4free/usr/src/sys/NAS4FREE-amd64 amd64
CPU: Intel(R) Celeron(R) CPU          420  @ 1.60GHz (1600.03-MHz K8-class CPU)
  Origin = "GenuineIntel"  Id = 0x10661  Family = 6  Model = 16  Stepping = 1
  Features=0xafebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,TM,PBE>
  Features2=0xe31d<SSE3,DTES64,MON,DS_CPL,TM2,SSSE3,CX16,xTPR,PDCM>
  AMD Features=0x20100800<SYSCALL,NX,LM>
  AMD Features2=0x1<LAHF>
  TSC: P-state invariant, performance statistics
real memory  = 1073741824 (1024 MB)
avail memory = 760705024 (725 MB)
Event timer "LAPIC" quality 400
ACPI APIC Table: <121907 APIC1340>
ioapic0 <Version 2.0> irqs 0-23 on motherboard
kbd1 at kbdmux0
cryptosoft0: <software crypto> on motherboard
acpi0: <121907 XSDT1340> on motherboard
acpi0: Power Button (fixed)
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, 3f700000 (3) failed
cpu0: <ACPI CPU> on acpi0
attimer0: <AT timer> port 0x40-0x43 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
atrtc0: <AT realtime clock> port 0x70-0x71 irq 8 on acpi0
Event timer "RTC" frequency 32768 Hz quality 0
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0xec00-0xec07 mem 0xffa80000-0xffafffff,0xe0000000-0xefffffff,0xffa40000-0xffa7ffff irq 16 at device 2.0 on pci0
agp0: <Intel 82945G (945G GMCH) SVGA controller> on vgapci0
agp0: aperture size is 256M, detected 7932k stolen memory
pcib1: <ACPI PCI-PCI bridge> irq 16 at device 28.0 on pci0
pci1: <ACPI PCI bus> on pcib1
em0: <Intel(R) PRO/1000 Network Connection 7.3.2> port 0xbc00-0xbc1f mem 0xff6e0000-0xff6fffff irq 16 at device 0.0 on pci1
em0: Using an MSI interrupt
em0: Ethernet address: 00:15:17:31:c9:8f
pcib2: <ACPI PCI-PCI bridge> irq 18 at device 28.2 on pci0
pci2: <ACPI PCI bus> on pcib2
siis0: <SiI3132 SATA controller> port 0xcc00-0xcc7f mem 0xff8ffc00-0xff8ffc7f,0xff8f8000-0xff8fbfff irq 18 at device 0.0 on pci2
siisch0: <SIIS channel> at channel 0 on siis0
siisch1: <SIIS channel> at channel 1 on siis0
uhci0: <Intel 82801G (ICH7) USB controller USB-A> port 0xe880-0xe89f irq 23 at device 29.0 on pci0
uhci0: LegSup = 0x2f00
usbus0 on uhci0
uhci1: <Intel 82801G (ICH7) USB controller USB-B> port 0xe800-0xe81f irq 19 at device 29.1 on pci0
uhci1: LegSup = 0x2f00
usbus1 on uhci1
uhci2: <Intel 82801G (ICH7) USB controller USB-C> port 0xe480-0xe49f irq 18 at device 29.2 on pci0
uhci2: LegSup = 0x2f00
usbus2 on uhci2
uhci3: <Intel 82801G (ICH7) USB controller USB-D> port 0xe400-0xe41f irq 16 at device 29.3 on pci0
uhci3: LegSup = 0x2f00
usbus3 on uhci3
ehci0: <Intel 82801GB/R (ICH7) USB 2.0 controller> mem 0xffa3fc00-0xffa3ffff irq 23 at device 29.7 on pci0
usbus4: EHCI version 1.0
usbus4 on ehci0
pcib3: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci3: <ACPI PCI bus> on pcib3
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
ahci0: <Intel ICH7 AHCI SATA controller> port 0xe080-0xe087,0xe000-0xe003,0xdc00-0xdc07,0xd880-0xd883,0xd800-0xd80f mem 0xffa3f800-0xffa3fbff irq 19 at device 31.2 on pci0
ahci0: AHCI v1.10 with 4 3Gbps ports, Port Multiplier not supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich2: <AHCI channel> at channel 2 on ahci0
ahcich3: <AHCI channel> at channel 3 on ahci0
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
acpi_button0: <Power Button> on acpi0
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart0: console (9600,n,8,1)
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
ppc0: cannot reserve I/O port range
ctl: CAM Target Layer loaded
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
coretemp0: Tj(target) value 0 does not seem right.
p4tcc0: <CPU Frequency Thermal Control> on cpu0
ZFS WARNING: Recommended minimum kmem_size is 512MB; expect unstable behavior.
             Consider tuning vm.kmem_size and vm.kmem_size_max
             in /boot/loader.conf.
ZFS filesystem version 5
ZFS storage pool version 28
Timecounters tick every 1.000 msec
ipfw2 (+ipv6) initialized, divert loadable, nat loadable, rule-based forwarding disabled, default to accept, logging disabled
iSCSI boot driver version 0.2.6
md0: Preloaded image </mfsroot> 232783872 bytes at 0xffffffff819a3c58
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 12Mbps Full Speed USB v1.0
ugen0.1: <Intel> at usbus0
uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <Intel> at usbus1
uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
usbus2: 12Mbps Full Speed USB v1.0
usbus3: 12Mbps Full Speed USB v1.0
ugen2.1: <Intel> at usbus2
uhub2: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
ugen3.1: <Intel> at usbus3
uhub3: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
usbus4: 480Mbps High Speed USB v2.0
ugen4.1: <Intel> at usbus4
uhub4: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus4
uhub0: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
uhub3: 2 ports with 2 removable, self powered
uhub4: 8 ports with 8 removable, self powered
ada0 at ahcich0 bus 0 scbus2 target 0 lun 0
ada0: <SAMSUNG HD103SJ 1AJ100E4> ATA-8 SATA 2.x device
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C)
ada0: Previously was known as ad8
ada1 at ahcich1 bus 0 scbus3 target 0 lun 0
ada1: <SAMSUNG HD103SJ 1AJ100E4> ATA-8 SATA 2.x device
ada1: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada1: Command Queueing enabled
ada1: 953869MB (1953525168 512 byte sectors: 16H 63S/T 16383C)
ada1: Previously was known as ad10
Timecounter "TSC" frequency 1600034840 Hz quality 1000
Trying to mount root from ufs:/dev/md0 []...
Loading configuration files.
Booting platform: embedded
Looking for configuration file: ada1 ada0 ada1 ada0

*******************************************************************************
FATAL ERROR!
The device that contains the configuration file (config.xml) could not be
found. NAS4Free cannot continue booting.
*******************************************************************************

2 comments:

  1. How did you enable serial output?

    ReplyDelete
    Replies
    1. Check this post and see if it helps:
      http://jaybee03.blogspot.com/2013/05/ss4200-e-serial-connection-for-nas4free.html

      If not, let me know, and I'll see if I can provide more detail.

      Delete