mirror of
https://github.com/truenas/core-build.git
synced 2026-02-15 07:36:18 +00:00
Fix BIOS bootcode upgrades
The post-upgrade script failed to stamp bootcode for legacy BIOS systems due to a mistyped command. Ticket: #79455
This commit is contained in:
@@ -43,7 +43,7 @@ post-upgrade =
|
||||
if [ -c /dev/null ]; then
|
||||
for disk in $(sysctl -n kern.disks); do
|
||||
if gpart show ${disk} | grep -q freebsd-boot; then
|
||||
gpart bootcode bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 /dev/${disk}
|
||||
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 /dev/${disk}
|
||||
elif sysctl -n machdep.bootmethod | fgrep -q "EFI" && gpart show ${disk} | grep -q efi; then
|
||||
if mount -t msdosfs /dev/${disk}p1 /boot/efi; then
|
||||
cp /boot/boot1.efi /boot/efi/efi/boot/BOOTx64.efi
|
||||
|
||||
@@ -43,7 +43,7 @@ post-upgrade =
|
||||
if [ -c /dev/null ]; then
|
||||
for disk in $(sysctl -n kern.disks); do
|
||||
if gpart show ${disk} | grep -q freebsd-boot; then
|
||||
gpart bootcode bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 /dev/${disk}
|
||||
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 /dev/${disk}
|
||||
elif sysctl -n machdep.bootmethod | fgrep -q "EFI" && gpart show ${disk} | grep -q efi; then
|
||||
if mount -t msdosfs /dev/${disk}p1 /boot/efi; then
|
||||
cp /boot/boot1.efi /boot/efi/efi/boot/BOOTx64.efi
|
||||
|
||||
Reference in New Issue
Block a user