LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 04-08-2009, 07:40 AM   #1
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,058

Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
How to create a "fixed-space"-a folder that is EXT2 inside and whatever size-50MB?


I know Puppy does this when it installs frugal-install and Slax/Wolvix have the Slax-save which creates a folder of varying size-but how do I do it-and make it either dynamic or fixed size?
Is this a type of Virtual HD?
 
Old 04-08-2009, 08:21 AM   #2
GazL
Senior Member
 
Registered: May 2008
Posts: 3,380

Rep: Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913
If you mean a filesystem in a file, it sounds like you're talking about using loop devices.

You'd do it something like this

Code:
dd if=/dev/zero bs=4G of=/var/filesys_in_a_file.fs
losetup /dev/loop0 /var/filesys_in_a_file.fs
mke2fs /dev/loop0
mount /dev/loop0 /media/loopfilesys
The red bits you'd only do the once when you first create the filesystem. For mounting a loopback filesystem that you've already created there a '-o loop' option on the mount command to shortcut needing to use the losetup command.

Hope that helps...

PS. I don't know how you'd make it's size dynamic. Is it even possible?

Last edited by GazL; 04-08-2009 at 08:24 AM.
 
Old 04-08-2009, 08:33 AM   #3
linus72
Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: PocketWriter/MinimalX
Posts: 5,058

Original Poster
Rep: Reputation: 330Reputation: 330Reputation: 330Reputation: 330
I believe it may be possible-even probable-
Puppy creates a folder that is EXT2 inside when it does a frugal install, the DSL backup.tar.gz/mydsl on your HD also expands when you add to it.
The Billix-0.18 version has a "hardisk" in the Qemu folder that is 60+MB and the virtual DSL saves settings, etc to this "hd".
Slax/Wolvix have a similar saving feature-Wolvix creates a folder of 56/+MB on your USB to save to.
Anyway-when I made my latest multidistro toolkit I included DSL, and then thought about doing this stuff-now I have a CD with the DSL backup on the CD too-problem is my f*****n! PC can't write CD-RW for some reason so I can't test it!
I do believe it can be done by putting the "save" folder on the CD-RW with the OS and using the "append" line at boot to either load the saved stuff or boot fresh.
 
Old 04-08-2009, 08:47 AM   #4
GazL
Senior Member
 
Registered: May 2008
Posts: 3,380

Rep: Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913Reputation: 913
As I understand it, most of the "live" distributions normally make use of a ramdisk/tmpfs and untar the system into that, which is not quite the same thing as i was talking about. I'm not entirely sure we're talking about the same thing here. Filesystems mounted on loop devices certainly can't grow dynamically, though with a bit of hocus-pocus you could probably resize them while they're offline. It's probably help if I knew a bit more about puppy and its 'save folders' whatever they are. I'll have to do a bit of reading.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dovecot - Create new folder gives "INBOX can't be deleted" error fukawi2 Linux - Server 3 09-24-2008 03:01 AM
Squirrelmail: Query: CREATE "INBOX.Sent" Reason Given: Cannot create this folder. Chiragrs Linux - Server 2 03-10-2008 11:37 AM
create folder-hierarchy for "revolutionary" (?) incremental backup linusneumann Linux - Software 1 04-23-2007 04:20 PM
How to issue "ls" command start with the largest file size in a folder? fjkum Linux - Newbie 5 07-27-2006 03:28 AM
how can i default the max folder file size when it create inside a folder antony_csf Linux - Software 1 06-17-2004 02:26 AM


All times are GMT -5. The time now is 09:23 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration