• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Windows Embedded Standard 7 - Lost Bcedit Settings

Scheduled Pinned Locked Moved Unsolved
Windows Problems
3
5
1.1k
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.
  • Z
    zingaro
    last edited by Mar 19, 2018, 2:47 PM

    Hi,
    I noted that after the backup of WES7 image, fog reset the bcdedit settings to default and EWF function of WES7 does not works fine, because after power loss failure the system restarts and Windows show the recover boot menu !
    I noted that after backup a WES7 System with Fog, it’s necessary restore the BCDedit to “IgnoreShhutdownFailures” manually and configure the EWF with ewfcfg.exe command.

    How I can solve this problem ?
    I need tha Fog does not change the BcdEdit when saves the image !
    With other software ( ghost, clonezilla etc… ), it’s necessary insert only EwfCFg.exe command into OneTimeStartup RegKey and EWF it will setted correctly.
    Fog makes a change into BCD Settings !

    Regards

    1 Reply Last reply Reply Quote 0
    • T
      Tom Elliott
      last edited by Mar 20, 2018, 8:00 AM

      Create a post download script. We use a specialized bcd drive to allow for generalized hard drives. Without the custom files it’s possible the system will not boot. We do make a backup of the original bcd file before we put ours in place. The intention of doing this wa so those with specialized BCD’s they could continue using theirs, though you can probably guess this isn’t typically a problem for most people. The post unit script would follow a pseudo code similar of:

      Find hdds
          Loop each hdd
              Find hdd partitions
                  Loop hdd partitions
                      Search partition for bcd
                      If bcd found
                          Backup new/ or remove
                          Copy or move backup to original name
                          Break partition loop
                      End if
                  End partloop
           Endhdd loop
      

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

      1 Reply Last reply Reply Quote 0
      • G
        george1421 Moderator
        last edited by Mar 20, 2018, 8:39 PM

        The pseudo code that Tom discussed is almost realized in this excerpt from a script to locate the windows partition.

        #!/bin/bash
        . /usr/share/fog/lib/funcs.sh
        [[ -z $postdownpath ]] && postdownpath="/images/postdownloadscripts/"
        case $osid in
            5|6|7|9)
                clear
                [[ ! -d /ntfs ]] && mkdir -p /ntfs
                getHardDisk
                if [[ -z $hd ]]; then
                    handleError "Could not find hdd to use"
                fi
                getPartitions $hd
                for part in $parts; do
                    umount /ntfs >/dev/null 2>&1
                    fsTypeSetting "$part"
                    case $fstype in
                        ntfs)
                            dots "Testing partition $part"
                            ntfs-3g -o force,rw $part /ntfs
                            ntfsstatus="$?"
                            if [[ ! $ntfsstatus -eq 0 ]]; then
                                echo "Skipped"
                                continue
                            fi
                            if [[ ! -d /ntfs/windows && ! -d /ntfs/Windows && ! -d /ntfs/WINDOWS ]]; then
                                echo "Not found"
                                umount /ntfs >/dev/null 2>&1
                                continue
                            fi
                            echo "Success"
                            break
                            ;;
                        *)
                            echo " * Partition $part not NTFS filesystem"
                            ;;
                    esac
                done
                if [[ ! $ntfsstatus -eq 0 ]]; then
                    echo "Failed"
                    debugPause
                    handleError "Failed to mount $part ($0)\n    Args: $*"
                fi
                echo "Done"
                debugPause
                . ${postdownpath}fog.copydrivers
                # . ${postdownpath}fog.updateunattend
                umount /ntfs
                ;;
            *)
                echo "Non-Windows Deployment"
                debugPause
                return
                ;;
        esac
        

        More specifically you should focus on this section where it tests to see if the Windows directory exists on the partition. Just finish it up with the remainder of the logic that Tom posted.

                            if [[ ! -d /ntfs/windows && ! -d /ntfs/Windows && ! -d /ntfs/WINDOWS ]]; then
                                echo "Not found"
                                umount /ntfs >/dev/null 2>&1
                                continue
                            fi
        

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        1 Reply Last reply Reply Quote 1
        • Z
          zingaro
          last edited by Mar 23, 2018, 8:31 AM

          @tom-elliott said in Windows Embedded Standard 7 - Lost Bcedit Settings:

          Create a post download script.

          OK,
          but in this case is not sufficient " export " and "import "the BCD Configuration ? "
          https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/bcdedit-command-line-options ?

          T 1 Reply Last reply Mar 23, 2018, 8:46 AM Reply Quote 0
          • T
            Tom Elliott @zingaro
            last edited by Mar 23, 2018, 8:46 AM

            @zingaro why? We take a backup then put ours in place. We can’t use bcdedit in Linux as those are Windows tools.

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              4/5
              Last post

            157

            Online

            12.0k

            Users

            17.3k

            Topics

            155.2k

            Posts
            Copyright © 2012-2024 FOG Project