Wubi 安装失败,因为“未找到子字符串”

Wubi 安装失败,因为“未找到子字符串”

每次我尝试安装 Wubi 时,都会出现缺少子字符串的情况

安装日志的最后部分总是显示相同的内容“未找到子字符串”。

有什么想法吗?

wubi-12.04.3-rev279 的最后一部分:

10-07 20:52 DEBUG  WindowsBackend: total size=30000
  root=29744
  swap=256
  home=0
  usr=0
10-07 20:52 DEBUG  TaskList: ## Finished choose_disk_sizes
10-07 20:52 DEBUG  TaskList: ## Running expand_diskimage...
10-07 20:53 DEBUG  TaskList: ## Finished expand_diskimage
10-07 20:53 DEBUG  TaskList: ## Running create_swap_diskimage...
10-07 20:53 DEBUG  TaskList: ## Finished create_swap_diskimage
10-07 20:53 DEBUG  TaskList: ## Running modify_bootloader...
10-07 20:53 DEBUG  TaskList: New task modify_bcd
10-07 20:53 DEBUG  TaskList: ### Running modify_bcd...
10-07 20:53 DEBUG  WindowsBackend: modify_bcd Drive(C: hd 785689.058594 mb free ntfs)
10-07 20:53 ERROR  TaskList: substring not found
Traceback (most recent call last):
  File "\lib\wubi\backends\common\tasklist.py", line 197, in __call__
  File "\lib\wubi\backends\win32\backend.py", line 695, in modify_bcd
ValueError: substring not found
10-07 20:53 DEBUG  TaskList: # Cancelling tasklist
10-07 20:53 DEBUG  TaskList: New task modify_bcd
10-07 20:53 ERROR  root: substring not found
Traceback (most recent call last):
  File "\lib\wubi\application.py", line 58, in run
  File "\lib\wubi\application.py", line 132, in select_task
  File "\lib\wubi\application.py", line 158, in run_installer
  File "\lib\wubi\backends\common\tasklist.py", line 197, in __call__
  File "\lib\wubi\backends\win32\backend.py", line 695, in modify_bcd
ValueError: substring not found
10-07 20:53 DEBUG  TaskList: New task modify_bcd
10-07 20:53 DEBUG  TaskList: ## Finished modify_bootloader
10-07 20:53 DEBUG  TaskList: # Finished tasklist

答案1

这是失败(参考):

command = [bcdedit, '/create', '/d', '%s' % self.info.distro.name, '/application', 'bootsector']
id = run_command(command)
id = id[id.index('{'):id.index('}')+1]

因此基本上它正在运行以下命令:

bcdedit /create /d Ubuntu /application bootsector

它应该向 Ubuntu 的 Windows 启动管理器(BCD 存储)添加一个条目,并返回包含该条目的 GUID 的响应,例如

{2e05fa55-5f6e-11e2-a7cc-95d88d2d9736}

但命令似乎失败了。第三行是输出该错误的行ValueError: substring not found

因此,我首先要探究为什么无法向 BCD 存储添加条目。

相关内容