Tag Archives: upgrade

Update FreeBSD to 14.0, Update zpool, and can’t boot…how to fix?

As FreeBSD 13.2 is EOF and FreeBSD 14.0 is released, so I think it’s time to update my server to FreeBSD 14.

So I updated the server as what I did before.

freebsd-update -r 14.0-RELEASE upgrade
freebsd-update install
shutdown -r now
freebsd-update install

And when I also noticed that FreeBSD 14 updated zpool verson and introduce some new features, so I also updated zpool as well.

zpool upgrade zroot

And also updated bootcode on all disks, this is very important.

gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0
...
gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da7

And the final step is to reboot the server to finish upgrade.

Then, server can’t boot. I got below error.

And gpart can find all disks and partition.

What’s happening? I updated bootcode why I still get this error?

And then I did some research, and found that in FreeBSD 14 release note, it’s mentioned

There have been a number of improvements in the boot loaders, and upgrading the boot loader on the boot partition is recommended in most cases, in particular if the system boots via EFI. If the root is on a ZFS file system, updating the boot loader is mandatory if the pool is to be upgraded, and the boot loader update must be done first. Note that ZFS pool upgrades are not recommended for root file systems in most cases, but updating the boot loader can avoid making the system unbootable if the pool is upgraded in the future. The bootstrap update procedure depends on the boot method (EFI or BIOS), and also on the disk partitioning scheme. The next several sections address each in turn.

Well, this is something new in FreeBSD 14, and I didn’t update EFI boot file and that’s why I’m facing this issue.

So, spend some time to fix the boot issue.

First, I tried to change bios from BIOS to UEFI, to see if I can boot the server via BIOS. But unfortunately, it’s not working, and got below error.

So, the only choice is to boot the server with liveCD and fix it.

Select 1, boot installer here. Do not select 2 single mode as single mode is readonly.

Select liveCD

Type root to login, no password is needed.

And then you can mount your zpool via below command (Actually this is not needed if you only need to fix the boot issue)

zpool import -f -R /tmp/zroot zroot

Keep in mind here the only writable folder is /tmp, so you must mount your zpool here.

Determined the location of the boot loader via below command:

efibootmgr -v.

The one with + is the one in use, in below screen shot as I boot from virtual CD so it’s marked as USB.

The one on local disk is mfisyspd0p1

Mount the ESP partition via below command:

mount_msdosfs /dev/mfisyspd0p1 /boot/efi

And then run below files to copy the EFI boot loaders from CD to local disk.


cp /boot/loader.efi /mnt/efi/freebsd/loader.efi
cp /boot/loader.efi /mnt/efi/boot/bootx86.efi

Then reboot,

Then I got an error complaint UEFI is broken.

Then tried to boot into livecd and copy the files again, then reboot.

This time no error, just complaint not able to boot.

So what’s happening?

I remember when I copied the EFI loader, there are some errors from the HBA card.

Then I checked the sha256 of the loader.efi on CD and on local disk, looks like the loader on local disk is corrupted.

This is a known issue for several years. The default drive in FreeBSD is not working properly with mfi driver (I’m using dell h330). So the fix is

Option 1, when you use livecd to boot, select 3 and enter below command to load the right mrsas driver:

set hw.mfi.mrsas_enable="1"

boot

 

Option 2, keeps copy the file to hard disk, and then use command sync to force OS to write data to disk.  And then check the sha256 of the file. Due to the default driver is not stable, I tried about 10 times, finally got the loader.efi copied to the right position.

Then reboot. This time server can boot successfully, but it booted into single mode.

That’s because we replace the file via livecd, so just run fsck to fix it

fsck /dev/da0p1

Then reboot, all good now.

 

Upgrade to Windows 10 20H1 (2004) BSOD

Today when I tried to upgrade my windows 10 1909 to windows 10 20H1, I got multiple BSOD.
Based on the information on the BSOD screen, the BSOD were caused by some drivers (aksdf.sys, hardlock.sys, aksfridge.sys)

bsod 1

bsod 2)

After investigation, looks like all these drivers were Sentinel Data Filter Device Driver/Aladdin HASP Data Filter Device Driver, Which provided by Safenet.
I have no idea how these driver got installed into my computer, and I can’t remove them from control panel.

The fix is to download the Sentinel HASP/LDK Windows GUI Run-time Sentinel HASP/LDK Windows GUI Run-time from thalesgroup website

Install, then uninstall it, reboot.

After reboot, I can upgrade to windows 10 20H1 successfully.

upgrade VCSA6.7 to VCSA6.7u1

It seems there is a bug in vCenter 6.7 which caused the update check of VCSA is not working.
So to upgrade VCSA from 6.7 to 6.7u1, you need to

1. In the vCenter Server Appliance Management Interface, go to Update > Settings and configure the custom URL to https://vapp-updates.vmware.com/vai-catalog/valm/vmw/8d167796-34d5-4899-be0a-6daade4005a3/6.7.0.10000.latest/.
2.Re-try the upgrade.

Then you should be able to see all the patches.

Upgrade ESXi from 6.5 to 6.7 via command line

Run this command to see the VMware online depot and list all profiles

[root@m900:~] esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep -i ESXi-6.7
ESXi-6.7.0-8169922-no-tools       VMware, Inc.  PartnerSupported
ESXi-6.7.0-8169922-standard       VMware, Inc.  PartnerSupporte

Run the upgrade with this command:

esxcli software profile update -p ESXi-6.7.0-8169922-standard  -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

Then reboot server

Upgrade vCenter Server Appliance (VCSA) and ESXi

Upgrade vCenter

Vcenter

Best practices is always to upgrade vCenter before your ESXi hosts. Download the ISO and upload to your Datastore.

Attach the ISO to the vCenter VM.

Mount ISO

Mount ISO

Use Putty to connect to your VCSA and run the following command:

software-packages install --iso --acceptEulas

step 3

4

reboot -r updates
exit

5
6

Update ESXi – Fast Method

This is the fastest way, but requires a decent internet connection.

Shut down all your running VM’s and enter Maintenance Mode.

Use Putty to connect to your ESXi host and run the following command:

esxcli network firewall ruleset set -e true -r httpClient
esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
esxcli software profile update -p ESXi-6.0.0-20160104001-standard -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml

updaet esxi

reboot
exit

Update ESXi from version 3.5 to 4.0

This page documents the process to update ESXi from version 3.5 to 4.0 if you have a standalone host or do not use vCenter Update Manager. After you have completed the firmware upgrade, you should also upgrade the virtual hardware version of your VMs as shown at the bottom of the page and also upgrade VMware Tools. Upgrading the virtual hardware version will allow you to take advantage of new VM features like 10 virtual NICs per VM, IDE virtual hard drives and VMDirectPath.

This procedure to upgrade an ESXi host from version 3.5 to 4.0 requires version 4.0 of the VMware vSphere client. Typically the vSphere client is installed after your ESXi host is installed. if you don’t have an existing install of the vSphere client v 4.0 you can extract it from the ESXi 4.0 upgrade ZIP package (VMware-viclient.vibdata.tar.gzdata.tar.4.0.0clientVMware-viclient.exe) as shown in the below image.

upgrade1

Continue reading