Skip to content

Instantly share code, notes, and snippets.

@okanon
Last active January 29, 2019 03:25
Show Gist options
  • Save okanon/ffd3d6f624986ebbf2cc122f3e006edb to your computer and use it in GitHub Desktop.
Save okanon/ffd3d6f624986ebbf2cc122f3e006edb to your computer and use it in GitHub Desktop.
update EFI
#!/bin/sh
repl=`grep -e "vfat" -n /etc/fstab | sed -e 's/:.*//g'`
echo -n "Input EFI Partition: "
read efip
DUUID=`blkid -o export $efip | grep -m 1 UUID`
echo $DUUID
echo
sed -i -e ''$repl' s/UUID=\w\{4\}-\w\{4\}/'$DUUID'/' /etc/fstab
cat /etc/fstab
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment