Making a folder look like a device?
Hey everyone!
I have a .iso image that I mounted as /mnt/cdrom/ . I would like to make it look like a REAL device. (i.e have a file in /dev/) I need this for a little project im working on. I have researched :study: and googled the topic. I hope I dont appear like a :newbie: ! The command I used to mount the .ISO was... Code:
mount -r ./Toppas.iso /mnt/cdaudio -t iso9660 -o loop Code:
Filesystem 1K-blocks Used Available Use% Mounted on Thanks in advance! -Hopeless :newbie: |
using a loopback mount like you have makes it avaiable... as you know... you've already achieved what you're asking for... what else do you expect to be able to do? it's not a device, therefore has no place in /dev/
|
Quote:
|
/dev/loopX maybe?
|
Quote:
**EDIT** Also this program only takes /dev/cdaudio /dev/cdrom /dev/dvd/ and so on. The reason for me doing this is becuase I am studying CD file systems, how linux utilizes them. Id like to get it working, even if its just for five minutes like. |
a system will see it as a device... you can't yet do dynamic disk writing to UDF filesystems if that's what you're getting at...
|
Quote:
|
Quote:
|
/dev/loop won't retain any direct association or knowledge about the pretend cdrom device... i really don't see what you're trying to achieve... you can't write direct to cdrw drives anyway (without some middleware which makes it indirect...)
|
Quote:
|
You already did when you specify "mount -r ./Toppas.iso /mnt/cdaudio -t iso9660 -o loop". What it does behind the scenes. First it sets up a loop device that is not used yet using the losetup utility. Usually it will be /dev/loopX. The X could 0, 1, 2, 3, 4, etc. Next it mounts it to /mnt/cdaudio. If its a DVD image, you can use mplayer or any player. Though you will have to specify the video_ts to read from. Yes, you can write to it if it has unused space. Also you can make a disk image that contains partitions and filesystems. Then set it up as a loop device.
If you want to know more, look at the kernel source code. It will tell you everything, but a knowledge of C programming langauge is require. |
Quote:
|
All times are GMT -5. The time now is 10:17 PM. |