Last active
January 12, 2017 13:43
-
-
Save jasraj/646bdfc93aa6d8e2fca33fe1b5692e54 to your computer and use it in GitHub Desktop.
Updates GRUB to boot with the previous good kernel version (4.4.0-57) for zfs-native 0.6.5.7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # zfs-native 0.6.5.7 - Kernel Downgrade to 4.4.0-57 | |
| # Does not build with 4.4.0-59 | |
| # Install previous good kernel | |
| apt-get install linux-image-4.4.0-57-generic linux-image-extra-4.4.0-57-generic | |
| # Replace primary boot kernel (vmlinuz and initrd.img) in grub.cfg | |
| sed -E "s/\/(vmlinuz|initrd\.img)-4\.4\.0-59-generic/\/\1-4.4.0-57-generic/g" /boot/grub/grub.cfg > /tmp/grub-modified-4.4.0-57.cfg | |
| # CHECK THE GENERATED FILE (look for code within "menuentry 'Ubuntu'") for updated kernel version | |
| # Update grub.cfg | |
| cp -v /boot/grub/grub.cfg /tmp/grub.$(date +%Y-%m-%d-%H-%M-%S)-.bak | |
| cp -v /tmp/grub-modified-4.4.0-57.cfg /boot/grub/grub.cfg | |
| # Reboot | |
| shutdown -r now |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I didn't realise you could use the entry ID for the
GRUB_DEFAULTconfiguration (I only saw it using list index, e.g.1>2which didn't work for me). Thanks for sharing that.