Whole machine hangs during upgrade

Odd. What do you get from

cat /etc/sysctl.d/10-huge-pages.conf

Perhaps try the echo again?