Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Can't load kernel: Fit-PC

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    28 Posts 4 Posters 16.2k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wallabybob
      last edited by

      Sorry to have taken so long to get back to this. This section boots off the USB drive to which pfSense was previously installed.

      Plug that USB drive into the Fit PC. If necessary adjust the BIOS to boot from the USB drive. Boot the Fit PC. At the pfSense Console Setup menu select option 1 to setup the FitPC interfaces the way you want them, select option 2 to set a LAN address then, if you haven't already done so, connect your Fit PC to the LAN and record the details of how to connect to the pfSense web server as described in the console output which appers after you setup the LAN address.

      Back at the pfSense Console Setup menus select option 8 (Shell command).

      Type

      lmount

      and you should see something like

      mount

      /dev/da0s1a on / (ufs, local)
      devfs on /dev (devfs, local)
      /dev/md0 on /var/run (ufs, local)
      devfs on /var/dhcpd/dev (devfs, local)

      which confirms the boot device is /dev/da0. This will be the source device for the copy onto the hard drive.

      Type

      ls /dev/ad*

      and you should see something like

      $ ls /dev/ad*
      /dev/ad0

      Depending on what was done to the hard drive (such as what OS was put there)  you may see additional lines like

      /dev/ad0s1
      /dev/ad0s2
      /dev/ad0s3

      This confirms the hard drive is /dev/ad0. This will be the destination device for the copy of the pfSense installation onto the hard drive.

      Type

      dd if=/dev/da0 of=/dev/ad0

      where if= specifies the source file (USB drive) for the copy and of= specifies the destination file (hard drive) for the copy. This command will do a sector by sector copy from the USB drive to the hard drive copying the disk partition table, boot loader, file system data and files to the hard drive. This will take a few minutes (depending on the size and speed of the USB drive and speed of hard drive) to report back. When it completes you should see something like:

      dd if-/dev/da1 of=/dev/ad0

      1981728+0 records in
      1981728+0 records out
      1014644736 bytes transferred in 2079.044532 secs (488034 bytes/sec)

      You can (optionally) considerably speed up the transfer by copying multipe sectors at a time by appending bs=16384 to the dd command above.

      The last remaining thing to do is to edit a system file so that FreeBSD knows the swap area and file systems are now on the hard drive (ad0) rather than the the USB drive (da0). But you want to change the file on the hard drive, not the file on the USB stick so give the command

      mount /dev/ad0s1a /mnt

      which will make the hard drive's file system visible at /mnt in the directory tree. The easiest way to edit the file is through the web GUI so follow the previously recorded instructions for connecting to the pfSense box. The configuration wizard will start. You can follow that through (though it will configure to your USB stick, not the hard drive) then from the Diagnostics menu click on Edit File. In the Save/Load from Path: box type /mnt/etc/fstab, click the Load button and you should see something like

      Device                Mountpoint      FStype  Options       Dump    Pass#

      /dev/da0s1a          /                ufs    rw             1          1
      /dev/da0s1b          none              swap    sw              0          0

      On the second and third lines change da0 to ad0 then click the Save button.

      On the Diagnostics menu click on Halt system. When the system has halted, remove the USB drive, restart, (if necessary) adjust the BIOS to boot from the hard drive and boot.

      1 Reply Last reply Reply Quote 0
      • S
        sustech
        last edited by

        Thanks wallabybob,

        I got my usb drive today and will attempt your method over the weekend.

        1 Reply Last reply Reply Quote 0
        • S
          sustech
          last edited by

          Tried it. First section OK, loaded onto usb stick.
          Can't get fit-pc to boot off it though, error 170 lba0.

          I will try the first section again, but it don't look good if I can't boot off the usb port.

          Should I be trying the 1.2 or the rc 1.2.1?

          1 Reply Last reply Reply Quote 0
          • S
            sustech
            last edited by

            Sorted out the first problem, don't use a pc who's power supply is on the way out.
            Finally made bootable usb stick.
            Fit-pc boots off it, but runs into problems while it is going through the starting bits.

            ad0: FAILURE - READ_DMA timed out LBA=117210223
            ad0: TIMEOUT - READ_DMA retrying (1 retry left) LBA=117210223

            It does this for the above LBA for a couple more times then changes that value to 128, then 16, 0, 512, 64 then I gave up.

            Any ideas?

            Using RC 1.2.1.

            Smoothwall is looking fairly good at the moment.

            1 Reply Last reply Reply Quote 0
            • W
              wallabybob
              last edited by

              Try booting in "safe mode" (option 3). This is an easy way to boot without DMA enabled on the hard drive. If you can get past that then a system file can get tweaked to routinely disable DMA on boot.

              1 Reply Last reply Reply Quote 0
              • S
                sustech
                last edited by

                I don't get any options to choose from. Only F1 FreeBSD.

                How do you get the options. I have tried googling but have come up with nothing.

                1 Reply Last reply Reply Quote 0
                • W
                  wallabybob
                  last edited by

                  OK, forget option 3 for now.

                  In the startup you should see

                  FreeBSD/i386 bootstrap loader, revision 1.1

                  then a few more lines then

                  Hit [Enter] to boot immediately, or any other key for command prompt

                  then hit a key (other than enter) to get the command prompt. You'll see a couple more lines of output then

                  Type ? for a list of commands, 'help' for more detailed help
                  OK

                  then type

                  set hw.ata.ata_dma="0"

                  which will tell the ATA driver to not use DMA mode then type the command

                  boot

                  to boot the default kernel.

                  If this gets the default kernel started and you complete configuration then you should edit /boot/loader.conf to include the line

                  hw.ata.ata_dma="0"

                  so you don't have to keep typing that at boot time.

                  1 Reply Last reply Reply Quote 0
                  • S
                    sustech
                    last edited by

                    Naaaaaaa, not this time.

                    panic no init
                    cpuid=0
                    Uptime=6s
                    Cannot dump no dump device defined.

                    Then reboots.

                    It also gives a couple of GEOM errors for ad0, something about boundries???

                    1 Reply Last reply Reply Quote 0
                    • W
                      wallabybob
                      last edited by

                      You are still having trouble booting off the USB stick? If you are booting off the hard drive did you change /etc/fstab for the change in device name of the root file system and swap space (da - > ad)?

                      What is on the hard drive now?

                      1 Reply Last reply Reply Quote 0
                      • S
                        sustech
                        last edited by

                        Sorry, still problems booting off USB stick. Haven't got as far as booting off hard drive. (so no pfsense files copied accross yet)

                        1 Reply Last reply Reply Quote 0
                        • W
                          wallabybob
                          last edited by

                          Sunday I was looking at the Fit PC home page again and saw it supposedly comes with Ubuntu and Gentoo on the hard drive. Do you still have one or both of them? Whats the boot loader?

                          1 Reply Last reply Reply Quote 0
                          • S
                            sustech
                            last edited by

                            Had both on it with dual boot. Lost them when I tried Smoothwall, can't remember what the boot loader was.

                            1 Reply Last reply Reply Quote 0
                            • W
                              wallabybob
                              last edited by

                              Do you have access to a Linux "Live CD"  - a CD setup with Linux in such a way that it can run entirely from the CD? You could boot that and then do a block copy of the USB drive to the hard drive, then try booting off the hard drive.

                              Maybe a suitable CD came with your system. If not, the "System Rescue CD" which can be downloaded from http://www.sysresccd.org/Main_Page should do the job. Quote a number of common Linux distribution CDs can operate as a Live CD which would be fine if you already have one but a rather bloated download if you just want a live CD.

                              Once you get into linux with the command prompt showing the hard drive is probably /dev/hda and the USB drive is probably /dev/sda and you would do a block copy by the command

                              dd if=/dev/sda of=/dev/hda bs=16384

                              The bs=16384 option speeds up the copy by copying multiple blocks at a time.

                              There is a FreeBSD Live CD available but I'm not suggesting you use it because you are having trouble with the FreeBSD boot loaders on your systems.

                              1 Reply Last reply Reply Quote 0
                              • S
                                sustech
                                last edited by

                                Can get rescue cd to work. Tried your command, without the # seems to get further. Says drive is full. Do I need to empty the hard drive first? Don't forget it has smoothwall installed.

                                In Gparted the usb stick is shown as /dev/sdb1 and has an unknown file system on it. It is flagged as boot. Could this be my problem all along, the usb stick not being formatted properly?

                                1 Reply Last reply Reply Quote 0
                                • W
                                  wallabybob
                                  last edited by

                                  @sustech:

                                  Can get rescue cd to work. Tried your command, without the # seems to get further. Says drive is full. Do I need to empty the hard drive first? Don't forget it has smoothwall installed.

                                  In Gparted the usb stick is shown as /dev/sdb1 and has an unknown file system on it. It is flagged as boot. Could this be my problem all along, the usb stick not being formatted properly?

                                  The dd command shouldn't say the hard drive is full because the hard drive is larger than the USB stick. Exactly what dd command did you type? Given that the USB stick apparently is /dev/sdb, the dd command should have been something like:

                                  dd if=/dev/sdb of=/dev/hda bs=16384

                                  If the if parameter had been something like if=/dev/sdb1 it would have meant something rather different, which unfortunately I don't have time to explain now. The dd command should not have any digits in either the if or of parameters.

                                  The USB stick has FreeBSD UFS (Unix File System) which is not understood by many Linux utilities. That may be the reason Gparted reports "unknown file system".

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    sustech
                                    last edited by

                                    Thanks very much for your help wallabybob, but I am going to have to cut my losses as it were and stick with the Smoothwall.

                                    Maybe when I have learned a little more about linux (or when freebsd recognises the fit-pc) I will have another go.

                                    Cheers.

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post
                                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.