[lug] /etc/fstab in the modern world

P. Scott DeVos scott at savingtree.com
Sat Oct 23 22:42:43 MDT 2004


David Anselmi wrote:
> P. Scott DeVos wrote:
> [...]
> 
>> e2label <partition>
>>
> [...]
> 
>> That's all there is to it.  I would love to have a tool that listed 
>> all partitions with their labels, but I am not aware of such a tool 
>> and do not have time to write one myself.  If anyone knows of such a 
>> tool, please post here!
> 
> 
> Huh.  This seems pretty close:
> 
> for part in /dev/hda* ; do sudo e2label $part 2>/dev/null ; done

> Of course you can use your imagination in working out what to use 
> instead of /dev/hda* to get the appropriate partitions.  For example, df 
> gives a pretty good start at all your mounted partitions.

Well, that's the problem isn't it.  If the partitions are mounted, I 
probably know what's up with them already.

My problem comes in a system with a variety of hot-swappable devices 
which I may not know at any given time to what device they are assigned. 
  I'de like to be able to say, 'which of these many devices holds a 
partition with a file system labelled x?'  Obviously mount knows how to 
find this information, so it probably isn't difficult.  In fact, I use 
mount to find the information now, but I would really like to do it 
without mounting and would also like to be able to see when two file 
systems have the same label.

> Dave
> 
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us port=6667 channel=#colug
> 



More information about the LUG mailing list