由於 gui-actions.sh 中的替換錯誤,引導修復失敗

由於 gui-actions.sh 中的替換錯誤,引導修復失敗

我的 GRUB 設定搞砸了,我正在嘗試boot-repair與 Ubuntu 20.04 的即時版本一起使用。

我遇到了以前從未見過的錯誤,並且無法找出修復它的正確方法。谷歌搜尋確切的錯誤或「啟動修復錯誤替換問題」不會傳回任何boot-repair相關內容。

運行建議修復或進階修復後,我bad substitution在日誌檔案中收到錯誤,並且啟動修復掛起(進度條永遠運行)。

...
[email protected]()
SET@_progressbar1.pulse()
SET@_label0.set_text('''Applying changes. This may require several minutes...''')
SET@_progressbar1.pulse()
SET@_progressbar1.pulse()
SET@_progressbar1.pulse()
The settings chosen by the user will purge (in order to unsign) and reinstall the grub-efi of
nvme0n1p5,
using the following options:  disable-internet-check nvme0n1p1/boot/efi
Additional repair will be performed:  unhide-bootmenu-10s use-standard-efi-file rename-ms-efi


/usr/share/boot-sav/gui-actions.sh: line 234: ${LISTOFPARTITIONS[$PARTTOUNFLAG}: bad substitution
SET@_progressbar1.pulse()
SET@_progressbar1.pulse()
SET@_progressbar1.pulse()
SET@_progressbar1.pulse()
...
boot-repair basically hangs indefinitely after this

腳本gui-action.sh第 234 行看起來像

PARTB=${LISTOFPARTITIONS[$PARTTOUNFLAG} #sdXY

這是引導修復的已知問題嗎?

我很好奇這可能是因為我使用的是 nvme 驅動器,並且 nvme 驅動器被標記為/dev/nvme0nXY而不是/dev/sdXY。但我希望我不是第一個嘗試在 nvme 驅動器上使用引導修復的人。

答案1

我遇到了同樣的問題,並且能夠透過將提到的行(第/usr/share/boot-sav/gui-actions.sh234 行)更改為以下內容來修復它:

PARTB=${LISTOFPARTITIONS[$PARTTOUNFLAG]} #sdXY

“]”不見了。

相關內容