You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
388 B
11 lines
388 B
5 years ago
|
# DDI - Dump Disk Information
|
||
|
#
|
||
|
# Dumps the UUID and label of a filesystem to its / (root) directory.
|
||
|
# Parses df output to find current mounts and then uses lsblk to get info.
|
||
|
|
||
|
for dev in `df -h | grep ^/dev | cut -d\ -f1 | cut -d/ -f3`; do
|
||
|
loc=`cat /proc/mounts | grep $dev | cut -d\ -f2`
|
||
|
lsblk -fn -o UUID /dev/$dev > $loc/.uuid
|
||
|
lsblk -fn -o LABEL /dev/$dev > $loc/.label
|
||
|
done
|