How to convert .tgz to .img ?
I have a file (.tgz) which is meant to be simply copied to a floppy disc.
I donīt have a floppy disc, so I would like to convert the file to a .img file, so that it looks like a floppy disc but is on my hard drive. How do I do this? I have looked quite a lot. Surely there is some application that does it easily. (In case it helps, this is for installation of Basic Linux, which comes on two floppy discs with ms-dos file systems. |
The dd command can do this. Though .tgz indicates it's a compressed archive. Are you sure you don't want whatever is in the archive?
Anyway, it would be something like Code:
dd if=/path/to/input/file.tgz of=/path/to/output/file.img |
Thank you! I got some output:
Quote:
How do I get that file? Are you sure you don't want whatever is in the archive? I am not exactly sure, but I think it will be ok as it is. |
What output directory did you put in the command?
|
Quote:
Unfortunately, it still wonīt work, as it seems my problem is a bit more complicated: the .img file isnīt of use as it didnīt have a DOS file system on it. I think i need to create a .img file, mount it, put a dos file system on it, copy over the file, unmount it. That is my guess. I donīt know whether that is correct, or how to do it. Also, I dont think this process I suggested will actually leave me a .img file in my folder as required. I tried doing something like this before but it didnt work. One thing is that nautilus cant handle places - there was some error message with this. I hope you can still help! Thank you! :) |
Perhaps you can tell us more about the file? What is it exactly? Where did you get it?
|
I am almost certain the file is an archive containing the image, else why would it be called ".tgz"?
|
It is a Basic Linux set up download.
The download is meant to produce stuff for two floppy discs. I wont be using floppys - I will be doing it all from a hard disk using a virtual machine. |
Perhaps the archive contains two images — one for each floppy?
And no, putting files in a compressed archive is not at all like sticking them together. |
I just checked. Yes, there is already an image file in the archive. That is what you want to use as the image file for VirtualBox.
The readme included in the archive is as follows: Quote:
|
I need the .img file that comes with the download for sure. The good thing about it is that it works well as it is on the hard disk. I donīt have to change it. It is the first ĻfloppyĻ. (How I wish the second floppy were like this format!)
There are two floppys needed though. Launching that first .img file runs well but then it says insert the second floppy. It is this second floppy with which I am having trouble, because it isnīt a .img file. It is a .tgz file. I have tried unpacking the .tgz file in the hope that it is a .img. It does not unpack to a .img. I need to somehow get that DISK2.TGZ put onto a a DOS file system floppy .img file. Please help! :) |
You are supposed to copy disk2.tgz onto the second floppy as a normal file, it is not an image.
|
Quote:
So, could somebody tell me how I could create a .img file that looks like a DOS floppy disc that has had the DISK2.TGZ file moved onto it? I hope so! :) |
You're doing this in a virtual machine, right?
If you're trying to fake a real computer having a floppy drive, I doubt it's possible. Anyway, I don't know how to make an image of a DOS floppy and copy stuff to it. |
Quote:
Quote:
I have tried to follow these instructions: Quote:
|
All times are GMT -5. The time now is 09:32 AM. |