[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: USB and IDE-SCSI devices not showing up (migration from Mandrake to Debian testing).



On Tue, 27 Jan 2004 08:24:27 +0000, Adam wrote:

> On Sunday 25 January 2004 00:30, Andreas Janssen wrote:
> 
>>> # /sbin/lilo
>>> Warning: '/proc/partitions' does not match '/dev' directory structure.
>>>     Name change: '/dev/ide/host0/bus0/target0/lun0/disc' -> '/dev/hda'
>>> Added Linux *
>>> 
>>> Is that a serious warning?
>> 
>> It means that your Kernel was compiled with support for devfs, but devfs
>> is not mounted right now. I don't think it is serious.
> 
> That warning has stopped happening now.  But my df output has changed
> recently (it used to show /dev/hda1 etc.):
> 
> /home/adam $ df
> Filesystem           1K-blocks      Used Available Use% Mounted on
> /dev/ide/host0/bus0/target0/lun0/part1
>                       19228276   2185588  16065940  12% /
> /dev/ide/host0/bus0/target0/lun0/part3
>                        9843308    482120   8861168   6% /home
> /dev/ide/host0/bus0/target1/lun0/part1
>                        1041696    283136    705644  29% /scratch
> /dev/ide/host0/bus0/target0/lun0/part4
>                        9163288    489784   8208024   6% /var
> 
> Any idea how to change it back to the easier-to-read form?
> 

I thought this was an interesting exercise, so I created a script for you.

Cut and paste the following into a file called , for instance, "mydf",
make it executable with chmod, and make sure it's in your path.  Then you
can call it just like df with any of the df options.  The one thing it
doesn't do is join the lines which were split due to the length of the
devfs device name, It would be tedious, but not too hard, to add
that.  Anyway, I didn't want to overcomplicate the example.
-------------------------------
#!/bin/bash
# Purpose:  Convert devfs device names in df output to legacy device names
# Invocation:  mydf [DFOPTION]... [FILE] 
#	where DFOPTION is an option associated with the df command.
# author:  paul morgan (paulswm@earthlink.net) 01/27/2004
IFS=X
df $*|\
while read dfline ; do
    { echo $dfline|grep -q '^/dev/.*/host[0-9]/bus[0-9]/.*'; }\
        && eval "dfline=$(find /dev -name 'hd*' -lname ${dfline#/dev/})"
    echo $dfline
done
--------------------------------
-- 
....................paul

It is important to realize that any lock can be picked with a big
enough hammer.
               -- Sun System & Network Admin manual




Reply to: