Author |
Message |
mistfire
Joined: 04 Nov 2008 Posts: 1272 Location: PH
|
Posted: Tue 06 Jun 2017, 09:00 Post subject:
Disk Image Creator Subject description: Simple disk image creator |
|
This is a simple disk image creator. It can be format to vfat, ntfs, ext2, ext3, and ext4
Description |
|
Filesize |
22.8 KB |
Viewed |
625 Time(s) |

|
Description |
|

Download |
Filename |
image-file-creator-1.0.pet |
Filesize |
1.35 KB |
Downloaded |
263 Time(s) |
|
Back to top
|
|
 |
musher0
Joined: 04 Jan 2009 Posts: 14529 Location: Gatineau (Qc), Canada
|
Posted: Tue 06 Jun 2017, 11:01 Post subject:
|
|
Hi mistfire.
Nice coding.
But what is the benefit of having an "img" file as compared to a "sfs" file
or regular zip or tar.gz files?
I know that "img" files are used by Macs. But what else?
Thanks in advance.
_________________ musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
|
Back to top
|
|
 |
mistfire
Joined: 04 Nov 2008 Posts: 1272 Location: PH
|
Posted: Tue 06 Jun 2017, 11:23 Post subject:
|
|
image file creates a writable disk image. compared to sfs which is read-only. I used writable ext3 image as a working space for modifying linux files which requires linux partition. Which means you can modify or put some files on it while the image file is mounted like pupsave
|
Back to top
|
|
 |
musher0
Joined: 04 Jan 2009 Posts: 14529 Location: Gatineau (Qc), Canada
|
Posted: Tue 06 Jun 2017, 11:52 Post subject:
|
|
Hello mistfire.
I didn't know that. Interesting. Thank you for the information.
Have a great day!
_________________ musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
|
Back to top
|
|
 |
backi
Joined: 27 Feb 2011 Posts: 1847 Location: GERMANY
|
Posted: Wed 07 Jun 2017, 08:40 Post subject:
|
|
Hi !
Yes indeed .......interesting .....
|
Back to top
|
|
 |
musher0
Joined: 04 Jan 2009 Posts: 14529 Location: Gatineau (Qc), Canada
|
Posted: Wed 07 Jun 2017, 11:58 Post subject:
|
|
Hello again, mistfire and baki.
You are giving me ideas...
Am I right to suppose that
-- you can have / modify any part of the Linux hierarchy of directories in a
mounted img file?
If so, that would be great for building / remastering / prototyping a Puppy in
real time.
Assuming that, once you have finished, you can write back this img file to
some directory and create an sfs file from that dir,
OR
convert this img file directly to an adrv_xyz.sfs, for example?
Can this be done? TIA.
BFN.
_________________ musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
|
Back to top
|
|
 |
slavvo67
Joined: 12 Oct 2012 Posts: 1617 Location: The other Mr. 305
|
Posted: Wed 07 Jun 2017, 20:05 Post subject:
|
|
Works nice and quickly. It would be nice if you added a mount utility so make this a one-stop shop.
Also, I had to change line 51 and line 55 for quirky to:
51. yad --text="Success!" info "$IMGPATH has been created"
55. yad --text="Error!" error "$errmsg"
|
Back to top
|
|
 |
mistfire
Joined: 04 Nov 2008 Posts: 1272 Location: PH
|
Posted: Wed 07 Jun 2017, 21:02 Post subject:
|
|
@musher0 mounted img file is very usable on remastering puppy with this scenario:
* Remastering puppy by extracting and editing the contents of sfs file but you have no ext partition and you have a limited space on your save file. By creating ext img file on the mounted vfat or ntfs partition and mounting the img file, you can now extract the sfs file and modify it.
* You cannot convert disk image file to sfs file. Just mount the image file and issue mksquashfs command to the directory where the disk image is mounted
@slavvo image mounting can be done using filemnt
|
Back to top
|
|
 |
musher0
Joined: 04 Jan 2009 Posts: 14529 Location: Gatineau (Qc), Canada
|
Posted: Wed 07 Jun 2017, 21:21 Post subject:
|
|
@mistfire:
Do you mean that an img file cannot be mounted on an ext2, 3 or 4
partition? Am I understanding this correctly?
TIA.
_________________ musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
|
Back to top
|
|
 |
nic007

Joined: 13 Nov 2011 Posts: 3187 Location: Cradle of Humankind
|
Posted: Wed 07 Jun 2017, 22:33 Post subject:
|
|
In the past I used a fake savefile to do remasters on a FAT partition. I created a "permanent" savefile of about 1GB which would then be mounted whenever a linux workspace was required. What benefits would there be using an img file instead?
|
Back to top
|
|
 |
mistfire
Joined: 04 Nov 2008 Posts: 1272 Location: PH
|
Posted: Thu 08 Jun 2017, 01:07 Post subject:
|
|
@musher0 img file can mount on ext partition. Its your style, choice, and move how to use img that file.
Also using tool can be make disk image file for qemu virtual machine.
|
Back to top
|
|
 |
mistfire
Joined: 04 Nov 2008 Posts: 1272 Location: PH
|
Posted: Thu 08 Jun 2017, 01:09 Post subject:
|
|
nic007 wrote: | In the past I used a fake savefile to do remasters on a FAT partition. I created a "permanent" savefile of about 1GB which would then be mounted whenever a linux workspace was required. What benefits would there be using an img file instead? |
I noticed that 2fs, 4fs, 3fs, and img are the same disk image. This tools will make a disk image and use it right away after its created.
|
Back to top
|
|
 |
slavvo67
Joined: 12 Oct 2012 Posts: 1617 Location: The other Mr. 305
|
Posted: Thu 08 Jun 2017, 16:51 Post subject:
|
|
I'm sorry but I'm a little confused. I know the img file is written in the root directory but how are you pointing to what the .img file should contain? Is it an .img of your current running system or do you need to run the program out of the directory where you want an .img to be created? If it's just creating a blank .img file, then we need to mount it and add things.
I read that mounting it is a bit more challenging as you need to determine the start and ending block.... Don't we have a pup utility that takes care of this?
Anyway, I find this nice and fast but I don't know how to use the final .img
|
Back to top
|
|
 |
mistfire
Joined: 04 Nov 2008 Posts: 1272 Location: PH
|
Posted: Thu 08 Jun 2017, 21:02 Post subject:
|
|
@slavvo67 disk image creator creates an empty formatted image file. It depends on you what contents do you want to put in the image file.
|
Back to top
|
|
 |
slavvo67
Joined: 12 Oct 2012 Posts: 1617 Location: The other Mr. 305
|
Posted: Thu 08 Jun 2017, 21:04 Post subject:
|
|
Okay, it looks like I'm answering my own questions.
The below mounts if it's fat or change msdos to ext2, 3, 4.
rw is for read/write
image.img is the image file name
/mnt/sdc1 is where you are mounting to or any /mnt/sd....
mount -t msdos -o loop,rw image.img /mnt/sdc1
Of course, need to unmount when done:
umount /mnt/sdc1
|
Back to top
|
|
 |
|