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

    How take out configuration file from corrupted disk ?

    Scheduled Pinned Locked Moved General pfSense Questions
    diskfailedconfigbackuprestore
    5 Posts 3 Posters 1.1k 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.
    • Sergei_ShablovskyS
      Sergei_Shablovsky
      last edited by

      Hi pfSense Gurus!

      Please help to take out configuration file from corrupted FW's disk.

      The error we have

      (ada0:ata2:0:1:0): READ_DMA. ACB: c8 00 4f 9d 13 40 00 00 00 00 80 00
      (ada0:ata2:0:1:0): CAM status: ATA Status Error
      (ada0:ata2:0:1:0): ATA status: 51 (DRDY SERV ERR), error: 40 (UNC )
      (ada0:ata2:0:1:0): RES: 51 40 90 9d 13 00 00 00 00 2f 00
      (ada0:ata2:0:1:0): Retrying command
      (ada0:ata2:0:1:0): READ_DMA. ACB: c8 00 4f 9d 13 40 00 00 00 00 80 00
      (ada0:ata2:0:1:0): CAM status: ATA Status Error
      (ada0:ata2:0:1:0): ATA status: 51 (DRDY SERV ERR), error: 40 (UNC )
      (ada0:ata2:0:1:0): RES: 51 40 90 9d 13 00 00 00 00 2f 00
      (ada0:ata2:0:1:0): Retrying command
      (ada0:ata2:0:1:0): READ_DMA. ACB: c8 00 4f 9d 13 40 00 00 00 00 80 00
      (ada0:ata2:0:1:0): CAM status: ATA Status Error
      (ada0:ata2:0:1:0): ATA status: 51 (DRDY SERV ERR), error: 40 (UNC )
      (ada0:ata2:0:1:0): RES: 51 40 90 9d 13 00 00 00 00 2f 00
      (ada0:ata2:0:1:0): Retrying command
      (ada0:ata2:0:1:0): READ_DMA. ACB: c8 00 4f 9d 13 40 00 00 00 00 80 00
      (ada0:ata2:0:1:0): CAM status: ATA Status Error
      (ada0:ata2:0:1:0): ATA status: 51 (DRDY SERV ERR), error: 40 (UNC )
      (ada0:ata2:0:1:0): RES: 51 40 90 9d 13 00 00 00 00 2f 00
      (ada0:ata2:0:1:0): Retrying command
      (ada0:ata2:0:1:0): READ_DMA. ACB: c8 00 4f 9d 13 40 00 00 00 00 80 00
      (ada0:ata2:0:1:0): CAM status: ATA Status Error
      (ada0:ata2:0:1:0): ATA status: 51 (DRDY SERV ERR), error: 40 (UNC )
      (ada0:ata2:0:1:0): RES: 51 40 90 9d 13 00 00 00 00 2f 00
      (ada0:ata2:0:1:0): Error 5, Retries exhausted
      

      And we use

      fsck -fy /
      

      7 or even 10 times, but results are still not good

      THE FOLLOWING DISK SECTORS COULD NOT BE READ: 1285441, 1285442, 1285443, 1285444, 1285445, 1285446, 1285447, 1285448,
      ** Phase 2 - Check Pathnames
      ** Phase 3 - Check Connectivity
      ** Phase 4 - Check Reference Counts
      ** Phase 5 - Check Cyl groups
      23874 files, 269701 used, 73385717 free (1525 frags, 9173024 blocks, 0.0% fragmentation)
      

      So, now the goal are take configuration file from pre-failed disk, than change disk to new one, reinstall pfSense and rollup the configuration.

      The /cf/conf/config.xml exist and look good.

      Any suggestion how to make this from console?
      Or the good way would be take disk from machine, manually copying files by using external hdd case and job done ?

      Thank You!

      —
      CLOSE SKY FOR UKRAINE https://youtu.be/_tU1i8VAdCo !
      Help Ukraine to resist, save civilians people’s lives !
      (Take an active part in public protests, push on Your country’s politics, congressmans, mass media, leaders of opinion.)

      1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan
        last edited by Gertjan

        Hi,

        If fsk can't help you, you have to apply the classic measures : disk recovery.
        It starts with : using dedicated programs.
        It ends with : have the job done by a specialized company (dono what they could do if it is an SSD).

        Also : when yo install pfSense, you were asked to activated the auto config backup. This means that on a Netgate server the latest copy this file exists. What about obtaining this copy ?
        Read more about it in the manual.

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        Sergei_ShablovskyS 1 Reply Last reply Reply Quote 1
        • kiokomanK
          kiokoman LAYER 8
          last edited by

          from console if you are able to get there, mount a usb stick and copy the file ?

          ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
          Please do not use chat/PM to ask for help
          we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
          Don't forget to Upvote with the 👍 button for any post you find to be helpful.

          Sergei_ShablovskyS 1 Reply Last reply Reply Quote 0
          • Sergei_ShablovskyS
            Sergei_Shablovsky @Gertjan
            last edited by Sergei_Shablovsky

            @Gertjan said in How take out configuration file from corrupted disk ?:

            Hi,

            If fsk can't help you, you have to apply the classic measures : disk recovery.
            It starts with : using dedicated programs.
            It ends with : have the job done by a specialized company (dono what they could do if it is an SSD).

            Thank You for suggestion. This is ada0 (I mean SATA HDD).

            Also : when yo install pfSense, you were asked to activated the auto config backup. This means that on a Netgate server the latest copy this file exists. What about obtaining this copy ?

            This was a test pfsense server in a LAB environment and we have old backup, but after last backup a lot of important settings was made. I just try to save time and not doing the job twice :)

            —
            CLOSE SKY FOR UKRAINE https://youtu.be/_tU1i8VAdCo !
            Help Ukraine to resist, save civilians people’s lives !
            (Take an active part in public protests, push on Your country’s politics, congressmans, mass media, leaders of opinion.)

            1 Reply Last reply Reply Quote 0
            • Sergei_ShablovskyS
              Sergei_Shablovsky @kiokoman
              last edited by

              @kiokoman said in How take out configuration file from corrupted disk ?:

              from console if you are able to get there, mount a usb stick and copy the file ?
              Thank You for help!

              This is the first tough that come in to my head after I push "Post" button in this forum :)

              —
              CLOSE SKY FOR UKRAINE https://youtu.be/_tU1i8VAdCo !
              Help Ukraine to resist, save civilians people’s lives !
              (Take an active part in public protests, push on Your country’s politics, congressmans, mass media, leaders of opinion.)

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