Pmount bug: incorrect reported size

A home for all kinds of Puppy related projects
Post Reply
Message
Author
B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

Pmount bug: incorrect reported size

#1 Post by B.K. Johnson »

Pmount seems to be showing incorrect size (x100) for flash drives on my lupulibre-528-005 system (see snapshot below).

It may be due to work I am doing. Please verify that Pmount is working correctly.
Attachments
pmount-wrong-size-2.png
(36.66 KiB) Downloaded 353 times

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#2 Post by Karl Godt »

It may be due to work I am doing
What do you work on ?

pmount uses the files in /sys/[class/]block mostly by means of /sbin/probedisk[2] and /sbin/probepart .

The NONAME label might be possibly derived by mut engine ( which is a binary that would need adjustments to support ext4 ) .

Code: Select all

mut probedisk2
/dev/sda|drive|ATA ST3250310AS 250GB 11 partitions
AND
LABELED ones show up as
/dev/sr0|optical|PLDS DVD-ROM DH-16D3S 684MB LABEL> SUSE9_2_V0_WINBM <LABEL

The size is calculated by probepart in kilobytes and formatted in /usr/sbin/pmount

Code: Select all

 ONESIZEK=`echo -n "$ONEPART" | cut -f 3 -d '|'`
 if [ $ONESIZEK -gt 1048576 ];then #1024*1024
  ONESIZE="`dc $ONESIZEK 1048576 \/ p`"
  ONESIZE="`printf "%.1f" $ONESIZE`G"
 else
  if [ $ONESIZEK -gt 99 ];then
   ONESIZE="`expr $ONESIZEK \/ 1024`M"
  else
   ONESIZE="`dc $ONESIZEK 1024 \/ p`"
   ONESIZE="`printf "%.1f" $ONESIZE`M"
  fi
 fi
for example .

And i am dead because i have not the newes newset newest :

B.K. Johnson
Posts: 807
Joined: Mon 12 Oct 2009, 17:11

Pmount bug: incorrect reported size

#3 Post by B.K. Johnson »

B.K. Johnson wrote:
It may be due to work I am doing
Karl Godt asked:
What do you work on ?

Thanks for asking. I am experimenting with udev trying to make my flash drives have persistent names so I can avoid/overcome device names being changed when the usb connection is momentarily broken. See my earlier post here:
http://www.murga-linux.com/puppy/viewtopic.php?t=79333.
which nobody has commented on in 2 months since the post.

I tried mut probedisk2 using slacko and "NO NAME" showed for both mounted usb flash drives.

/dev/sda|usb|SanDisk Cruzer Edge 4.00GB NO NAME
/dev/sdb|usb|SanDisk SanDisk Cruzer 8.03GB NO NAME
/dev/sde|usb|WDC WD80 USB TO IDE 80GB 2 partitions
/dev/sr0|optical|SanDisk SanDisk Cruzer 100MB U3 System

In the absence of what, would there be the necessity for mut to assign "NO NAME"?

Pmount in slacko showed the correct sizes as yours do. What puppy are you running? I conclude that it is the implementation in lupu which is problematic.
I'll see what happens in lupu.

Is mut probedisk2 the best tool to use for partition/disk name? Or, is it that the mut engine (circa 2007) has not been updated to reflect udev changes? As said above, I am working with udev. Which tool would return the symlink name?
For example, my udev rule for the 8 GB San Disk Cruzer (sdf1 in my post screenshot) has SYMLINK+="usbdevices/Cr8".
Questions:
(1) What program would print the "Cr8"?
(2) Nothing in Puppy (except blkid and udevadm) shows "Cr8". How an I use this "persistent" name?

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#4 Post by Karl Godt »

B.K. : Short answers for now :

* The mut engine can be en- and dis-abled in the pmount preferences .

* mut does not know of ext4 features thus shows them as ext3 .

* The mut server seems to be able to alter the device MAJORS and MINORS which are like :

bash-3.00# ls -l /dev/sda2
brw-r--r-- 1 root root 8, 2 6. Sep 23:01 /dev/sda2

MAJOR=8
MINOR=2

and are also noted in the file /sys/block/sda/sda2/dev in that case .

*

I have only compiled udev until now ( on Puppy 4.3.x ) and got it compile up to version 140, not further (145+) and not written any udev rule .

*

For blkid probably look here :
Yes! I have already solved the problem. The full 'blkid' from the util-linux package (version 2.18\) reports correctly:

# ./blkid /dev/sdc2
/dev/sdc2: LABEL="puppy" UUID="f13cec24-bb3b-4bee-9c2c-bf4acd4e1bf0" TYPE="ext4"

So, now I have to implement this correct detection into the 'probepart' utility.
ext4 reported as ext2 : http://bkhome.org/blog/?viewDetailed=02885

and /sbin/probepart is exactly the script that pmount uses if mut's probepart is not activated in the pmount preferences .

Post Reply