On Thu, Mar 13, 2008 at 12:14:12AM +0100, Flavio wrote:
> 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.

This might be a bad interaction with udev.  It looks to me like it's
scanning all the devices present on the system and creating /dev nodes
only for devices that successfully open, without considering that it
might be openable later if it isn't now.

> 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

I'll need a strace of this - maybe the ubd driver needs an ioctl
added, which is easy.  Maybe eject is trying to communicate directly
with the hardware driver, in which case, this is harder.

                          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

Reply via email to