Skip to content

Instantly share code, notes, and snippets.

@mariusv
Last active December 11, 2015 13:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mariusv/4605792 to your computer and use it in GitHub Desktop.
Save mariusv/4605792 to your computer and use it in GitHub Desktop.
This fixes the UUID issue on Racksapce Cloud servers with Ubuntu 12.04 or any Ubuntu servers after upgrading the GRUB to GRUB2 and chose to install the maintainer version of menu.lst
#!/bin/sh
file="/mnt/boot/grub/menu.lst"
back="/mnt/boot/grub/menu.lst~"
word="UUID"
mount -o rw /dev/xvdb1 /mnt
if [ -x "$file" ]; then
echo "File $file does not exist."
exit 1
fi
sed -e "s/=UUID//g" -i $file
sed -e "s/=UUID//g" -i $back
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment