Pfsense hangs on boot



  • Hi,

    I am trying to boot pfsense 1.2 from a 128 sandisk compactflash card which I installed using:

    root@zion:~/Desktop# zcat pfSense-1.2-Embedded.img.gz | dd of=/dev/sdb bs=16k
    7473+1 records in
    7473+1 records out
    122441728 bytes (122 MB) copied, 123.832 s, 989 kB/s
    

    When I mount this compactflash card in my old firebox III 700 (which works perfectly), it boots until ad0 is detected and then it hangs:

    
    /boot/kernel/kernel text=0x4b9580 data=0x90ab4+0x42638 |
    
    /
    
    Hit [Enter] to boot immediately, or any other key for command prompt.
    
    Booting [/boot/kernel/kernel]...
    
    Copyright (c) 1992-2007 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 6.2-RELEASE-p11 #0: Sun Feb 24 17:36:53 EST 2008
    
        sullrich@builder6.pfsense.com:/usr/obj.pfSense/usr/src/sys/pfSense_wrap.6
    
    Timecounter "i8254" frequency 1193182 Hz quality 0
    
    CPU: AMD-K6(tm) 3D processor (233.86-MHz 586-class CPU)
    
      Origin = "AuthenticAMD"  Id = 0x58c  Stepping = 12
    
      Features=0x8021bf <fpu,vme,de,pse,tsc,msr,mce,cx8,pge,mmx>AMD Features=0x80000800 <syscall,3dnow>real memory  = 134217728 (128 MB)
    
    avail memory = 121868288 (116 MB)
    
    wlan: mac acl policy registered
    
    K6-family MTRR support enabled (2 registers)
    
    ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
    
    cpu0 on motherboard
    
    pcib0: <acerlabs m1541="" (aladdin-v)="" pci="" host="" bridge=""> pcibus 0 on motherboard
    
    pci0: <pci bus=""> on pcib0
    
    pcib1: <pci-pci bridge=""> at device 1.0 on pci0
    
    pci1: <pci bus=""> on pcib1
    
    ohci0: <acerlabs m5237="" (aladdin-v)="" usb="" controller=""> mem 0xc0000000-0xc0000fff irq 11 at device 2.00
    
    ohci0: [GIANT-LOCKED]
    
    usb0: OHCI version 1.0, legacy support
    
    usb0: <acerlabs m5237="" (aladdin-v)="" usb="" controller=""> on ohci0
    
    usb0: USB revision 1.0
    
    uhub0: AcerLabs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
    
    uhub0: 2 ports with 2 removable, self powered
    
    isab0: <pci-isa bridge=""> at device 7.0 on pci0
    
    isa0: <isa bus=""> on isab0
    
    pci0: <display, vga=""> at device 12.0 (no driver attached)
    
    atapci0: <acerlabs m5229="" udma33="" controller=""> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf400-0xf400
    
    ata0: <ata 0="" channel=""> on atapci0
    
    ata1: <ata 1="" channel=""> on atapci0
    
    dc0: <macronix 10="" 98715aec-c="" 100basetx=""> port 0xf000-0xf0ff mem 0xc8000000-0xc80000ff irq 11 at de0
    
    miibus0: <mii bus=""> on dc0
    
    dcphy0: <intel 21143="" nway="" media="" interface=""> on miibus0
    
    dcphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
    
    dc0: Ethernet address: ff:ff:ff:ff:ff:ff
    
    dc1: <macronix 10="" 98715aec-c="" 100basetx=""> port 0xec00-0xecff mem 0xc8000100-0xc80001ff irq 10 at de0
    
    miibus1: <mii bus=""> on dc1
    
    dcphy1: <intel 21143="" nway="" media="" interface=""> on miibus1
    
    dcphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
    
    dc1: Ethernet address: ff:ff:ff:ff:ff:ff
    
    dc2: <macronix 10="" 98715aec-c="" 100basetx=""> port 0xe800-0xe8ff mem 0xc8000200-0xc80002ff irq 9 at dev0
    
    miibus2: <mii bus=""> on dc2
    
    dcphy2: <intel 21143="" nway="" media="" interface=""> on miibus2
    
    dcphy2:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
    
    dc2: Ethernet address: ff:ff:ff:ff:ff:ff
    
    orm0: <isa option="" rom=""> at iomem 0xc0000-0xc7fff on isa0
    
    ppc0: <parallel port=""> at port 0x378-0x37f irq 7 on isa0
    
    ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
    
    ppbus0: <parallel port="" bus=""> on ppc0
    
    ppi0: <parallel i="" o=""> on ppbus0
    
    sio0 at port 0x3f8-0x3ff irq 4 flags 0x30 on isa0
    
    sio0: type 16550A, console
    
    sio1 at port 0x2f8-0x2ff irq 3 on isa0
    
    sio1: type 16550A
    
    RTC BIOS diagnostic error 8 <fixed_disk>Timecounter "TSC" frequency 233864479 Hz quality 800
    
    Timecounters tick every 10.000 msec
    
    Fast IPsec: Initialized Security Association Processing.
    
    ad0: FAILURE - SETFEATURES SET TRANSFER MODE status=51 <ready,dsc,error>error=4 <aborted>ad0: 122MB <sandisk sdcfb-128="" vdg="" 1.18=""> at ata0-master BIOSPIO</sandisk></aborted></ready,dsc,error></fixed_disk></parallel></parallel></parallel></isa></intel></mii></macronix></intel></mii></macronix></intel></mii></macronix></ata></ata></acerlabs></display,></isa></pci-isa></acerlabs></acerlabs></pci></pci-pci></pci></acerlabs></syscall,3dnow></fpu,vme,de,pse,tsc,msr,mce,cx8,pge,mmx>
    

    nothing happens anymore after this…

    i've tried the same with monowall, and the same issue occurs.

    does anyone has an idea ?

    thanks



  • Hi,

    I'm not sure if this helps your or even relates to your difficulties but there's an ongoing thread
    in the Hardware forum that you may be interested.

    http://forum.pfsense.org/index.php/topic,7458.0.html

    Cheers,



  • @nocer:

    Hi,

    I'm not sure if this helps your or even relates to your difficulties but there's an ongoing thread
    in the Hardware forum that you may be interested.

    http://forum.pfsense.org/index.php/topic,7458.0.html

    Cheers,

    Thanks, there is no point of time where I'm asked to enter the drive to mount, and /dev/ad0 should be correct as it is mounted as a master IDE device. It just stops there… same with m0n0 wall. DD-wrt works perfectly though ... but I want pfsense :(



  • That other thread is about the X700, I believe you are referring  to the FB III/700.
    My advice is to throw it away. If you insist on wasting more time on it, you might want to read my post on the m0n0wall forums: http://forum.m0n0.ch/index.php/topic,2265.0.html



  • Oooops…my apologies being rough... :'( :'( :'(



  • I have this firebox also, but from the reading, it' doesn't worth the time wasted.

    Dumarjo



  • @dumarjo:

    I have this firebox also, but from the reading, it' doesn't worth the time wasted.

    Dumarjo

    Well, in the meanwhile I install dd-wrt on it, which runs very smooth. I read some other posts on the m0n0 wall forum and they claimed to be able to boot m0n0 wall after patching the ide.c source of the freebsd kernel.

    (from : http://www.nabble.com/Re:-Running-FreeBSD-on-Firebox-III-td15789848.html)
    (see also: http://forum.m0n0.ch/index.php/topic,2265.0.html)

    Hi,

    Yes, I found it, and I'm sure it will help your problem, too.

    I found the difference between the FreeBSD ata driver and the Linux 
    ata driver. It is called the VLB (Vesa Local Bus, maybe) Sync, and 
    seems it's been introduced since the Linux 1.2 kernel. The VLB Sync 
    is a very small routine. Here's the Linux version (2.2.26) (ide.c):

    #if SUPPORT_VLB_SYNC
    /*
      * Some localbus EIDE interfaces require a special access sequence
      * when using 32-bit I/O instructions to transfer data.  We call this
      * the "vlb_sync" sequence, which consists of three successive reads
      * of the sector count register location, with interrupts disabled
      * to ensure that the reads all happen together.
      */
    static inline void do_vlb_sync (ide_ioreg_t port) {
            (void) inb (port);
            (void) inb (port);
            (void) inb (port);
    }
    #endif /* SUPPORT_VLB_SYNC */
    
    So I ported it to FreeBSD 4.11 for the m0n0wall as:
    
    /sys/dev/ata/ata-disk.c:
    
    * Add ad_vlb_sync
    
    static __inline void
    ad_vlb_sync(struct resource *port)
    {
         (void)ATA_INB(port, ATA_SECTOR);
         (void)ATA_INB(port, ATA_SECTOR);
         (void)ATA_INB(port, ATA_SECTOR);
    }
    
    * Modify ad_transfer and ad_interrupt
    
    int
    ad_transfer(struct ad_request *request)
    {
         ...
    
         /* output the data */
         if (adp->device->channel->flags & ATA_USE_16BIT)
             ATA_OUTSW(adp->device->channel->r_io, ATA_DATA,
                      (void *)((uintptr_t)request->data + request->donecount),
                      request->currentsize / sizeof(int16_t));
    -    else
    +    else {
    +        disable_intr();
    +        ad_vlb_sync(adp->device->channel->r_io);
             ATA_OUTSL(adp->device->channel->r_io, ATA_DATA,
                       (void *)((uintptr_t)request->data + request-
     >donecount),
                       request->currentsize / sizeof(int32_t));
    +        enable_intr();
    +    }
    
         ...
    }
    
    int
    ad_interrupt(struct ad_request *request)
    {
         ...
    
             /* ready to receive data? */
             if ((adp->device->channel->status & (ATA_S_READY|ATA_S_DSC|
    ATA_S_DRQ))
                 != (ATA_S_READY|ATA_S_DSC|ATA_S_DRQ))
                 ata_prtdev(adp->device, "read interrupt arrived early");
    
             if (ata_wait(adp->device, (ATA_S_READY | ATA_S_DSC |  
    ATA_S_DRQ)) != 0) {
                 ata_prtdev(adp->device, "read error detected (too) late");
                 request->flags |= ADR_F_ERROR;
             }
             else {
                 /* data ready, read in */
                 if (adp->device->channel->flags & ATA_USE_16BIT)
                     ATA_INSW(adp->device->channel->r_io, ATA_DATA,
                              (void*)((uintptr_t)request->data + request-
     >donecount),
                              request->currentsize / sizeof(int16_t));
      -           else
    +            else {
    +                disable_intr();
    +                ad_vlb_sync(adp->device->channel->r_io);
                     ATA_INSL(adp->device->channel->r_io, ATA_DATA,
                              (void*)((uintptr_t)request->data + request-
     >donecount),
                              request->currentsize / sizeof(int32_t));
    +                enable_intr();
    +            }
             }
         }
    
         ...
    }
    
    

    Next, to get a correct Ether Station Address (MAC Address), make a 
    following change (just commenting out) in the Tulip driver:

    /sys/pci/if_dc.c (/sys/dev/ic/dc.c for OpenBSD):
    
    * Modify dc_attach
    
            /*
             * Get station address from the EEPROM.
             */
            switch(sc->dc_type) {
            case DC_TYPE_98713:
            case DC_TYPE_98713A:
    - case DC_TYPE_987x5:
    + /*case DC_TYPE_987x5:*/
            case DC_TYPE_PNICII:
    
    

    These should help.

    ….

    Unfortunately I don't know a lot of freebsd and was hoping somebody can help me patching this into pfsense ?

    Or can the pfsense development bring out a patch for this ? At least for testing ?



  • The VLB sync patches you are referencing are for FreeBSD 4.x
    The structure of FreeBSD 6 (pfSense 1.2) and 7 (pfSense 1.2.1/1.3) is sufficiently different and the patches will not work. This is why I settled on m0n0wall 1.2 (based on FreeBSD 4) to run on my FireBox III.
    The only way to get the hardware working under modern FreeBSD would be to involve a developer familiar with the ata code, and I'm not sure there is much interest in getting this fixed.
    I saw someone was working on an OpenBSD based m0n0wall fork, but have not tried it. You could check it out here: http://www.thewaffle.org/


Locked