Hello, On Sun, 05 Jul 2009, Patrick Shanahan wrote:
Ah, old-timer's.... But I tend to wander. I developed a rather unique problem which I could not solve with SLED 10 (somewhat bastardized) and installed 11.2 which is current according to zypper dup.
You talk about bastardized? You should see my "6.2". *scnr*
I don't think there is a way - but you can save yourself some typing by simply copy/pasting the disk IDs from /dev/disk/by-id/
Yes, came to the same conclusion, just starting.
If you still have the connection /dev/[hs]d* device" <-> mountpoint <-> options, and "just" need to replace the [hs]d* with the corresponding /dev/disk/by-id/ then try the following and if the result suits you ... ==== #!/usr/bin/perl -w use strict; # you will need to check these defaults: my $defaults = qr/rw|errors=continue|barrier=1|data=ordered/; # you might want to check this output format: my $fmt = "/dev/disk/by-id/%- 42s\t%- 10s\t%- 10s %- 20s\t% 3s % 3s"; #### no user servicable stuff below this, theoretically ;) #### my %ids; chdir("/dev/disk/by-id/") or die "$!\n"; opendir(IDS, ".") or die "$!\n"; map { my $d = readlink() or die "$!\n"; $d =~ s@.*/(s\S+)@/dev/$1@; $ids{$d} = $_ unless defined($ids{$d}) && $ids{$d} =~ /^ata/; } grep {!/^.{1,2}$/} readdir(IDS); closedir(IDS); open(PM, "<", "/proc/mounts") or die "$!\n"; while(<PM>) { if( /^\/dev\// ) { my ($dev, $mnt, $fst, $opt, $dmp, $chk) = split(); # replace default options $opt =~ s/$defaults/defaults/g; if( $opt =~ /defaults/) { $opt =~ s/defaults(,|$)//g; $opt = "defaults,$opt"; $opt =~ s/,$//; } if( $mnt eq "/" ) { $chk = 1; } ## we want '/'-partition checked printf "$fmt\n", $ids{$dev}, $mnt, $fst, $opt, $dmp, $chk; } } close(PM) or die; ==== You may need to adjust the dump/fsck fields and replace (more) superfluous default-options (like rw,errors=continue...) in the output. HTH, -dnh PS: I've got 10 internal drives with (only!) 12 partitions on my new box ... I might think about extending above script to use labels or UUIDs or plain devs via option if prodded ;) -- | Ceci n'est pas une pipe -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org