On 12/03/2008, Jeff Dike <[EMAIL PROTECTED]> wrote: > On Wed, Mar 12, 2008 at 08:00:10PM +0100, Flavio wrote: > > So, here's what I was trying to do: binding the /dev/cdrom with the > > /dev/ubd2 virtual device, passing the ubd2=/dev/cdrom in the command > > line kernel option (no cd-rom inserted up to here). > > Once UML has finished to boot I do 'eject /dev/ubd2' to cause the > > cd-rom reader opening. > > I get the following message: > > ~# eject /dev/ubd2 > > eject: unable to open `/dev/ubd2' > > > Can you strace eject to see exactly what's happening? > > > > If that is impossible I can understand security reasons. > > > This should work (modulo eject needing an ioctl passed down to the > host device). If it doesn't, it's a bug. First of all, thank you so much Jeff, I appreciate your support very much. Maybe I wasn't clear during my problem explanation. Consider two different scenarios: 1) If I run UML using the following command line linux ubd0=rootfs.debian.etch ubd1=swapfs.debian ubd2=/dev/cdrom eth0=tuntap,,,192.168.1.100 mem=512M and we have no disk inside the cd-rom reader, thus I get the following error:
DebianUM:~# dmesg|grep cdrom Kernel command line: ubd0=rootfs.debian.etch ubd1=swapfs.debian ubd2=/dev/cdrom eth0=tuntap,,,192.168.1.101 mem=512M root=98:0 Couldn't open "/dev/cdrom", errno = 123 Then, the /dev/ubdc node has not been created at all. 2) If I run UML using the same command line above, but we have a cd-rom inside the cd reader this time, so we have no errors reported in the case 1. For example, I've just inserted a dvd-rom in my reader and booted UML (using the command above). This is the output from dmesg: DebianUM:~# dmesg|grep cdrom Kernel command line: ubd0=rootfs.debian.etch ubd1=swapfs.debian ubd2=/dev/cdrom eth0=tuntap,,,192.168.1.101 mem=512M root=98:0 In that case, the /dev/ubd2 node has been created. OK.. Now suppose you are in the case 2: 2.1) If I change CD-ROM and I try to mount it, I have no problem. It's all OK. 2.2) If I have a CD-ROM inside the reader (and also mounted) and I try to do 'eject /dev/ubd2' this is the result: DebianUM:~# eject /dev/ubd2 not an sg device, or old sg driver eject: unable to eject, last error: Invalid argument If you really need the strace of 'eject /dev/ubd2', I'll do that. Note that, in the scenario 1, that isn't needed since the /dev/ubd2 node is not being created. Thank you, Flavio > > > Jeff > > -- > Work email - jdike at linux dot intel dot com > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ User-mode-linux-user mailing list User-mode-linux-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user