Mount /dev/cdrom to file - Suse

This is a discussion on Mount /dev/cdrom to file - Suse ; Just a small question: Is it possible to mount a disk-device (/dev/cdrom) to a file instead of a path? now: "/dev/cdrom" -> "/media/cdrom" i want: "/dev/cdrom" -> "/media/cdrom.iso" or similar Thank you. S.H....

+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 20 of 34

Thread: Mount /dev/cdrom to file

  1. Mount /dev/cdrom to file

    Just a small question:

    Is it possible to mount a disk-device (/dev/cdrom) to a file instead of a
    path?

    now: "/dev/cdrom" -> "/media/cdrom"
    i want: "/dev/cdrom" -> "/media/cdrom.iso" or similar

    Thank you.

    S.H.



  2. Re: Mount /dev/cdrom to file

    SH wrote:
    >
    >
    > Just a small question:
    >
    > Is it possible to mount a disk-device (/dev/cdrom) to a file instead of a
    > path?


    Why?

    > now: "/dev/cdrom" -> "/media/cdrom"
    > i want: "/dev/cdrom" -> "/media/cdrom.iso" or similar


    With Linux there is not so much difference between a file and a path.
    The standard name is indeed /media/cdrom, but you can name it obviously
    anything you desire.

    But again, why? I have learned that the easiest way in the long run is
    to just accept how things are. They are thought of by people who have
    more experience then I have.

    The moment I am able to change things without asking, I, most of the
    time know why those people did it the way they did it. Sometimes I still
    change it and then learn it the hard way and very seldom I think I am
    right.

    What I do then is file a bigreport, so the standard way of doing it is
    changed.

    So before I tell how, I would love to see why. Probably you have an
    issue that can be solved in an other matter.

    houghi
    --



    This space left blank intentionaly

  3. Re: Mount /dev/cdrom to file

    "SH" writes:

    >Just a small question:


    >Is it possible to mount a disk-device (/dev/cdrom) to a file instead of a
    >path?


    >now: "/dev/cdrom" -> "/media/cdrom"
    >i want: "/dev/cdrom" -> "/media/cdrom.iso" or similar


    Why?




  4. Re: Mount /dev/cdrom to file

    On November 4, 2008 16:20, in alt.os.linux.suse, SH
    (trash_mail_account@web.de) wrote:

    > Just a small question:
    >
    > Is it possible to mount a disk-device (/dev/cdrom) to a file instead of a
    > path?


    No, and yes.

    No, you cannot /mount/ a block special file such as /dev/cdrom to a file.
    Devices such as /dev/cdrom are data sources, not mountpoints.

    Yes, you can /access/ a block special file as a file. Devices such
    as /dev/cdrom can be read and written directly, without being mounted.
    For example,
    dd if=/dev/cdrom of=/tmp/contents_of_cdrom.iso bs=1024
    will perform a bit-for-bit copy of the contents of the CDROM currently
    sitting (not mounted) in the /dev/cdrom device to a flat file called
    contents_of_cdrom.iso

    Yes, you can /mount/ a flat file in place of a block special file. Files
    such as cdrom.iso can be mounted as if they were devices.
    For example
    mount -t iso9660 -o loop /tmp/contents_of_cdrom.iso /media/cdrom
    will mount the file contents_of_cdrom.iso onto the mountpoint /media/cdrom

    > now: "/dev/cdrom" -> "/media/cdrom"
    > i want: "/dev/cdrom" -> "/media/cdrom.iso" or similar


    See my point about mounting a flat file, above

    --
    Lew Pitcher

    Master Codewright & JOAT-in-training | Registered Linux User #112576
    http://pitcher.digitalfreehold.ca/ | GPG public key available by request
    ---------- Slackware - Because I know what I'm doing. ------



  5. Re: Mount /dev/cdrom to file

    Well, I don't want to mount an iso to a mountpoint.

    Scenario:

    - Video-DVD in /dev/cdrom
    - Samba-Share on Mountpoint for Windows-HTPC does not work because of CSS
    protection
    - dvdreadfs with fuse to Samba-Share works, but is too slow and sometimes
    stops while playing the movie on tv
    - Samba-Share of the iso-File of the DVD and mount it for example with
    "Alcohol 120%" on the Windows-machine _could_ work
    - for that, i need the iso/image to be read "on the fly"
    - LAN is 100mbit, so should be fast enough



    S.H.



  6. Re: Mount /dev/cdrom to file

    SH wrote:
    > Well, I don't want to mount an iso to a mountpoint.
    >
    > Scenario:
    >
    > - Video-DVD in /dev/cdrom
    > - Samba-Share on Mountpoint for Windows-HTPC does not work because of CSS
    > protection
    > - dvdreadfs with fuse to Samba-Share works, but is too slow and sometimes
    > stops while playing the movie on tv
    > - Samba-Share of the iso-File of the DVD and mount it for example with
    > "Alcohol 120%" on the Windows-machine _could_ work
    > - for that, i need the iso/image to be read "on the fly"
    > - LAN is 100mbit, so should be fast enough


    I would consider using VLC to stream the movie to the Windows box instead.

  7. Re: Mount /dev/cdrom to file

    SH schrieb:

    > Well, I don't want to mount an iso to a mountpoint.
    >
    > Scenario:
    >
    > - Video-DVD in /dev/cdrom
    > - Samba-Share on Mountpoint for Windows-HTPC does not work because of CSS
    > protection
    >

    CSS is working on the drive, not with the PC. The sectors are scrambled
    until the player has identified itself against the drive. Try yourself.
    Mount a DVD-Video and try to read a file simply by "cat". It will fail.
    Check dmesg to get some more insight.

    Now try a dvd playing application like mplayer (with internal libdvdcss).
    Stop mplayer, do not umount the drive. Now you cat use "cat" on the files
    on the disc or on the raw device, too.

    Mounting the files will not help regardless of that. DVD menu structures use
    disc-relative sector numbers, not file-relative. So the player application
    needs a disc image in any case.


    Just rip the entire image with

    # cat /dev/cdrom >my_dvd.iso

    You can safely do this even if the device is mounted, as it is read-only.
    And remember: Before, you have to play at least some seconds of the disc
    with mplayer to get rid of stupid CSS.

    Kind regards

    Jan


  8. Re: Mount /dev/cdrom to file

    That sounds like... A lot of manual work to do, before i can watch a
    movie...
    The problem is, the Linux-Machine has no screen. I have no possibility to
    "watch a few seconds".
    Additionally, that should work automated: Insert disk in Linux-Server, watch
    the movie on the HTPC (that has no optical drive, because it's so small).



  9. Re: Mount /dev/cdrom to file

    SH wrote:
    > That sounds like... A lot of manual work to do, before i can watch a
    > movie...



    Could you please start to quote what you are replying to? Makes it
    easier to help.

    houghi
    --



    This space left blank intentionaly

  10. Re: Mount /dev/cdrom to file

    SH schrieb:

    > That sounds like... A lot of manual work to do, before i can watch a
    > movie...
    > The problem is, the Linux-Machine has no screen. I have no possibility to
    > "watch a few seconds".
    >

    Huh?

    mplayer -vo null -ao null -frames 10 dvd://

    will do the trick.


    > Additionally, that should work automated: Insert disk in Linux-Server,
    > watch the movie on the HTPC (that has no optical drive, because it's so
    > small).
    >

    Write an udev rule that checks if the inserted disk is a DVD-Video and
    starts a script with the above mplayer line and a

    dd if=/dev/cdrom of=/tmp/dvd.iso bs=1M

    afterwards. Dumping the dvd should go in about 10..20 minutes depending on
    your dvd drive. After that, the iso is ready to play.

    Kind regards

    Jan

  11. Re: Mount /dev/cdrom to file

    On Tue, 04 Nov 2008 22:20:35 +0100, SH typed this message:

    > Just a small question:
    >
    > Is it possible to mount a disk-device (/dev/cdrom) to a file instead of
    > a path?
    >
    > now: "/dev/cdrom" -> "/media/cdrom"
    > i want: "/dev/cdrom" -> "/media/cdrom.iso" or similar
    >
    > Thank you.
    >
    > S.H.


    IIUC from your replies you want to have the /dev/cdrom mounted as a file
    or something that can accessed remotely to watch videos?

    ISOs are easy sudo mount -o loop -t iso9660 /dev/cdrom /folder

    As would be using ln -s /dev/cdrom /folder

    The problem is accessing the /folder, not sure if NFS would see the
    linked /folder, but Samba clients would definitely see Samba Server
    shared folders. Then there's name changes that mplayer would need to
    use, ie, /dev/cdrom/"this movie"


    I think if your non-optical device remote PC is the NFS Server then share
    a folder to the optical device enabled local PC. Then mount the optical
    device as a folder on the NFS Server share.

    nfs client:-> ln -s /dev/cdrom /nfsserver/nfs/folder

    nfs server:-> mplayer dvd://nfs/folder

    Sorry, I can't be more specific but I haven't had to do anything like
    that in quite a few years.




  12. Re: Mount /dev/cdrom to file

    Thank you for your help, but it's a Windows machine.
    Seems, as if there's no real solution fr my problem.

    S.H.



  13. Re: Mount /dev/cdrom to file

    > 10..20 minutes

    Haha. ;-)


    S.H.



  14. Re: Mount /dev/cdrom to file

    > Could you please start to quote what you are replying to? Makes it
    > easier to help.



    Can't you see the post I replied to? Sorry. In Outlook Express (uarghs) it
    would be obvious. :-P


    S.H.



  15. Re: Mount /dev/cdrom to file

    SH wrote:
    > Can't you see the post I replied to? Sorry. In Outlook Express (uarghs) it
    > would be obvious. :-P


    With Linux not everybody reads news in the same way. Not everybody uses
    the same program. For that reason the best way is not to asume how
    people read news, but instead follow the standard rules of inline
    quoting. That also shows you take sme effort and that in itself is an
    incentive to help (at least for me)

    And yes, I could see the message you replied to, but why must *I* do the
    effort and what if that previous message never arrived?

    There are reasons for correct quoting.

    houghi
    --
    Come to think of it, there are already a million monkeys on a million
    typewriters, and Usenet is NOTHING like Shakespeare.
    -- Blair Houghton

  16. Re: Mount /dev/cdrom to file

    "SH" writes:

    >Thank you for your help, but it's a Windows machine.
    >Seems, as if there's no real solution fr my problem.


    ??? Windows has no /dev/cdrom.

    And why are you asking in alt.os.linux.suse about a Windows machine?



  17. Re: Mount /dev/cdrom to file

    On Wednesday, November 5th, 2008 at 21:53:30h +0100, SH despaired:
    > Thank you for your help, but it's a Windows machine.
    > Seems, as if there's no real solution für my problem.


    Maybe I missing something in the details, but how about
    SAMBA share the /dev/dvd device and on the Windoze machine
    point the DVD player to the network device?

  18. Re: Mount /dev/cdrom to file

    SH wrote:
    > Thank you for your help, but it's a Windows machine.
    > Seems, as if there's no real solution für my problem.


    You didn't even reply to my post saying that I recommend VLC to stream
    the video.

  19. Re: Mount /dev/cdrom to file

    > Maybe I missing something in the details, but how about
    > SAMBA share the /dev/dvd device and on the Windoze machine
    > point the DVD player to the network device?


    Because CSS will block that.

    S.H.



  20. Re: Mount /dev/cdrom to file

    > You didn't even reply to my post saying that I recommend VLC to stream
    > the video.


    That's no overall solution. Sorry. I just wanted to ask, if there's a
    "simple" and automated way to get the CD/DVD-Images to my Windows-Machine.
    But it seems hat buying a USB-CD/DVD-Device would be the easier way. Sad.

    S.H.



+ Reply to Thread
Page 1 of 2 1 2 LastLast