| Author |
Message |
willhunt

Joined: 05 Oct 2005 Posts: 495
|
Posted: Mon 18 Jun 2007, 01:29 Post subject:
Vdisktool testers please Subject description: virtual disk tool and gmount mounts iso,2fs,sfs,3fs |
|
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
| Description |
read more got rid of bunch of stuff fixed a bunch still along way to go
|

Download |
| Filename |
vdisktool.pet |
| Filesize |
8.63 KB |
| Downloaded |
507 Time(s) |
_________________ 176 Icewm Themes
vlc-0.8.6c-i586.pet
vlc-0.8.6c-i586.pet
Last edited by willhunt on Sun 24 Jun 2007, 19:40; edited 9 times in total
|
|
Back to top
|
|
 |
muggins
Joined: 20 Jan 2006 Posts: 6660 Location: lisbon
|
Posted: Mon 18 Jun 2007, 02:36 Post subject:
|
|
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.
|
|
Back to top
|
|
 |
willhunt

Joined: 05 Oct 2005 Posts: 495
|
Posted: Mon 18 Jun 2007, 03:31 Post subject:
|
|
Thanks muggins missed that
new version for testing
_________________ 176 Icewm Themes
vlc-0.8.6c-i586.pet
vlc-0.8.6c-i586.pet
|
|
Back to top
|
|
 |
willhunt

Joined: 05 Oct 2005 Posts: 495
|
Posted: Tue 19 Jun 2007, 23:33 Post subject:
posted update |
|
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 !
_________________ 176 Icewm Themes
vlc-0.8.6c-i586.pet
vlc-0.8.6c-i586.pet
|
|
Back to top
|
|
 |
HairyWill

Joined: 26 May 2006 Posts: 2949 Location: Southampton, UK
|
Posted: Wed 20 Jun 2007, 04:45 Post subject:
|
|
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
_________________ Will
contribute: community website, screenshots, puplets, wiki, rss
Last edited by HairyWill on Wed 20 Jun 2007, 07:30; edited 1 time in total
|
|
Back to top
|
|
 |
Béèm

Joined: 21 Nov 2006 Posts: 11782 Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
|
Posted: Wed 20 Jun 2007, 06:37 Post subject:
|
|
I like little tools which make life easier but 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).
Consult Wikka
Use peppyy's puppysearch
|
|
Back to top
|
|
 |
willhunt

Joined: 05 Oct 2005 Posts: 495
|
Posted: Wed 20 Jun 2007, 08:27 Post subject:
|
|
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 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
_________________ 176 Icewm Themes
vlc-0.8.6c-i586.pet
vlc-0.8.6c-i586.pet
|
|
Back to top
|
|
 |
Béèm

Joined: 21 Nov 2006 Posts: 11782 Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
|
Posted: Wed 20 Jun 2007, 18:36 Post subject:
|
|
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).
Consult Wikka
Use peppyy's puppysearch
|
|
Back to top
|
|
 |
willhunt

Joined: 05 Oct 2005 Posts: 495
|
Posted: Thu 21 Jun 2007, 01:55 Post subject:
new gmount gmnt gumnt scripts |
|
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
gmount
| Code: |
#!/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: |
#!/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: |
#!/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
|
_________________ 176 Icewm Themes
vlc-0.8.6c-i586.pet
vlc-0.8.6c-i586.pet
Last edited by willhunt on Thu 21 Jun 2007, 22:19; edited 1 time in total
|
|
Back to top
|
|
 |
HairyWill

Joined: 26 May 2006 Posts: 2949 Location: Southampton, UK
|
Posted: Thu 21 Jun 2007, 03:32 Post subject:
|
|
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: community website, screenshots, puplets, wiki, rss
|
|
Back to top
|
|
 |
willhunt

Joined: 05 Oct 2005 Posts: 495
|
Posted: Thu 21 Jun 2007, 11:16 Post subject:
|
|
complain away 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 ) and it sounds like it goes in /usr/sbin?
so where does it really go?
| Quote: |
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
_________________ 176 Icewm Themes
vlc-0.8.6c-i586.pet
vlc-0.8.6c-i586.pet
|
|
Back to top
|
|
 |
HairyWill

Joined: 26 May 2006 Posts: 2949 Location: Southampton, UK
|
Posted: Thu 21 Jun 2007, 12:11 Post subject:
|
|
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: community website, screenshots, puplets, wiki, rss
|
|
Back to top
|
|
 |
Béèm

Joined: 21 Nov 2006 Posts: 11782 Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
|
Posted: Thu 21 Jun 2007, 12:23 Post subject:
|
|
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).
Consult Wikka
Use peppyy's puppysearch
|
|
Back to top
|
|
 |
willhunt

Joined: 05 Oct 2005 Posts: 495
|
Posted: Thu 21 Jun 2007, 19:24 Post subject:
|
|
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
| Quote: |
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
| Quote: |
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
_________________ 176 Icewm Themes
vlc-0.8.6c-i586.pet
vlc-0.8.6c-i586.pet
|
|
Back to top
|
|
 |
Béèm

Joined: 21 Nov 2006 Posts: 11782 Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win
|
Posted: Thu 21 Jun 2007, 19:39 Post subject:
|
|
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).
Consult Wikka
Use peppyy's puppysearch
|
|
Back to top
|
|
 |
|