BASH script utility to setup the Boot Configuration Data store and system files for the Windows Boot Manager (WBM) from a Linux or macOS environment. This can be used to add boot files after applying a Windows image with the wimlib tools, configure the computer to boot from a virtual hard disk (VHDX) file, add a Windows installation to the current boot menu or recreate a system partition that has been corrupted or formatted. Similar to the bcdboot utility.
Example 1: Copy boot files then create BCD store for a physical Windows installation.
Example 2: Copy boot files then create BCD store for a Windows installation on a virtual hard disk.
bcd-sys --help
bcd-sys /media/user/mountpoint
bcd-sys /media/user/mountpoint/images/windows.vhdx
bcd-sys /media/user/mountpoint -s /media/user/volname
bcd-sys -f both /media/user/mountpoint
bcd-sys -e /media/user/mountpoint
bcd-sys /media/user/mountpoint -n Windows\ 11\ Professional
bcd-sys -l en-us /media/user/mountpoint
bcd-sys -c /media/user/mountpoint
Download from Releases or clone the repository.
git clone https://github.com/jpz4085/bcd-sys.git
Enter the folder for your platform and run for temporary usage.
cd $(uname)
./bcdsys.sh /media/user/mountpoint
Install or uninstall using the setup script if desired.
./setup.sh install | uninstall
BCD-SYS has the following features and differences compared to bcdboot:
- Global objects and settings remain unchanged when modifiying an existing BCD.
- Any existing osloader objects for a Windows volume are replaced and not merged.
- The system BCD-Template is ignored and a Windows10/11 equivalent is used.
- The clean option will delete the existing configuration and create entries in new stores.
- The boot files will be copied by default to a system partition on the Windows device, the
current root device, or the first disk listed by the system if different from the previous. - When specifying a virtual hard disk the script will present a list of partitions contained
in the file. Enter the device name of the volume which contains the Windows image. - The position of the WBM entry in the UEFI boot order will be preserved when updating
an existing BCD. A new entry will only be created if missing or creating new stores. - The description can be specified when creating a new Windows entry.
Common Packages: hivexsh and hivexregedit, (readpe - PE Utils1) pev/peres
Linux Packages: attr/setfattr and fatattr, VHDX Support: qemu-utils and NBD client module.2
macOS Packages: bash (above version 3.2), mtools, bootoption3, signmbr4 and NTFS write support.56
Footnotes
-
Download and build from source when necessary. ↩
-
These are optional if only working with physical disks. ↩
-
This is optional and only tested on Hackintosh and VirtualBox. ↩
-
Create a Windows Disk Signature on MBR media before running the script. ↩
-
The script supports NTFS-3G as well as the commercial Tuxera and Paragon products. ↩
-
This is optional if not writing to any NTFS partitions (including system) from macOS. ↩
-
This is optional and not required if only using UEFI. ↩