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.
Pmount bug: incorrect reported size
-
- Posts: 807
- Joined: Mon 12 Oct 2009, 17:11
Pmount bug: incorrect reported size
- Attachments
-
- pmount-wrong-size-2.png
- (36.66 KiB) Downloaded 353 times
What do you work on ?It may be due to work I am doing
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
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
And i am dead because i have not the newes newset newest :
-
- Posts: 807
- Joined: Mon 12 Oct 2009, 17:11
Pmount bug: incorrect reported size
It may be due to work I am doingB.K. Johnson wrote:
What do you work on ?Karl Godt asked:
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?
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 :
and /sbin/probepart is exactly the script that pmount uses if mut's probepart is not activated in the pmount preferences .
* 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 :
ext4 reported as ext2 : http://bkhome.org/blog/?viewDetailed=02885Yes! 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.
and /sbin/probepart is exactly the script that pmount uses if mut's probepart is not activated in the pmount preferences .