Skip to contentSkip to conversation

Can not find the cdrom device in /dev/ on xen 3.0.3

DISCUSSION Liang Yang 5 participants 23 messages Dec 1, 2006

lore
Share & tools
lore

Liang Yang

author
#0 lore raw

Hello,

I just did a fresh installation of Xen 3.0.3. However, I can not find my cd-rom device under /dev/ after I booted into Xen. If I booted into Linux native (RHELAS 4.4), CD-ROM device is there and listed as /dev/cdrom. I know Xen changed the CD-ROM access mode from HVM domain. But for Xen domain0, it should still be listed as /dev/cdrom, right?

I think the driver for CD-ROM must be already loaded and it is hided by Xen somehow. I checked a Linux Server beta version which has integrated Xen on the same platform, I can find the cdrom device in /dev/. I remember Xen 3.0.2 does not have this problem either.

Could anyone share some solutions?

Thanks,

Liang

author
#1 lore raw

Can not find the cdrom device in /dev/ after booted into xen(3.0.3)

Hello,

I just did a fresh installation of Xen 3.0.3. However, I can not find my cd-rom device under /dev/ after I booted into Xen. If I booted into Linux native (RHELAS 4.4), CD-ROM device is there and listed as /dev/cdrom. I know Xen changed the CD-ROM access mode from HVM domain. But for Xen domain0, it should still be listed as /dev/cdrom, right?

I think the driver for CD-ROM must be already loaded and it is hided by Xen somehow. I checked a Linux Server beta version which has integrated Xen on the same platform, I can find the cdrom device in /dev/. I remember Xen 3.0.2 does not have this problem either.

Could anyone share some solutions?

Thanks,

Liang

#2 lore raw

RE: [Xen-users] Can not find the cdrom device in /dev/ after booted into xen(3.0.3)

Quoted 13 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Liang Yang
Sent: 01 December 2006 16:12
To: [email protected]
Cc: [email protected]
Subject: [Xen-users] Can not find the cdrom device in /dev/ after booted into xen(3.0.3)

Hello,

Quoted 9 lines

I just did a fresh installation of Xen 3.0.3. However, I can not find my
cd-rom device under /dev/ after I booted into Xen. If I booted into Linux
native (RHELAS 4.4), CD-ROM device is there and listed as /dev/cdrom. I know
Xen changed the CD-ROM access mode from HVM domain. But for Xen domain0, it
should still be listed as /dev/cdrom, right?

/dev/cdrom is a "link" to the actual /dev/[sh]d[abcd] device that is the CDROM drive. As far as I understand, it's normally created by the distributions initrd. You may be able to disassemble your distributions initrd and find the line that creates this link - but the fact is that different distributions do this slightly differently.

Much easier to just use /dev/[sh]d[abcd] for your cdrom.

--
Mats

Quoted 23 lines

I think the driver for CD-ROM must be already loaded and it is hided by Xen
somehow. I checked a Linux Server beta version which has integrated Xen on
the same platform, I can find the cdrom device in /dev/. I remember Xen
3.0.2 does not have this problem either.

Could anyone share some solutions?

Thanks,

Liang

_______________________________________________
Xen-users mailing list
[email protected]
http://lists.xensource.com/xen-users

author
#3 lore raw

Re: [Xen-users] Can not find the cdrom device in /dev/ after booted into xen(3.0.3)

Hi Mats,

Thanks for your reply. I still have two questions:
1. Your answer still does not explain why Linux native listed the CD-ROM device as /dev/cdrom while Xen Linux (using the same distribution, i.e. RHEL Server 4.4) does not.

2. If I want to install HVM Linux from CDROM instead of file image, how can I define the cdrom in .hvm file:
disk = [ 'phy:/dev/sdb,hda,w', 'phy:/dev/cdrom,hdc:cdrom,r' ] will not work as /dev/cdrom is not available. Then I tried disk = [ 'phy:/dev/sdb,hda,w', 'phy:/dev/hdc,hdc:cdrom,r' ]. It still does not work as /dev/hdc is not available either.

How can I create /dev/hdc for my cd-rom?

Regards,

Liang

----- Original Message ----- From: "Petersson, Mats" <[email protected]>
To: "Liang Yang" <[email protected]>; <[email protected]>
Cc: <[email protected]>
Sent: Friday, December 01, 2006 9:22 AM
Subject: RE: [Xen-users] Can not find the cdrom device in /dev/ after booted into xen(3.0.3)

Quoted 11 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Liang Yang
Sent: 01 December 2006 16:12
To: [email protected]
Cc: [email protected]
Subject: [Xen-users] Can not find the cdrom device in /dev/ after booted into xen(3.0.3)

Hello,

Quoted 9 lines

I just did a fresh installation of Xen 3.0.3. However, I can not find my
cd-rom device under /dev/ after I booted into Xen. If I booted into Linux
native (RHELAS 4.4), CD-ROM device is there and listed as /dev/cdrom. I know
Xen changed the CD-ROM access mode from HVM domain. But for Xen domain0, it
should still be listed as /dev/cdrom, right?

/dev/cdrom is a "link" to the actual /dev/[sh]d[abcd] device that is the CDROM drive. As far as I understand, it's normally created by the distributions initrd. You may be able to disassemble your distributions initrd and find the line that creates this link - but the fact is that different distributions do this slightly differently.

Much easier to just use /dev/[sh]d[abcd] for your cdrom.

--
Mats

Quoted 23 lines

I think the driver for CD-ROM must be already loaded and it is hided by Xen
somehow. I checked a Linux Server beta version which has integrated Xen on
the same platform, I can find the cdrom device in /dev/. I remember Xen
3.0.2 does not have this problem either.

Could anyone share some solutions?

Thanks,

Liang

_______________________________________________
Xen-users mailing list
[email protected]
http://lists.xensource.com/xen-users

#4 lore raw

Re: Re: [Xen-users] Can not find the cdrom device in /dev/ after booted into xen(3.0.3)

Quoted 8 lines · Liang Yang

2. If I want to install HVM Linux from CDROM instead of file image, how can I define the cdrom in .hvm file:
disk = [ 'phy:/dev/sdb,hda,w', 'phy:/dev/cdrom,hdc:cdrom,r' ] will not work as /dev/cdrom is not available. Then I tried disk = [ 'phy:/dev/sdb,hda,w', 'phy:/dev/hdc,hdc:cdrom,r' ]. It still does not work as /dev/hdc is not available either.

How can I create /dev/hdc for my cd-rom?

When you boot native RHEL4.4, what is /dev/cdrom a symlink to? You should try using the target of the symlink as the physical device target in your HVM config file. If the target of the symlink also does not exist when running on Xen then it is likely that your XenLinux kernel does not include an appropriate driver for your CDROM device. Perhaps it is a SATA drive connected to a SATA chipset for which our kernel does not have a driver?

-- Keir

#5 lore raw

RE: [Xen-devel] Re: Can not find the cdrom device in /dev/ after booted into xen(3.0.3)

Quoted 27 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Keir Fraser
Sent: 01 December 2006 16:45
To: Liang Yang; Petersson, Mats; [email protected]
Cc: [email protected]
Subject: Re: [Xen-devel] Re: [Xen-users] Can not find the cdrom device in /dev/ after booted into xen(3.0.3)

Quoted 1 line · Liang Yang

2. If I want to install HVM Linux from CDROM instead of

file image, how can

Quoted 2 lines

I define the cdrom in .hvm file:
disk = [ 'phy:/dev/sdb,hda,w', 'phy:/dev/cdrom,hdc:cdrom,r'

] will not work

Quoted 1 line

as /dev/cdrom is not available. Then I tried disk = [

'phy:/dev/sdb,hda,w',

Quoted 1 line

'phy:/dev/hdc,hdc:cdrom,r' ]. It still does not work as

/dev/hdc is not

Quoted 3 lines

available either.

How can I create /dev/hdc for my cd-rom?

Quoted 11 lines

When you boot native RHEL4.4, what is /dev/cdrom a symlink to? You should
try using the target of the symlink as the physical device target in your
HVM config file. If the target of the symlink also does not exist when running on Xen then it is likely that your XenLinux kernel does not include
an appropriate driver for your CDROM device. Perhaps it is a SATA drive
connected to a SATA chipset for which our kernel does not have a driver?

I'd say that the most likely scenario is that /dev/hdc isn't the device that is your CDROM. If your hard-disk is /dev/sd<something>, then chances are that the /dev/hda could be the CDROM drive (as, indeed, it could be even on a machine that uses /dev/hd<something> as the "disk device", since you could very well connect the first IDE controller to the CDROM and the second to the DISK, or some such).

--
Mats

Quoted 11 lines

-- Keir

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

author
#6 lore raw

Re: [Xen-devel] Re: Can not find the cdrom device in /dev/ after booted into xen(3.0.3)

In reply to Keir Fraser

Hi Keir and Mats,

When I booted into native RHEL4.4, /dev/cdrom is linked to hda. My CD-ROM is the only IDE device and my OS hard disk is the SATA. When I booted into Xen(on the same platform with the same distribution) I can NOT find ANY hd* device under /dev/ (SATA hard disk is listed correctly though). So what Mats said does not apply here. Could this be a bug for Xen 3.0.3?

Best regards,

Liang

----- Original Message ----- From: "Keir Fraser" <[email protected]>
To: "Liang Yang" <[email protected]>; "Petersson, Mats" <[email protected]>; <[email protected]>
Cc: <[email protected]>
Sent: Friday, December 01, 2006 9:44 AM
Subject: Re: [Xen-devel] Re: [Xen-users] Can not find the cdrom device in /dev/ after booted into xen(3.0.3)

Quoted 21 lines · Liang Yang
Quoted 9 lines

2. If I want to install HVM Linux from CDROM instead of file image, how can I define the cdrom in .hvm file:
disk = [ 'phy:/dev/sdb,hda,w', 'phy:/dev/cdrom,hdc:cdrom,r' ] will not work as /dev/cdrom is not available. Then I tried disk = [ 'phy:/dev/sdb,hda,w', 'phy:/dev/hdc,hdc:cdrom,r' ]. It still does not work as /dev/hdc is not available either.

How can I create /dev/hdc for my cd-rom?

When you boot native RHEL4.4, what is /dev/cdrom a symlink to? You should try using the target of the symlink as the physical device target in your HVM config file. If the target of the symlink also does not exist when running on Xen then it is likely that your XenLinux kernel does not include an appropriate driver for your CDROM device. Perhaps it is a SATA drive connected to a SATA chipset for which our kernel does not have a driver?

-- Keir

#7 lore raw

Re: Re: [Xen-users] Can not find the cdrom device in /dev/ after booted into xen(3.0.3)

Quoted 5 lines · Liang Yang

When I booted into native RHEL4.4, /dev/cdrom is linked to hda. My CD-ROM is the only IDE device and my OS hard disk is the SATA. When I booted into Xen(on the same platform with the same distribution) I can NOT find ANY hd* device under /dev/ (SATA hard disk is listed correctly though). So what Mats said does not apply here. Could this be a bug for Xen 3.0.3?

Where does your rootfs reside? Obviously not on an IDE HD I guess... Can you send boot output of native and Xen kernels, and also output of lsmod?

-- Keir

#8 lore raw

Re: Can not find the cdrom device in /dev/ after booted into xen(3.0.3)

In reply to Liang Yang
Quoted 7 lines · Liang Yang

Hello,

I just did a fresh installation of Xen 3.0.3. However, I can not find my cd-rom device under /dev/ after I booted into Xen. If I booted into Linux native (RHELAS 4.4), CD-ROM device is there and listed as /dev/cdrom. I know Xen changed the CD-ROM access mode from HVM domain. But for Xen domain0, it should still be listed as /dev/cdrom, right?

Should be.

Quoted 7 lines

I think the driver for CD-ROM must be already loaded and it is hided by Xen somehow. I checked a Linux Server beta version which has integrated Xen on the same platform, I can find the cdrom device in /dev/. I remember Xen 3.0.2 does not have this problem either.

Could anyone share some solutions?

Please post the output of lsmod and lspci so the list can help you diagnose the issue. My guess is your IDE was loaded via insmod in linuxrc and was not picked up by a depmod when xen installed.

Uncommon, but not the first time I've seen it in RHEL.

Quoted 9 lines

Thanks,

Liang

_______________________________________________
Xen-users mailing list
[email protected]
http://lists.xensource.com/xen-users

author
#9 lore raw

logs attached. Re: [Xen-users] Can not find the cdrom device in /dev/ afterbooted into xen(3.0.3)

Hi Tim, Keir and Mats,

I attached all the detailed log files (text file format). The file extension indicate the version of environment. Please take a look.

Thanks,

Liang

----- Original Message ----- From: "Tim Post" <[email protected]>
To: "Liang Yang" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Friday, December 01, 2006 11:05 AM
Subject: Re: [Xen-users] Can not find the cdrom device in /dev/ afterbooted into xen(3.0.3)

Quoted 16 lines · Liang Yang
Quoted 7 lines

Hello,

I just did a fresh installation of Xen 3.0.3. However, I can not find my cd-rom device under /dev/ after I booted into Xen. If I booted into Linux native (RHELAS 4.4), CD-ROM device is there and listed as /dev/cdrom. I know Xen changed the CD-ROM access mode from HVM domain. But for Xen domain0, it should still be listed as /dev/cdrom, right?

Should be.

Quoted 5 lines

I think the driver for CD-ROM must be already loaded and it is hided by Xen somehow. I checked a Linux Server beta version which has integrated Xen on the same platform, I can find the cdrom device in /dev/. I remember Xen 3.0.2 does not have this problem either.

Quoted 20 lines
Quoted 2 lines

Could anyone share some solutions?

Please post the output of lsmod and lspci so the list can help you diagnose the issue. My guess is your IDE was loaded via insmod in linuxrc and was not picked up by a depmod when xen installed.

Uncommon, but not the first time I've seen it in RHEL.

Quoted 9 lines

Thanks,

Liang

_______________________________________________
Xen-users mailing list
[email protected]
http://lists.xensource.com/xen-users

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#10 lore raw

Re: logs attached. Re: [Xen-users] Can not find the cdrom device in /dev/ afterbooted into xen(3.0.3)

Quoted 4 lines · Liang Yang

Hi Tim, Keir and Mats,

I attached all the detailed log files (text file format). The file extension indicate the version of environment. Please take a look.

ESB2 should be supported by the piix IDE driver. Which XenLinux kernel config are you using? Either you need the driver compiled into the kernel, or you need to load it as a module. Look for a line containing CONFIG_BLK_DEV_PIIX in your .config -- it should be "=m" or "=y".

If it's compiled as a module, and you installed the modules on your filesystem, you may be able to fire up the CDROM drive by typing 'modprobe piix'.

-- Keir

author
#11 lore raw

Re: [Xen-devel] Re: logs attached. Re: Can not find the cdrom device in /dev/ afterbooted into xen(3.0.3)

I just download Xen source and do "make world;make install;depmod..;mkinitrd...". I don't know which config file will be used if I build Xen like this (maybe the config-2.6.16.29-xen under the directory dist/install/boot).

I did a grep with "CONFIG_BLK_DEV_PIIX" and found it it set to m in the config-2.6.16.29-xen. I did a modprobe piix, however my CD-ROM is still not fired up (nothing is show up /dev/ as either cdrom or hd*).

Liang

----- Original Message ----- From: "Keir Fraser" <[email protected]>
To: "Liang Yang" <[email protected]>; <[email protected]>; "Petersson, Mats" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Friday, December 01, 2006 11:34 AM
Subject: [Xen-devel] Re: logs attached. Re: [Xen-users] Can not find the cdrom device in /dev/ afterbooted into xen(3.0.3)

Quoted 24 lines · Liang Yang
Quoted 5 lines

Hi Tim, Keir and Mats,

I attached all the detailed log files (text file format). The file extension indicate the version of environment. Please take a look.

ESB2 should be supported by the piix IDE driver. Which XenLinux kernel config are you using? Either you need the driver compiled into the kernel, or you need to load it as a module. Look for a line containing CONFIG_BLK_DEV_PIIX in your .config -- it should be "=m" or "=y".

If it's compiled as a module, and you installed the modules on your filesystem, you may be able to fire up the CDROM drive by typing 'modprobe piix'.

-- Keir

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#12 lore raw

Re: Re: logs attached. Re: [Xen-users] Can not find the cdrom device in /dev/ afterbooted into xen(3.0.3)

Actually, now I look closer it seems that on native the IDE I/O ports are detected as 0x1860-0x1867, but the Xen kernel is failing to detect this and is then failing to register at the default 0x1f0, probably because a legacy ISA IDE driver is registered there. So there is definitely something odd going on here but tracking it down will probably require adding some kernel tracing (e.g., to ide_hwif_configure(), to determine why it is failing to find the special location of the IDE I/O ports).

-- Keir

Quoted 52 lines · Liang Yang

I just download Xen source and do "make world;make install;depmod..;mkinitrd...". I don't know which config file will be used if I build Xen like this (maybe the config-2.6.16.29-xen under the directory dist/install/boot).

I did a grep with "CONFIG_BLK_DEV_PIIX" and found it it set to m in the
config-2.6.16.29-xen. I did a modprobe piix, however my CD-ROM is still not fired up (nothing is show up /dev/ as either cdrom or hd*).

Liang

----- Original Message -----
From: "Keir Fraser" <[email protected]>
To: "Liang Yang" <[email protected]>; <[email protected]>; "Petersson, Mats" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Friday, December 01, 2006 11:34 AM
Subject: [Xen-devel] Re: logs attached. Re: [Xen-users] Can not find the cdrom device in /dev/ afterbooted into xen(3.0.3)

Quoted 17 lines · Liang Yang
Quoted 6 lines

Hi Tim, Keir and Mats,

I attached all the detailed log files (text file format). The file extension
indicate the version of environment. Please take a look.

ESB2 should be supported by the piix IDE driver. Which XenLinux kernel config are you using? Either you need the driver compiled into the kernel, or you need to load it as a module. Look for a line containing CONFIG_BLK_DEV_PIIX in your .config -- it should be "=m" or "=y".

If it's compiled as a module, and you installed the modules on your filesystem, you may be able to fire up the CDROM drive by typing 'modprobe piix'.

Quoted 8 lines

-- Keir

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#13 lore raw

Re: Re: logs attached. Re: [Xen-users] Can not find the cdrom device in /dev/ afterbooted into xen(3.0.3)

Lspci -vvv output for native and Xen kernels may be useful, just for device 00:1f.1 (the IDE device). Then we could see which I/O resources the device is claiming in each case

-- Keir

Quoted 65 lines · Keir Fraser

Actually, now I look closer it seems that on native the IDE I/O ports are detected as 0x1860-0x1867, but the Xen kernel is failing to detect this and is then failing to register at the default 0x1f0, probably because a legacy ISA IDE driver is registered there. So there is definitely something odd going on here but tracking it down will probably require adding some kernel tracing (e.g., to ide_hwif_configure(), to determine why it is failing to find the special location of the IDE I/O ports).

-- Keir

Quoted 52 lines · Liang Yang

I just download Xen source and do "make world;make install;depmod..;mkinitrd...". I don't know which config file will be used if I build Xen like this (maybe the config-2.6.16.29-xen under the directory dist/install/boot).

I did a grep with "CONFIG_BLK_DEV_PIIX" and found it it set to m in the
config-2.6.16.29-xen. I did a modprobe piix, however my CD-ROM is still not fired up (nothing is show up /dev/ as either cdrom or hd*).

Liang

----- Original Message -----
From: "Keir Fraser" <[email protected]>
To: "Liang Yang" <[email protected]>; <[email protected]>; "Petersson, Mats" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Friday, December 01, 2006 11:34 AM
Subject: [Xen-devel] Re: logs attached. Re: [Xen-users] Can not find the cdrom device in /dev/ afterbooted into xen(3.0.3)

Quoted 17 lines · Liang Yang
Quoted 6 lines

Hi Tim, Keir and Mats,

I attached all the detailed log files (text file format). The file extension
indicate the version of environment. Please take a look.

ESB2 should be supported by the piix IDE driver. Which XenLinux kernel config are you using? Either you need the driver compiled into the kernel, or you need to load it as a module. Look for a line containing CONFIG_BLK_DEV_PIIX in your .config -- it should be "=m" or "=y".

If it's compiled as a module, and you installed the modules on your filesystem, you may be able to fire up the CDROM drive by typing 'modprobe piix'.

Quoted 8 lines

-- Keir

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

author
#14 lore raw

Re: Re: logs attached. Re: [Xen-users] Can not findthe cdrom device in /dev/ afterbooted into xen(3.0.3)

See attached.

----- Original Message ----- From: "Keir Fraser" <[email protected]>
To: "Keir Fraser" <[email protected]>; "Liang Yang" <[email protected]>; <[email protected]>; "Petersson, Mats" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Friday, December 01, 2006 11:58 AM
Subject: Re: [Xen-devel] Re: logs attached. Re: [Xen-users] Can not findthe cdrom device in /dev/ afterbooted into xen(3.0.3)

Quoted 75 lines

Lspci -vvv output for native and Xen kernels may be useful, just for device 00:1f.1 (the IDE device). Then we could see which I/O resources the device is claiming in each case

-- Keir

Quoted 8 lines · Keir Fraser

Actually, now I look closer it seems that on native the IDE I/O ports are detected as 0x1860-0x1867, but the Xen kernel is failing to detect this and is then failing to register at the default 0x1f0, probably because a legacy ISA IDE driver is registered there. So there is definitely something odd going on here but tracking it down will probably require adding some kernel tracing (e.g., to ide_hwif_configure(), to determine why it is failing to find the special location of the IDE I/O ports).

Quoted 57 lines

-- Keir

Quoted 52 lines · Liang Yang

I just download Xen source and do "make world;make install;depmod..;mkinitrd...". I don't know which config file will be used if I build Xen like this (maybe the config-2.6.16.29-xen under the directory dist/install/boot).

I did a grep with "CONFIG_BLK_DEV_PIIX" and found it it set to m in the
config-2.6.16.29-xen. I did a modprobe piix, however my CD-ROM is still not fired up (nothing is show up /dev/ as either cdrom or hd*).

Liang

----- Original Message -----
From: "Keir Fraser" <[email protected]>
To: "Liang Yang" <[email protected]>; <[email protected]>; "Petersson, Mats" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Friday, December 01, 2006 11:34 AM
Subject: [Xen-devel] Re: logs attached. Re: [Xen-users] Can not find the cdrom device in /dev/ afterbooted into xen(3.0.3)

Quoted 17 lines · Liang Yang
Quoted 6 lines

Hi Tim, Keir and Mats,

I attached all the detailed log files (text file format). The file extension
indicate the version of environment. Please take a look.

ESB2 should be supported by the piix IDE driver. Which XenLinux kernel config are you using? Either you need the driver compiled into the kernel, or you need to load it as a module. Look for a line containing CONFIG_BLK_DEV_PIIX in your .config -- it should be "=m" or "=y".

If it's compiled as a module, and you installed the modules on your filesystem, you may be able to fire up the CDROM drive by typing 'modprobe piix'.

Quoted 8 lines

-- Keir

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Quoted 5 lines

_______________________________________________
Xen-users mailing list
[email protected]
http://lists.xensource.com/xen-users

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#15 lore raw

Re: Re: logs attached. Re: [Xen-users] Can not findthe cdrom device in /dev/ afterbooted into xen(3.0.3)

Looks like the I/O ports are allocated correctly to the device in both cases (both Xen and native). So I have no idea why the IDE PCI probing code isn't picking up on this. At this point I'd be adding tracing to the two kernels to find out where their probing paths diverge.

-- Keir

Quoted 107 lines · Liang Yang

See attached.

----- Original Message -----
From: "Keir Fraser" <[email protected]>
To: "Keir Fraser" <[email protected]>; "Liang Yang" <[email protected]>; <[email protected]>; "Petersson, Mats" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Friday, December 01, 2006 11:58 AM
Subject: Re: [Xen-devel] Re: logs attached. Re: [Xen-users] Can not findthe cdrom device in /dev/ afterbooted into xen(3.0.3)

Quoted 85 lines

Lspci -vvv output for native and Xen kernels may be useful, just for device
00:1f.1 (the IDE device). Then we could see which I/O resources the device is claiming in each case

-- Keir

Quoted 11 lines · Keir Fraser

Actually, now I look closer it seems that on native the IDE I/O ports are detected as 0x1860-0x1867, but the Xen kernel is failing to detect this and
is then failing to register at the default 0x1f0, probably because a legacy
ISA IDE driver is registered there. So there is definitely something odd going on here but tracking it down will probably require adding some kernel
tracing (e.g., to ide_hwif_configure(), to determine why it is failing to find the special location of the IDE I/O ports).

Quoted 63 lines

-- Keir

Quoted 58 lines · Liang Yang

I just download Xen source and do "make world;make install;depmod..;mkinitrd...". I don't know which config file will be used
if I build Xen like this (maybe the config-2.6.16.29-xen under the directory
dist/install/boot).

I did a grep with "CONFIG_BLK_DEV_PIIX" and found it it set to m in the
config-2.6.16.29-xen. I did a modprobe piix, however my CD-ROM is still not
fired up (nothing is show up /dev/ as either cdrom or hd*).

Liang

----- Original Message -----
From: "Keir Fraser" <[email protected]>
To: "Liang Yang" <[email protected]>; <[email protected]>;
"Petersson, Mats" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Friday, December 01, 2006 11:34 AM
Subject: [Xen-devel] Re: logs attached. Re: [Xen-users] Can not find the cdrom device in /dev/ afterbooted into xen(3.0.3)

Quoted 19 lines · Liang Yang
Quoted 6 lines

Hi Tim, Keir and Mats,

I attached all the detailed log files (text file format). The file extension
indicate the version of environment. Please take a look.

ESB2 should be supported by the piix IDE driver. Which XenLinux kernel config are you using? Either you need the driver compiled into the kernel,
or you need to load it as a module. Look for a line containing CONFIG_BLK_DEV_PIIX in your .config -- it should be "=m" or "=y".

If it's compiled as a module, and you installed the modules on your filesystem, you may be able to fire up the CDROM drive by typing 'modprobe
piix'.

Quoted 8 lines

-- Keir

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Quoted 5 lines

_______________________________________________
Xen-users mailing list
[email protected]
http://lists.xensource.com/xen-users

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#16 lore raw

Re: Re: logs attached. Re: [Xen-users] Can not findthe cdrom device in /dev/ afterbooted into xen(3.0.3)

Quoted 4 lines · On Fri, 01 Dec 2006 19:24:33 +0000 Keir Fraser <[email protected]> wrote:

Looks like the I/O ports are allocated correctly to the device in both cases (both Xen and native). So I have no idea why the IDE PCI probing code isn't picking up on this. At this point I'd be adding tracing to the two kernels to find out where their probing paths diverge.

Looking over the current kernel code it is known to work in the non-Xen case. The native mode on the ESB2 has other problems recently reported but they would cause hangs later with stuck interrupts. Since I've got bugs filed on this I know the detection works outside of Xen.

The old IDE probe code predates PCI so conveniently the PCI side of the scan logic is all in setup-pci.c. Modules registering with ide during init are added to a list and all run post init, modules added later get their setup methods run immediately. Thus you can trace loading the piix module pretty directly through idepci_register_driver and ide_setup_pci_device, beyond that you are pretty much out of PCI territory

#17 lore raw

Re: [Xen-devel] Re: logs attached. Re: Can not findthe cdrom device in /dev/ afterbooted into xen(3.0.3)

In reply to Liang Yang
Quoted 4 lines · Liang Yang

See attached.
Hi Tim, Keir and Mats,

I attached all the detailed log files (text file format). The file

extension

Quoted 6 lines

indicate the version of environment. Please take a look.

Thanks,

Liang

Thought I'd add, it looks like your board is breaking up IDE and SATA on two continents and both devices should be accessible.. however, you may still need sr_mod too.

sr_mod, ide_cd and cdrom may do it if ide_cd and cdrom alone do not. It depends on your MB (and type of cdrom). If its a burner, just ide_cd and cdrom *should* get you read access to at least see the device, but I try to avoid Intel and I'm not quite sure.

If its a lite-on burner (or similar), chances are you may need sr_mod as its treated as a SCSI device when its writing, and its not showing up because the device isn't initializing properly. Well, it is, but modprobe doesn't think it is.

I have no idea why ide_cd won't see it in read only .. can you check dmesg to see if one of the three modules failed to load?

To recap

modprobe sr_mod
modprobe ide_cd
modprobe cdrom

Best,
-Tim

#18 lore raw

Re: Re: logs attached. Re: [Xen-users] Can not find the cdrom device in /dev/ afterbooted into xen(3.0.3)

In reply to Keir Fraser
Quoted 4 lines · On Fri, 01 Dec 2006 18:56:38 +0000 Keir Fraser <[email protected]> wrote:

Actually, now I look closer it seems that on native the IDE I/O ports are detected as 0x1860-0x1867, but the Xen kernel is failing to detect this and is then failing to register at the default 0x1f0, probably because a legacy ISA IDE driver is registered there.

More likely becaue as you already said the I/O ports are at 0x1860-1867. In native mode an ATA channel honours the PCI spec, in legacy mode it uses magic hard coded addresses.

Also if the device is on the SATA side you need libata and drivers/ata support not the legacy PIIX driver for the old drivers/ide code.

Alan

#19 lore raw

Re: Re: logs attached. Re: [Xen-users] Can not find the cdrom device in /dev/ afterbooted into xen(3.0.3)

Quoted 2 lines · Alan

Also if the device is on the SATA side you need libata and drivers/ata support not the legacy PIIX driver for the old drivers/ide code.

The Xen lsmod is listing libata and ata_piix *and* the legacy piix module. So it should probably work one way or the other. I assume native is using the legacy driver since the drive appears as /dev/hda, not /dev/sdx.

-- Keir

#20 lore raw

Re: [Xen-devel] Re: logs attached. Re: Can not find the cdrom device in /dev/ afterbooted into xen(3.0.3)

In reply to Liang Yang
Quoted 9 lines · Liang Yang

I just download Xen source and do "make world;make install;depmod..;mkinitrd...". I don't know which config file will be used if I build Xen like this (maybe the config-2.6.16.29-xen under the directory dist/install/boot).

I did a grep with "CONFIG_BLK_DEV_PIIX" and found it it set to m in the
config-2.6.16.29-xen. I did a modprobe piix, however my CD-ROM is still not fired up (nothing is show up /dev/ as either cdrom or hd*).

what does modprobe ide_cd do for you? Remember its going to show up as /dev/hd(b)? (c)? when its loaded.

If modprobe throws an error for that, something is *really* wrong.

the lspci from the native dump shows a bunch of undetected hardware, the lspci from Xen looks quite a bit better.

I see ide_generic, but no ide_cd ... Give it a whirl and please post back with results.

Quoted 1 line

Liang

Best,
-Tim

#21 lore raw

Re: Can not find the cdrom device in /dev/ after booted into xen(3.0.3)

In reply to Liang Yang
Quoted 7 lines · Liang Yang

Could anyone share some solutions?

Thanks,

Liang

I forgot to ask, did you install from source or binary packages?

author
#22 lore raw

Re: [Xen-users] Can not find the cdrom device in /dev/ afterbooted into xen(3.0.3)

Hi Tim,

I installed from source. I still think it could be caused by Xen instead of RHEL. The reason I tested RHEL 4.4 with Xen version which is older than 3.0.3 and I don't have such problems. I also tested RHEL 5 Beta which has Xen integrated and it does not have this problem either.

Regards,

Liang

----- Original Message ----- From: "Tim Post" <[email protected]>
To: "Liang Yang" <[email protected]>
Cc: <[email protected]>; <[email protected]>
Sent: Friday, December 01, 2006 11:28 AM
Subject: Re: [Xen-users] Can not find the cdrom device in /dev/ afterbooted into xen(3.0.3)

Quoted 19 lines · Liang Yang
Quoted 8 lines

Could anyone share some solutions?

Thanks,

Liang

I forgot to ask, did you install from source or binary packages?

_______________________________________________
Xen-users mailing list
[email protected]
http://lists.xensource.com/xen-users