Skip to content

Error when trying to use #1

Description

@Krutonium

I'm trying to make a tool to create Windows2Go drives on Linux, and the bootloader is the last piece of the puzzle.

I am trying to make use of your tool to update a BCD store, and it keeps crashing out.

✖ >>  sudo ./fix_boot_bcd.py /run/media/krutonium/902E-6773/EFI/Microsoft/Boot/BCD
Entry {135bd343-5e22-11f0-a414-806e6f6e6963}: "UEFI: SanDisk"
 Disk  IDs: ['17b16537-abcc-4487-9792-e63a0a7dc8b4', '60664987-ce0e-411b-9db7-86248b86bbb2']
  Partition UUID needs fixing!
  Disks:
   sdb      : 2be81394-5cc0-4c98-a008-f24838a4b0db
   sdc      : dea8fc8b-416a-43d3-a7ee-874ec54e23cc
  Partitions:
   sdc1       : 128M   EFI System              : c2ee9796-096b-40c9-91cd-1def6b02b2c0
   sdb1       : 1000M  EFI System              : 39824ecc-302c-47bf-b510-76b14c8b78de
   sdc2       : 447G   Microsoft basic data    : a38fb2c7-4249-42ea-b00e-6245115bd3af
   sdb2       : 456.8G Linux filesystem        : a8311a7e-823e-49f9-9f71-11474a2c35b3
   sdb3       : 8G     Linux filesystem        : 90f5313e-cc22-448e-9fcd-d912192f5994
  Partition (DevName or PartUUID or PartUUID,DiskUUID): /dev/sdc2,a38fb2c7-4249-42ea-b00e-6245115bd3af
  Partition (DevName or PartUUID or PartUUID,DiskUUID): dea8fc8b-416a-43d3-a7ee-874ec54e23cc
  Partition (DevName or PartUUID or PartUUID,DiskUUID): dea8fc8b-416a-43d3-a7ee-874ec54e23cc,a38fb2c7-4249-42ea-b00e-6245115bd3af
Entry {135bd344-5e22-11f0-a414-806e6f6e6963}: "UEFI: (NTFS)Lexar USB Flash Drive 8.07"
Traceback (most recent call last):
  File "/home/krutonium/Fix_BCD/./fix_boot_bcd.py", line 331, in <module>
    sys.exit(main(sys.argv))
             ^^^^^^^^^^^^^^
  File "/home/krutonium/Fix_BCD/./fix_boot_bcd.py", line 317, in main
    fixes, unfixed = list_and_correct_entries(bcd, ovwr_list)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/krutonium/Fix_BCD/./fix_boot_bcd.py", line 243, in list_and_correct_entries
    ids, offs = find_part_disk(elms[key]['Element'])
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/krutonium/Fix_BCD/./fix_boot_bcd.py", line 151, in find_part_disk
    while hexarr[idx] == 0:
          ~~~~~~^^^^^
IndexError: list index out of range

Any idea what's going on?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions