sunrat Posted September 19, 2017 Share Posted September 19, 2017 You know how the swap UUID can get changed and mismatch fstab when you install a new OS in a multiboot setup? Here's a command to check if fstab swap entry is correct: if [ $(grep swap /etc/fstab | awk '{print $1}') == $(blkid | grep swap| awk '{print $2}'|sed s/'"'//g) ]; then echo "All is good";else echo "Swap UUID is different to fstab";fi I saved it to my Zim Desktop Wiki repository of handy tips and commands. Funny story how I came to this - someone posted a command on Debian User Forums purporting to do the same thing. I had a quick look at the command and realised it was comparing 2 identical commands so couldn't possibly flag a mismatch. Of course I had to fix it. 5 Quote Link to comment Share on other sites More sharing options...
abarbarian Posted September 20, 2017 Share Posted September 20, 2017 Well it has never happened to me, but I am all in for insurance so have added it to my ArchWay Zim. An I very nearly understood the command which worries me a tad. I am still a bit confused about some aspects of code writing 1 Quote Link to comment Share on other sites More sharing options...
V.T. Eric Layton Posted September 20, 2017 Share Posted September 20, 2017 I still use the /dev/sd* nomenclature on my machines, so I don't have the UUID mixup issue. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.