Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 9 May 2019 14:38:17 +0100
From:      Pete French <petefrench@ingresso.co.uk>
To:        freebsd-stable@freebsd.org
Subject:   Re: ZFS...
Message-ID:  <27cb15ac-eee8-1cbc-a15f-b2f0746b07c5@ingresso.co.uk>
In-Reply-To: <7b7b9165-8f83-5195-2e4a-4c0e7c85307d@quip.cz>
References:  <30506b3d-64fb-b327-94ae-d9da522f3a48@sorbs.net> <CAOtMX2gf3AZr1-QOX_6yYQoqE-H%2B8MjOWc=eK1tcwt5M3dCzdw@mail.gmail.com> <56833732-2945-4BD3-95A6-7AF55AB87674@sorbs.net> <3d0f6436-f3d7-6fee-ed81-a24d44223f2f@netfence.it> <17B373DA-4AFC-4D25-B776-0D0DED98B320@sorbs.net> <70fac2fe3f23f85dd442d93ffea368e1@ultra-secure.de> <70C87D93-D1F9-458E-9723-19F9777E6F12@sorbs.net> <CAGMYy3tYqvrKgk2c==WTwrH03uTN1xQifPRNxXccMsRE1spaRA@mail.gmail.com> <fe6880bc-d40a-2377-6bea-28bfd8229e9f@sorbs.net> <58DA896C-5312-47BC-8887-7680941A9AF2@sarenet.es> <cde21bb4-d741-3300-077f-745cfc343aa9@ingresso.co.uk> <8a53df38-a094-b14f-9b7d-8def8ce42491@quip.cz> <30d1cf2a-b80c-822b-11f9-2139532f7858@ingresso.co.uk> <7b7b9165-8f83-5195-2e4a-4c0e7c85307d@quip.cz>

next in thread | previous in thread | raw e-mail | index | archive | help


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 :-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?27cb15ac-eee8-1cbc-a15f-b2f0746b07c5>