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

    Error on install yet live cd works fine.

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    16 Posts 3 Posters 2.8k 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 Offline
      Wuebit
      last edited by

      @Wuebit:

      @KOM:

      Did you see this when your searched the forums?

      https://forum.pfsense.org/index.php?topic=25112.0

      No I didn't find this one on my (so far 5 hours searching)
      Thanks ill have a look

      Hi I did what jimp said

      dd if=/dev/zero of=/dev/ad0 bs=8k count=16

      fdisk -I ad0

      but the fdisk part gives me this error

      fdisk: invalid fdisk partition table found.

      1 Reply Last reply Reply Quote 0
      • KOMK Offline
        KOM
        last edited by

        If you have existing GPT partitions then you will have to zero out either the entire disk or at least the beginning and end.

        Run fdisk by itself and see your sector count (let's call it sector_count).  It will be shown on a line that looks like this:

        # fdisk
        The data for partition 1 is:
        sysid 165 (0xa5), (FreeBSD/NetBSD/386BSD)
        start 63, size 83875302 (40954 Meg), flag 80 (active)

        size is the same as sector_count

        Now run the dd commands like this:

        dd if=/dev/zero of=/dev/ad0 bs=1M count=2

        dd if=/dev/zero of=/dev/ad0 bs=1M skip=(sector_count - 2)

        To use the fdisk example above, to wipe the end of the disk try:

        dd if=/dev/zero of=/dev/ad0 bs=1M skip=83875300

        1 Reply Last reply Reply Quote 0
        • W Offline
          Wuebit
          last edited by

          @KOM:

          If you have existing GPT partitions then you will have to zero out either the entire disk or at least the beginning and end.

          Run fdisk by itself and see your sector count (let's call it sector_count).  It will be shown on a line that looks like this:

          # fdisk
          The data for partition 1 is:
          sysid 165 (0xa5), (FreeBSD/NetBSD/386BSD)
          start 63, size 83875302 (40954 Meg), flag 80 (active)

          size is the same as sector_count

          Now run the dd commands like this:

          dd if=/dev/zero of=/dev/ad0 bs=1M count=2

          dd if=/dev/zero of=/dev/ad0 bs=1M skip=(sector_count - 2)

          To use the fdisk example above, to wipe the end of the disk try:

          dd if=/dev/zero of=/dev/ad0 bs=1M skip=83875300

          Many many thanks
          I'm stuck on the very first part
          just "fdisk" gives me this
          fdisk: mounted root fs resource doesn't match expectations (regexec returned 1)

          1 Reply Last reply Reply Quote 0
          • KOMK Offline
            KOM
            last edited by

            Well, you can do one of four things:

            • Wipe the entire disk.  This can take some time if the disk is big.

            • Use the gpart command from pfSense Shell to list and remove any GPT partitions

            • Download a partition manager like GParted (http://gparted.org/) and boot from it to wipe your disk

            • Based on the size of your disk, take an educated guess as to how many sectors it has (use my example above where a 40 GB hard disk has 83875302 sectors), and then tailor your dd command to use skip=(guessed_sectors - 2)

            I'd go with #2

            1 Reply Last reply Reply Quote 0
            • W Offline
              Wuebit
              last edited by

              @KOM:

              Well, you can do one of four things:

              • Wipe the entire disk.  This can take some time if the disk is big.

              • Use the gpart command from pfSense Shell to list and remove any GPT partitions

              • Download a partition manager like GParted (http://gparted.org/) and boot from it to wipe your disk

              • Based on the size of your disk, take an educated guess as to how many sectors it has (use my example above where a 40 GB hard disk has 83875302 sectors), and then tailor your dd command to use skip=(guessed_sectors - 2)

              I'd go with #2

              its 320GB (an old laptop hdd)
              I'm mega new to linux based commands so would 2 be hard for me?

              1 Reply Last reply Reply Quote 0
              • W Offline
                Wuebit
                last edited by

                edit that I guess one of them commands worked it installed perfect this time! cheers for all the help!

                1 Reply Last reply Reply Quote 0
                • KOMK Offline
                  KOM
                  last edited by

                  Go to pfSense Shell, run gpart and follow the help to figure out how to list any GPT partitions and remove them.

                  Doing a dd on an entire 320 GB disk will take awhile.

                  You could try the following:

                  dd if=/dev/zero of=/dev/ad0 bs=1M count=2

                  dd if=/dev/zero of=/dev/ad0 bs=1M skip=671002414

                  1 Reply Last reply Reply Quote 0
                  • KOMK Offline
                    KOM
                    last edited by

                    Glad to hear you got it working.

                    1 Reply Last reply Reply Quote 0
                    • W Offline
                      Wuebit
                      last edited by

                      @KOM:

                      Glad to hear you got it working.

                      Thanks for the help KOM next step is to see if I can get a wifi running :) using this router!

                      1 Reply Last reply Reply Quote 0
                      • K Offline
                        kejianshi
                        last edited by

                        So….  I wonder if wiping the drive would help (-;

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