Last active
January 1, 2016 22:39
-
-
Save johnnyfreeman/8211662 to your computer and use it in GitHub Desktop.
Fix for this Grub issue (https://bugs.archlinux.org/task/37904). Run as root.
This file contains 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
#!/bin/bash | |
# get correct UUID | |
NUUID=$(lsblk -no UUID /dev/sda1) | |
# get wrong UUID | |
OUUID=$(grep -om 1 '[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}' /boot/grub/grub.cfg) | |
# replace all wrong UUIDs with the correct UUID in the grub config file | |
sed -i "s/$OUUID/$NUUID/g" /boot/grub/grub.cfg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment