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 Wed 26 Nov 2014, 14:47
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
Scratch File Tool
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 2 of 2 Posts_count   Goto page: Previous 1, 2
Author Message
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Mon 06 Dec 2010, 07:24    Post_subject: scratchfiles  

Hello all, scottman, amigo!

thank you all for for the great and informative replies!
A few questions come to my mind:

1) What is the main advantage to have different scratchfiles? If I need diskspace of 5G is it not sufficient to blow up the already existing puppy-savefile?

2) Is it possible to lock down the NTFS partition (i.e is it possible to have the scratchfile and savefile working, but the rest locked)?

I did some research on this topic, chmod does not work on NTFS drives in Puppy. It is probably because the basic support for file permissions is not included by default in the ntfs-3g drivers. I read about it here:
http://b.andre.pagesperso-orange.fr/permissions.html

Maybe there is another possibility or workaround I am not aware of, but if not its not a big problem.
Back to top
View user's profile Send_private_message Visit_website 
sc0ttman


Joined: 16 Sep 2009
Posts: 2386
Location: UK

PostPosted: Wed 08 Dec 2010, 05:25    Post_subject: Re: scratchfiles  

emil wrote:
1) What is the main advantage to have different scratchfiles? If I need diskspace of 5G is it not sufficient to blow up the already existing puppy-savefile?

Well, a very large pupsave file will do a similar job, but here is the benefit, for me at least...
With a scratch file, I was able to have a ext3 filesystem/partition sitting on any drive I wanted..

This was much needed, until I dug out an old 4gb ATA disk from the loft.

I was using the scratch file to store a lot of files and pets I was making (vlc-gtk, others), that required file permissions to be set correctly, so could not be stored on FAT or NTFS..

(as you mention, chmod doesn't work on ntfs, but it works inside a scratch file, on an ntfs drive...)

Also, I was able to mount this scratch file in any puppy I was using, as it was not tied to any particular install..
That was the main advantage of using a scratch file and not my save file.

Essentially, if someone needs an linux (ext2) working area that can be accessed whenever, they can either format a whole drive, or create a scratch file.

emil wrote:
2) Is it possible to lock down the NTFS partition (i.e is it possible to have the scratchfile and savefile working, but the rest locked)?

You can mount any partition as read-only, so you could mount your NTFS partition as read-only once booted into Puppy...

This should still allow you to save to your save file, even if it is on the read-only NTFS drive..

Not sure how scratch files will work in this case, haven't tested it - I need to read and write to my drives...
But there's only 1 way to find out! Smile

Sorry I can't give you any specific technical info about this!
I'm no expert myself!

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send_private_message 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Wed 08 Dec 2010, 10:52    Post_subject: thanks  

Hi scott,

Quote:
I'm no expert myself!


well, it's all relative ...

Helped me a lot. At least I think those scratchfiles can be very usefull, especially on windows only computers.

About the NTFS - have to try that, it its still possible to save into the savefile while whole partition is mounted read-only?! sounds like voodoo.

Cool big *thumbs up* emil
Back to top
View user's profile Send_private_message Visit_website 
amigo

Joined: 02 Apr 2007
Posts: 2278

PostPosted: Thu 09 Dec 2010, 04:19    Post_subject:  

I'm not sure how ntfs-3g will act if you try to write to a 'scratch' file while the partition itself is mounted read-only -sounds ike it won't work. But, I think this will:
mount the partition read-write, then use losetup to assign the scratch file to a device. Then use the '-o remount ro' option to mount to remount the partition as read-only (or maybe even unmount it) -the device created with losetup will still exist and be usable.
Back to top
View user's profile Send_private_message 
emil

Joined: 10 Nov 2009
Posts: 618
Location: Austria

PostPosted: Fri 10 Dec 2010, 03:56    Post_subject: hmm...  

Hi amigo,

thank you. That might be an important piece in my puzzle Very Happy.

I try a short summary of the paradox: How to run puppy from a NTFS disk, "but don't touch it"

1) There is the windows installer from noryb
http://www.murga-linux.com/puppy/viewtopic.php?t=61404&start=30
it could be modified, so that there is an option to use "normal" or "protected" mode ("paranoid" mode would sound good too).

"normal" mode would be like now,

"protected mode" would do a defragmentation, chkdsk and then 2 blank files would be created from windows , e.g cmd like so

Code:
fsutil file createnew C:\installdir\savefile 1024000000
fsutil file createnew C;\installdir\scratchfile.img 5G


then at first startup of puppy look if we are sitting in an NTFS partition,
If using "protected" mode, then format the 2 blank files to ext2 or ext3 like so
Code:
mke2fs -g -m 0 -F /mnt/sda1/installdir/savefile


then use the losetup like so:
Code:
losetup /dev/loop0 scratchfile.img
mount /dev/loop0 /home/you/dir


then unmount the NTFS partitions.

Have to try that (when time alows).
emil
Back to top
View user's profile Send_private_message Visit_website 
Display_posts:   Sort by:   
Page 2 of 2 Posts_count   Goto page: Previous 1, 2
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Filesystem
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.0835s ][ Queries: 13 (0.0135s) ][ GZIP on ]