Vdisktool testers please

Using applications, configuring, problems
Message
Author
User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

Vdisktool testers please

#1 Post by willhunt »

It now creates 2fs files called vdisk1.2fs or vdisk2.2fs 32Meg to
1.2Gig in size in your /mnt/home directory once created you can can
mount them and use them just like any other ext2 drive there is a
button to Repair (Vdrives Must Not be mounted or DAMAGE could occur
to there data ), there are also ones to Squash, View and show the
amount of freespace. gmount is a file chooser window that mounts
2fs, 3fs, iso, sfs, files and gumnt is the umount util.

things I would like to add are encryption for vdisktool and for
gmount I would like to see a menubox instead of a file chooser
option

please test and let me know of any problems it work fine
on this box but......

both tools are made from snippets and scripts on the forum :)
ok fixed it :oops:
Image
Attachments
vdisktool.pet
read more got rid of bunch of stuff fixed a bunch still along way to go
(8.63 KiB) Downloaded 793 times
Last edited by willhunt on Sun 24 Jun 2007, 23:40, edited 9 times in total.
[url=http://hostfile.org/icepak.pet]176 Icewm Themes :!:[/url]
[url=http://tinyurl.com/39fl3x]vlc-0.8.6c-i586.pet[/url]
[url=http://tinyurl.com/2q7cbp]vlc-0.8.6c-i586.pet[/url]

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#2 Post by muggins »

it mounts .sfs files on my system. but i had to go searching to see that it had mounted files on /mnt/data, so maybe needs some gui feedback saying what it's doing.

User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

#3 Post by willhunt »

Thanks muggins missed that :oops:
new version for testing :)
[url=http://hostfile.org/icepak.pet]176 Icewm Themes :!:[/url]
[url=http://tinyurl.com/39fl3x]vlc-0.8.6c-i586.pet[/url]
[url=http://tinyurl.com/2q7cbp]vlc-0.8.6c-i586.pet[/url]

User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

posted update

#4 Post by willhunt »

I updated the org file and added the sfs button so now you can create your own sfs files they wil need to be renamed for automagic loading to *_PuppyVersion.sfs also if someone knows any mount (ie -t ISO9660)
that i missed please post and let me know please. These scripts are very simple I hope and easy to understand any and all coments are Welcome !
[url=http://hostfile.org/icepak.pet]176 Icewm Themes :!:[/url]
[url=http://tinyurl.com/39fl3x]vlc-0.8.6c-i586.pet[/url]
[url=http://tinyurl.com/2q7cbp]vlc-0.8.6c-i586.pet[/url]

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#5 Post by HairyWill »

I gave this a go, much of what I have written below is negative because I was trying to be thorough though hopefully there are enough constructive comments to make it worth your while.

My test environment was 2.16 with quite a lot of other stuff installed already.

on trying to install
PETget: package expansion ERROR
There was an error expanding package vdt-.03.tar.gz.
Either the file is corrupted, or has not expanded into its own directory with
name of vdt-.03/ (which is how most packages expand).
You will have to go into /root/.packages/ directory and manually clean it up.

This script will now exit...

<edit>then I extracted it an installed manually ran fixmenus and restarted jwm</edit>


Ran vdisktool read the help, still wasn't sure what I was supposed to be doing clicked a few buttons and managed to lock up X
switched to VT2 nothing odd showed up on top
the relevant output from ps is below
tried killing these but it didn't help in the end I just killed X
I'm sorry I can't tell you what I did wrong but you might want to look at some of your input checking
8097 root 1392 T /bin/sh /root/my-roxapps/vdisktool/vdisktool
8098 root 6380 T gtkdialog --program vdisktool
8392 root 1516 T /bin/sh /root/my-roxapps/vdisktool/mkpupsave
8396 root 944 T dialog --colors --msgbox \Z1WARNING: If you want to c


gmount
needs an unmounter
It allowed me to mount both an iso and a squashfile at the same time on /mnt/data.
Its a good job they were mounted read-only as I'm not sure what would have happened if I'd started writing to them. IMHO it would be better to create unique mountpoints in tmp for each mount to avoid this. It is probably better not to assume that you can use /mnt/data
as it may already have something else mounted on it or something else may try to use it whilst you are.
I tried mounting a valid .2fs file that had been renamed with a different extension, the mount failed but I was just given an empty rox window at /mnt/data with no error message. I'm not insisting that you should be able to mount this but it might be helpful to state what you can mount. I can't remember if its possible to set a file extension filter on the browse window.
How do you handle running out of loop devices?

Make Virtual Drive
starts a rxvt window mkpupsave which then just hangs
Last edited by HairyWill on Wed 20 Jun 2007, 11:30, edited 1 time in total.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#6 Post by Béèm »

I like little tools which make life easier but :oops: what is a virtual disk and where is it supposed to be?
I kow the concept of making virtual disks on a webspace f.e.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

#7 Post by willhunt »

Thank you so much for your help HairyWill I will try my best to fix these problems but I'm still a acorn :? I'm still having problems learning how to escape command properly so they expand right :cry: the pet error is because it extracts to /root/my-roxapps/vidsktool I will fix that asap and the help file and start work on the rest of the problems as I'm new to bash scripting (trial and error mode) this will take a little time and agian thanks for your time and helpful comments.


@bleem

I was hoping this would provide a very easy way to create 2fs files and mount them for compileing ect or squash and rename them for automounting at boot
[url=http://hostfile.org/icepak.pet]176 Icewm Themes :!:[/url]
[url=http://tinyurl.com/39fl3x]vlc-0.8.6c-i586.pet[/url]
[url=http://tinyurl.com/2q7cbp]vlc-0.8.6c-i586.pet[/url]

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#8 Post by Béèm »

Willhunt, thank you, I understand better.
Seing the comment of Hairywill, I might wait a bit for testing.
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

new gmount gmnt gumnt scripts

#9 Post by willhunt »

Hairy and anyone else if I could trouble you again to try these new
script I think I have it more to what you where thinking still working
on the loop problem and the mkpupsave also but these seem to
be working great for me at least :shock:

gmount

Code: Select all

#!/bin/sh
#gmount
cd /root/my-roxapps/vdisktool
FILE=`Xdialog --title "Please choose image file" --fselect / 28 58 2>&1`

case $? in
	0)
		/root/my-roxapps/vdisktool/gmnt "$FILE";;
	1)
		echo "Cancel pressed.";;
	255)
		echo "Box closed.";;
esac
gmnt

Code: Select all

#!/bin/sh
#gmnt
FILE="$1"
filext=`echo "$1" | sed "s/.*\(iso\)$/ISO/"`
if [ "$filext" == "ISO" ];then
  mkdir /mnt/${FILE##/*/}
  mount -r -t iso9660 -o loop "$1" /mnt/${FILE##/*/}
/root/my-roxapps/vdisktool/gumnt /mnt/${FILE##/*/} &
rox /mnt/${FILE##/*/}
  exit 0;
fi

filext=`echo "$1" | sed "s/.*\(2fs\)$/2FS/"`
if [ "$filext" == "2FS" ];then
mkdir /mnt/${FILE##/*/}
mount -t ext2 -o loop "$1" /mnt/${FILE##/*/}
/root/my-roxapps/vdisktool/gumnt /mnt/${FILE##/*/} &
rox /mnt/${FILE##/*/}
  exit 0;
fi

filext=`echo "$1" | sed "s/.*\(sfs\)$/SFS/"`
if [ "$filext" == "SFS" ];then
mkdir /mnt/${FILE##/*/}
mount -r -t squashfs -o loop "$1" /mnt/${FILE##/*/}
/root/my-roxapps/vdisktool/gumnt /mnt/${FILE##/*/} &
rox /mnt/${FILE##/*/}
  exit 0;
fi
filext=`echo "$1" | sed "s/.*\(3fs\)$/3FS/"`
if [ "$filext" == "3FS" ];then
mkdir /mnt/${FILE##/*/}
mount -t ext3 -o loop "$1" /mnt/${FILE##/*/}
/root/my-roxapps/vdisktool/gumnt /mnt/${FILE##/*/} &
rox /mnt/${FILE##/*/}
  exit 0;
fi
gumnt

Code: Select all

#!/bin/sh
#gumnt
export gumnt="
  <hbox>
	<text>       
	<label> unmount $1</label>
	</text>
  <button>     
  <input file>/root/my-roxapps/vdisktool/hd16r.xpm</input>
       <action>umount $1</action>
       <action>rox -D $1</action>
       <action>rmdir $1</action>
       <action>EXIT=EXIT</action>
     </button>
  </hbox>
"
gtkdialog --program gumnt
unset gumnt
Last edited by willhunt on Fri 22 Jun 2007, 02:19, edited 1 time in total.
[url=http://hostfile.org/icepak.pet]176 Icewm Themes :!:[/url]
[url=http://tinyurl.com/39fl3x]vlc-0.8.6c-i586.pet[/url]
[url=http://tinyurl.com/2q7cbp]vlc-0.8.6c-i586.pet[/url]

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#10 Post by HairyWill »

much more useful and serves the majority of situations in which it might be used

Now because I teach programming for a living I'm going to keep complaining.

The unmount only works if you close the rox filer window first, this might be a bug or it might be a feature.
Your mountpoint naming scheme assumes I will never want to mount 2 files with the same name, what if I want to copy files from my pup_save.2fs on one partition to my pup_save.2fs on another. I'll admit this scenario is slightly contrived.

I tried mounting invalid filetypes renamed to *.sfs and got given a filer window for a new dir in /mnt I was able able to write to the directory. The unmount button did nothing. The directory did not get cleaned up on exit. You could trap this error by using the "file" command to check the validity of the file to mount.

I tried mount a valid sfs file that had been renamed to *.foo the program just exited, thats fair enough but an error message might be nice.

The above 2 points raise a question about whether you should rely on file extensions that can lie when linux contains the "file" command that gives a more reliable report on what is inside a file.

I am pleased to see that you are removing mountpoints with rmdir rather rm -r this avoids the risk of deleting the contents of a 2fs/3fs file if things go wrong.

You are creating mountpoints in /mnt IMHO /tmp would be better as any mountpoints that don't get deleted will get cleaned up on shutdown.

Hope this is helpful, keep up the good work :-)
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

#11 Post by willhunt »

complain away :lol: I'll check on the file test you mentioned but I do have
thought on the mount point instead of /mnt or /tmp if I make it /root
when I remaster everything mounted will go in the remaster good? bad?

also the scripts install into /root/my-roxapps It's my "understanding"
that it is now recomended to install to /usr/local. I've been reading again
(always a risky business :D ) and it sounds like it goes in /usr/sbin?
so where does it really go?
The unmount only works if you close the rox filer window first, this might be a bug or it might be a feature.
rox has to be closed so umount won't find the loop busy and I don't
know how to turn off the window from a script :cry:
[url=http://hostfile.org/icepak.pet]176 Icewm Themes :!:[/url]
[url=http://tinyurl.com/39fl3x]vlc-0.8.6c-i586.pet[/url]
[url=http://tinyurl.com/2q7cbp]vlc-0.8.6c-i586.pet[/url]

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#12 Post by HairyWill »

Many of my points were intended to provoke thought and not necessarily advocating one way over another
willhunt wrote:I'll check on the file test you mentioned
It doesn't really matter which way you do it as long as you are consistent and the user knows what to expect
willhunt wrote:but I do have
thought on the mount point instead of /mnt or /tmp if I make it /root
when I remaster everything mounted will go in the remaster good? bad?
If that is an intended purpose I would check that the remaster script includes files from other mounted filesystems, sometimes commands can have options that force them to stay on one filesystem.
willhunt wrote:so where does it really go?
I don't know
willhunt wrote:rox has to be closed so umount won't find the loop busy and I don't
know how to turn off the window from a script
Nor do I because each rox window is not a separate process, but you can sell this as a feature. Imagine how irritating it would be to accidently unmount an iso that you were copying files from, having to close the rox window first would help to stop this happening.

There is a problem if you accidently close the unmount window, maybe you should put this inside a loop that will reopen the window if it is closed whilst the file is still mounted.

Before anyone else says it:

I have never published a GUI application for puppy.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#13 Post by Béèm »

So I did a test also.
As far as I understand I have to create the three scripts by hand, past the content of your post in the respective script files, make them executable and start with gmount.

I then get the rox selection window, select a sfs and gmount exits.
But I see the selected file not mounted.

Did I understand correctly?
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

#14 Post by willhunt »

Beem cut and paste all files to /root/my-roxapps/vdisktool/
then make all of them excuteable
when done click gmount to run hope that helps :)

HairyWill
Many of my points were intended to provoke thought and not necessarily advocating one way over another
they did provke a lotta thought and a heck of a reading list :)
and yesI get the feature aspect of the rox issue :lol:
Before anyone else says it:
I have never published a GUI application for puppy.
Cool thats the whole idea users helping other users to make puppy more usefull "fun" and heck I have never wrote nothing till now :oops:
[url=http://hostfile.org/icepak.pet]176 Icewm Themes :!:[/url]
[url=http://tinyurl.com/39fl3x]vlc-0.8.6c-i586.pet[/url]
[url=http://tinyurl.com/2q7cbp]vlc-0.8.6c-i586.pet[/url]

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#15 Post by Béèm »

Willhunt,
That's what I did.
The referenced code for gmount in gmount, the referenced code for gmnt in gmnt and the referenced for gumnt in gumnt by copy/paste.
The files were made executable.
gmount did execute, the file to mount was selected in the rox window and then gmount exited.

I didn't find where the selected file was mounted.
I didn't get the panel with the two entries either as shown in on of the first post in this thread.

From the conversation I got the impression, that it wasn't needed to install vdt-.03.pet due to the unpacking error, right?
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#16 Post by HairyWill »

willhunt wrote:rox has to be closed so umount won't find the loop busy and I don't know how to turn off the window from a script :cry:
Now I know the answer. Barry put a solution to this in his modifications to Sunburnts's filemnt. The answer is ......

Code: Select all

rox -D path-to-directory
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

#17 Post by willhunt »

thankyou very much I just got it and have not had time to read it
I'm still working on the loop part
[url=http://hostfile.org/icepak.pet]176 Icewm Themes :!:[/url]
[url=http://tinyurl.com/39fl3x]vlc-0.8.6c-i586.pet[/url]
[url=http://tinyurl.com/2q7cbp]vlc-0.8.6c-i586.pet[/url]

User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

#18 Post by willhunt »

Upddated the pet file please try it beem it should work for you now
I hope..maybe :wink:
[url=http://hostfile.org/icepak.pet]176 Icewm Themes :!:[/url]
[url=http://tinyurl.com/39fl3x]vlc-0.8.6c-i586.pet[/url]
[url=http://tinyurl.com/2q7cbp]vlc-0.8.6c-i586.pet[/url]

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#19 Post by Béèm »

Thank you, downloaded and instaled.
I have now 3 additions in the file menu, gmount, make virtual drive and vdisktool.

Can they all three be used independently?

I still try to figure out how it works.

But I got a problem already.

When vdisktools has been overlayed by another program, it's window isn't refreshed an the window can't even be closed. Kill is the only solution. See pic:
Attachments
vdisktool-freeze.png
(9.45 KiB) Downloaded 717 times
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

#20 Post by willhunt »

Beem first use make a virtual disk to create one.
you may create it any where you like but once created it must go into the
/mnt/home folder it is called /mnt/home/new_save.2fs for vdisk 1 and
/mnt/home/new_save1.2fs for vdisk2 both must reside in mnt/home now all the
buttons should work fine for you.

Now you can click the check mark icon before you mount your "vdisk" and it
will be check for errors and repaired to accomplish this the Force option is
used so it is VERY importent they are not mounted when this is done!
Click the green disk icon to mount your vdrive mount point is /mnt/vdisk1 or
/mnt/vdisk2 you can now click the folder icon and a rox window will open
(you must close this before the disk will unmount) if the file is new you
should just see /lost+found dir. The green sfs button squashes your
new_save.2fs to new_save.sfs. Hammer makes new vdisk.

An example of using it with gmount

use gmount to mount your fav sfs copy copy all the files to your vdisk umount
your sfs click the magnifying glass to see how much room you got left take
your fav pet package convert pet2tgz nameof.pet then just untar them to
/mnt/vdisk1 when it all looks right to you just hit the SFS button rename
your new_save.sfs file to *_2xx.sfs Shazam! your new custom sfs file loads
at boot

remember you can only use 4 loops outta the box I read where wdef posted you
can make more nodes but I personally do not know about it.

Code: Select all

mknod /dev/loop7 b: 7 7
I'm working on several "goodies" like error checking, the encryption button
and automagically finding files on mounted partitions but i'm still having
trouble with find :lol:
find ./ -name '*.?fs' -fprint /tmp/foundfslist.$$
works any know how to make xdialog use it in the menubox?
[url=http://hostfile.org/icepak.pet]176 Icewm Themes :!:[/url]
[url=http://tinyurl.com/39fl3x]vlc-0.8.6c-i586.pet[/url]
[url=http://tinyurl.com/2q7cbp]vlc-0.8.6c-i586.pet[/url]

Post Reply