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 Sun 26 Oct 2014, 00:42
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
Pmount bug: incorrect reported size
Moderators: Flash, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
B.K. Johnson

Joined: 12 Oct 2009
Posts: 141

PostPosted: Wed 22 Aug 2012, 12:33    Post_subject:  Pmount bug: incorrect reported size  

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-wrong-size-2.png
 Description   
 Filesize   36.66 KB
 Viewed   276 Time(s)

pmount-wrong-size-2.png

Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Wed 22 Aug 2012, 14:57    Post_subject:  

Quote:
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:
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:
 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 :
pmount-compare.png
 Description   
 Filesize   783.4 KB
 Viewed   400 Time(s)

pmount-compare.png

Back to top
View user's profile Send_private_message Visit_website 
B.K. Johnson

Joined: 12 Oct 2009
Posts: 141

PostPosted: Mon 03 Sep 2012, 02:14    Post_subject: Pmount bug: incorrect reported size  

Quote:
B.K. Johnson wrote:
It may be due to work I am doing
Quote:
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:
[url] http://www.murga-linux.com/puppy/viewtopic.php?t=79333.[/url]
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?
Back to top
View user's profile Send_private_message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Sat 08 Sep 2012, 07:37    Post_subject:  

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 :

Quote:
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 .
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Puppy Projects
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.0566s ][ Queries: 12 (0.0051s) ][ GZIP on ]