if ($$fsent[0] =~ /^(LABEL|UUID)=/) {
foreach my $ment (@mtab) {
if ($$ment[1] eq $$fsent[1]) {
return $$ment[0] if $$fsent[0] eq $mnt; # if mnt is LABEL/UUID=XXXXXX and present in fstab
$$fsent[0] = $$ment[0];
}
sub dev2grub {
my $dev = shift;
$dev = mnt2dev($dev) if $dev =~ /^(LABEL|UUID)=/;
my ($disk, $part) = $dev =~ /([^\d\s]+)(\d+)/
or return;
# Sample device.map entry: