On 09/05/2019 00:17, Miroslav Lachman wrote:

Time for some scripting :) This is what I have on the machine with weird controller

# cat bin/zfs_bootcode_update.sh
#!/bin/sh

devs="ada0 ada1 ada2 ada3"

for dev in $devs
do
         echo -n "Updating ZFS bootcode on ${dev} ..."
        if ! /sbin/gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${dev} > /dev/null; then
                 echo " error"
                 exit 1
         fi
         echo " done"
done

heh....

pete@skerry ~]$ cat /root/update_boot_blocks
#!/bin/sh
for DRIVE in ada0 ada1
do
        /sbin/gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${DRIVE}
done


You bother to check for errors, I dont :-)
_______________________________________________
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"

Reply via email to