Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 25 Nov 2014, 17:14
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
212,213b USB flash names not retained in Pmount, Univ Inst
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 3 of 10 Posts_count   Goto page: Previous 1, 2, 3, 4, 5, ..., 8, 9, 10 Next
Author Message
PaulBx1

Joined: 16 Jun 2006
Posts: 2308
Location: Wyoming, USA

PostPosted: Sun 31 Dec 2006, 01:42    Post_subject:  

From my experiment earlier:

Code:
sh-3.00# /root/probedisk
/dev/hdc|cdrom|MATSHITADVD-ROM SR-8175
/dev/hda|disk|IC25N020ATDA04-0
/dev/sda|Direct-Access|LEXAR    JD FIREFLY       
sh-3.00# /root/probepart
libcfdisk: unable to open /dev/sda
/dev/hdc|iso9660|0|MATSHITADVD-ROM SR-8175
/dev/hda1|vfat|36968337|Win95 FAT32 (LBA)
/dev/hda2|swap|2086560|Linux Swap


Obviously probepart is looking for sda which is not there, however it may be thinking it's there by paying attention to probedisk! So maybe only probedisk needs fixing.

If you hadn't noticed my edit above, I found that MUT also uses /var/log/messages...
Back to top
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: Sun 31 Dec 2006, 01:58    Post_subject:  

Yeah, I think /var/log/messages is probably the easiest way to go. If I get bored I'll try and think up ways to get rid of probedisk alltogether but for now I think this script should solve the problem.
Back to top
View user's profile Send_private_message 
PaulBx1

Joined: 16 Jun 2006
Posts: 2308
Location: Wyoming, USA

PostPosted: Sun 31 Dec 2006, 02:18    Post_subject:  

Well, I tried it on 211 and it looked like it worked, sort of (although when I pulled one out, pmount acted like both flash drives were gone). I tried in 213 and nothing worked, I think because of mrxvt. Then going back to 211 it is even more broken:

Code:
sh-3.00# probedisk
/dev/hdc|cdrom|MATSHITADVD-ROM SR-8175
/dev/hda|disk|IC25N020ATDA04-0
/dev/sda|Direct-Access|LEXAR JD FIREFLY
/dev/sdb|Direct-Access|LEXAR JD FIREFLY


MUT knows sda is the IntelligentStick.
Back to top
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: Sun 31 Dec 2006, 02:39    Post_subject:  

Weird, here's mine with the revised probedisk:

Code:

sh-3.00# probedisk
/dev/hda|disk|IC25N080ATMR04-0
/dev/hdc|cdrom|HL-DT-ST DVD-RW GWA-4040N
/dev/sda|Direct-Access|WD 1600JB External
/dev/sdb|Direct-Access|JetFlash TS1GJF110
/dev/sdc|Direct-Access|GENERIC USB Storage-CFC


I'm in 2.11 right now. I have audio and usb issues with the new kernel. Are you using the newest version of pmount and not the original 2.11 pmount? After going back into 2.11 you moved the revised probedisk into /sbin/?

After a while of taking out and re-inserting the usb drives MUT, pmount, and probedisk all show the same and correct information.
Back to top
View user's profile Send_private_message 
PaulBx1

Joined: 16 Jun 2006
Posts: 2308
Location: Wyoming, USA

PostPosted: Sun 31 Dec 2006, 04:03    Post_subject:  

Just using the 211 pmount. Now I recall it had problems <sigh> I will get the one in 213. However pmount should not affect the way probedisk works, right? That's still broken.

I followed your instructions for probedisk and probedisk2.

Did you try pulling and reinserting a flash drive? That's when mine went bad...
Back to top
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: Sun 31 Dec 2006, 09:39    Post_subject:  

Yeah, I pulled and re-inserted my usb drives and all the correct information was retained in probedisk.
Back to top
View user's profile Send_private_message 
pakt


Joined: 04 Jun 2005
Posts: 1089
Location: Sweden

PostPosted: Sun 31 Dec 2006, 11:00    Post_subject:  

Running 2.13b2 from my eBox right now (no pup_save file) and tried plinej's probedisk script. Seems to work okay. Here's an excerpt:
Code:
sh-3.00# probedisk
/dev/hda|disk|CF-ATA
/dev/sda|Direct-Access|SanDisk Cruzer Mini
/dev/sdb|Direct-Access|USB 2.0 Mobile Disk
sh-3.00#
sh-3.00# probedisk
/dev/hda|disk|CF-ATA
/dev/sdb|Direct-Access|USB 2.0 Mobile Disk
sh-3.00#
sh-3.00# probedisk
/dev/hda|disk|CF-ATA
/dev/sda|Direct-Access|SanDisk Cruzer Mini
/dev/sdb|Direct-Access|USB 2.0 Mobile Disk
sh-3.00#

Paul

_________________
Testing Puppy since v0.9.2 - my desktop OS since v1.0.7
Running SlaxerPup-4.12 - Puppy with a Slackware 12.2 heart Cool
Back to top
View user's profile Send_private_message 
pakt


Joined: 04 Jun 2005
Posts: 1089
Location: Sweden

PostPosted: Sun 31 Dec 2006, 11:24    Post_subject:  

Ineresting to see what happens when using 'stock' 2.13b2 pmount with plinej's probedisk:

pmount reports correctly:
sda 'SanDisk' drive /dev/sda1
sdb 'USB 2.0' /dev/sdb1

Pulled 'SanDisk', now pmount doesn't report *any* USB drive.

Plugged 'SanDisk' back in, pmount reports both USB drives exactly as before.

Pulled 'USB 2.0', pmount correctly reports the SanDisk sda drive.

Seems like pmount stops looking for USB drives if it can't find sda.

Paul

_________________
Testing Puppy since v0.9.2 - my desktop OS since v1.0.7
Running SlaxerPup-4.12 - Puppy with a Slackware 12.2 heart Cool
Back to top
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: Sun 31 Dec 2006, 11:37    Post_subject:  

pakt,

Does the newly updated pmount do that too? If not, does the modified probedisk report back correctly when pmount doesn't?
Back to top
View user's profile Send_private_message 
pakt


Joined: 04 Jun 2005
Posts: 1089
Location: Sweden

PostPosted: Sun 31 Dec 2006, 12:33    Post_subject:  

plinej wrote:
Does the newly updated pmount do that too?

Unfortunately, it does - no difference.
plinej wrote:
If not, does the modified probedisk report back correctly when pmount doesn't?

Yes, probedisk gives the right results:
Quote:
sh-3.00# probedisk
/dev/hda|disk|CF-ATA
/dev/sda|Direct-Access|SanDisk Cruzer Mini
/dev/sdb|Direct-Access|USB 2.0 Mobile Disk
sh-3.00#
sh-3.00# probedisk
/dev/hda|disk|CF-ATA
/dev/sdb|Direct-Access|USB 2.0 Mobile Disk
sh-3.00#
sh-3.00# probedisk
/dev/hda|disk|CF-ATA
/dev/sda|Direct-Access|SanDisk Cruzer Mini
/dev/sdb|Direct-Access|USB 2.0 Mobile Disk
sh-3.00#

_________________
Testing Puppy since v0.9.2 - my desktop OS since v1.0.7
Running SlaxerPup-4.12 - Puppy with a Slackware 12.2 heart Cool
Back to top
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: Sun 31 Dec 2006, 19:39    Post_subject:  

I'll have to look over pmount tomorrow if I get a chance. Time for NYE's festivities.
Back to top
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: Sun 31 Dec 2006, 19:50    Post_subject:  

In the meantime I added a little more to my modified probedisk script. Now it should find your usb drives, hard drives, & usb cdroms. I haven't added any code for floppy or zip yet. I have no floppy on my laptop but I could do some testing on another computer when I get a chance.

Code:

#!/bin/sh

### a re-write for probedisk (usb portion)
### the original probedisk has problems with usb information
### http://www.murga-linux.com/puppy/viewtopic.php?t=13267

if [ -d /tmp/probedisk ]; then
rm -r /tmp/probedisk
fi
if [ -f /tmp/probedisk ]; then
rm -f /tmp/probedisk
fi
mkdir /tmp/probedisk
cp /var/log/messages /tmp/probedisk/
#probedisk2 | grep -v 'dev/sd' > /tmp/probedisk/probedisk  ### use the original probedisk (renamed to probedisk2) to get all non-usb information
if [ -d /proc/ide ]; then
cd /proc/ide
ls -d hd* | while read DRIVE
do
echo \/dev\/"$DRIVE"\|`cat "$DRIVE"/media`\|`cat "$DRIVE"/model | tr -s ' '` >> /tmp/probedisk/probedisk
done
fi

if [ "`cat /tmp/probedisk/messages | grep -i cd-*rom`" != "" ]; then
cat /tmp/probedisk/messages | grep -i cd-*rom -B 1 -A 1  | sed -e 's/.*kernel:/:/g' | grep 'Vendor:' -A 2 | sed '/^$/d' | sed '/^--/d' | grep -v 'Type:' > /tmp/probedisk/usbcdrom
if [ "`cat /tmp/probedisk/usbcdrom | grep ': sr'`" != "" ]; then
cat /tmp/probedisk/usbcdrom | grep ': sr' | sort -u > /tmp/probedisk/usbcdroms
a=`cat /tmp/probedisk/usbcdroms | wc -l | sed -e 's/ *//' | sed -e 's/ .*//g'`
while [ "$a" != 0 ]
do
DEV=`cat /tmp/probedisk/usbcdroms | sed -n ""$a"p" | cut -f 2 -d ':' | sed -e 's/ //g' | sed -e 's/sr/scd/g'`
if [ "`cat /tmp/probedisk/usbcdrom | grep 'Vendor:'`" != "" ]; then
b=`cat /tmp/probedisk/usbcdrom | wc -l | sed -e 's/ *//' | sed -e 's/ .*//g'`
c=`expr "$b" - "$a"`
d=1
while [ "$d" != 0 ]
do
VENDOR=`cat /tmp/probedisk/usbcdrom | sed -n ""$c"p" | cut -f 3 -d ':' | sed -e 's/Model//g' | tr -s ' ' | sed -e 's/^ //g'`
MODEL=`cat /tmp/probedisk/usbcdrom | sed -n ""$c"p" | cut -f 4 -d ':' | sed -e 's/Rev//g' | tr -s ' ' | sed -e 's/^ //g'`
if [ "$VENDOR" = "" ]; then
if [ "$MODEL" = "" ]; then
c=`expr "$c" - 1`
fi
fi
if [ "$MODEL" != "" ]; then
d=0
fi
echo \/dev\/"$DEV"\|cdrom\|"$VENDOR""$MODEL" >> /tmp/probedisk/probedisk
done
fi
a=`expr "$a" - 1`
done
fi
fi

if [ "`cat /tmp/probedisk/messages | grep Direct-Access`" != "" ]; then
cat /proc/partitions | grep sd | sed -e 's/[0-9]//g' | sed -e 's/ //g' | sort -u > /tmp/probedisk/usbdevices  ### get current existing usb device names
cat /tmp/probedisk/usbdevices | while read DEV
do
cat /tmp/probedisk/messages | grep Direct-Access -A 1 -B 1  | sed -e 's/.*kernel:/:/g' | grep -v Direct-Access | sed '/^$/d' | sed '/^--/d' | grep "$DEV" -B 1 > /tmp/probedisk/"$DEV" ### get necessary info from /tmp/probedisk/messages
NUMLINES=`cat /tmp/probedisk/"$DEV" | wc -l | sed -e 's/ *//' | sed -e 's/ .*//g'`
NUMLINES2=`expr "$NUMLINES" - 1`
if [ "`cat /tmp/probedisk/"$DEV" | grep Vendor`" != "" ]; then  ### just incase Vendor info isn't on designated line
while [ "`cat /tmp/probedisk/"$DEV" | sed -n ""$NUMLINES2"p" | grep Vendor`" = "" ]
do
NUMLINES2=`expr "$NUMLINES2" - 1`
done
fi
if [ "`cat /tmp/probedisk/"$DEV" | grep Vendor`" = "" ]; then  ### just incase Vendor info isn't in file we'll try to get it an alternate way
NUM=`cat /tmp/probedisk/messages | grep 'SCSI device "$DEV":' -n | cut -f 1 -d ':' | tail -n 1`  ### get last line in /tmp/probedisk/messages that contains 'SCSI device (your device)'
NUM2=`expr "$NUM" - 1`
while [ "`cat /tmp/probedisk/messages | sed -n ""$NUM2"p" | grep Vendor`" = "" ]
do
NUM2=`expr "NUM2" - 1`
done
VENDOR=`cat /tmp/probedisk/messages | sed -n ""$NUM2"p" | sed -e 's/.*kernel:/:/g'`
else
VENDOR=`cat /tmp/probedisk/"$DEV" | sed -n ""$NUMLINES2"p" > /tmp/probedisk/"$DEV"-vendor`
fi
BRAND=`cat /tmp/probedisk/"$DEV"-vendor | cut -f 3 -d ':' | sed -e 's/Model//g' | sed -e 's/ *//' | tr -s ' '`
NAME=`cat /tmp/probedisk/"$DEV"-vendor | cut -f 4 -d ':' | sed -e 's/Rev//g' | sed -e 's/ *//' | tr -s ' '`
echo \/dev\/"$DEV"\|Direct-Access\|"$BRAND""$NAME" >> /tmp/probedisk/probedisk  ### reorganize to output how original probedisk outputs
done
fi

cat /tmp/probedisk/probedisk
rm -r /tmp/probedisk
Back to top
View user's profile Send_private_message 
plinej

Joined: 13 Aug 2006
Posts: 1522

PostPosted: Sun 31 Dec 2006, 20:02    Post_subject:  

If anyone has a zip drive, let me know where all the pertinent information is stored (maybe in proc) so I can add that to the script. Post the info as it appears in the file(s). I'll need to know where the device information is stored (/dev/whatever) and the vendor/model information.
Back to top
View user's profile Send_private_message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7082
Location: Perth, Western Australia

PostPosted: Mon 01 Jan 2007, 06:23    Post_subject:  

Please do not use the libhardware 0.7.4 source, it has some bugs.
I discussed this with Antonio ages ago. I am using source dated 20060703, if I recall rightly, it some some mods by me.
...hmmm, I see my source isn't at puptrix.org/sources/.

Antonio did put fixes into his CVS code, but he has stopped working on
it and it has never progressed to a release version. He has however
packaged the CVS here (20060805):
http://www.badpenguin.org/pub/software/libhardware/

...so, perhaps that has some further improvements.

Ha, I have just found my source (and the required libbadpenguin):
libbadpenguin-1.1.1.tar.gz
Description 
gz

 Download 
Filename  libbadpenguin-1.1.1.tar.gz 
Filesize  233.48 KB 
Downloaded  360 Time(s) 
libhardware-20060723.tar.gz
Description 
gz

 Download 
Filename  libhardware-20060723.tar.gz 
Filesize  166.24 KB 
Downloaded  316 Time(s) 
Back to top
View user's profile Send_private_message Visit_website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7082
Location: Perth, Western Australia

PostPosted: Mon 01 Jan 2007, 06:27    Post_subject:  

I have also uploaded those packages to puptrix.
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 3 of 10 Posts_count   Goto page: Previous 1, 2, 3, 4, 5, ..., 8, 9, 10 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Bugs ( Submit bugs )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0968s ][ Queries: 13 (0.0073s) ][ GZIP on ]