WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Installing Fedora Core 2 inside an unprivileged domain

To: Penelope Fudd <kernel@xxxxxxx>
Subject: Re: [Xen-devel] Installing Fedora Core 2 inside an unprivileged domain
From: John L Griffin <jlg@xxxxxxxxxx>
Date: Tue, 14 Dec 2004 15:13:17 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 14 Dec 2004 20:14:31 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
In-reply-to: <1103053040.27896.6.camel@xxxxxxxxxxxxxxxxxxxx>
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
> Is it possible to make Xen-U kernels fake the loading of modules?  Every
> time someone says "insmod foobar", the kernel would say "ok, foobar is
> now on the lsmod list" but then it doesn't actually run any code in the
> module.
> 
> Would this fake-out anaconda sufficiently?  Or does anaconda run
> 'insmod' or 'modprobe' (in which case replacing those programs with
> symlinks to '/bin/true' would fix the problem)?

Interesting thought.  I just gave this a try, replacing /usr/sbin/insmod 
with a symbolic link to /usr/bin/true, and it didn't work: after I 
selected a module to load, it came up with the same messagebox titled "No 
driver found": "Unable to find any devices of the type needed for this 
installation type.  Would you like to manually select your driver or use a 
driver disk?"  I tried a module in each of Local CDROM, Hard drive, and 
FTP.

So perhaps the key is first convincing anaconda that it should try loading 
a (any) module, then using the /bin/true trick.  Any idea how anaconda 
(and/or other Linux apps) tests for which devices are present?  Looking at 
the relevant strace info (see below), it seems to get a list of PCI and 
USB signatures, so it must match them somehow against a memory location or 
file contents(?).  (It seems like it'd be fairly heavy-weight to extend 
Xen to pretend to export a PCI device just to fool anaconda, but maybe we 
could just create a static file /proc/pci/something with the expected 
entry in it.)

Below is the strace of the anaconda loader (mentioned in my earlier 
message), grepped for lines that start with "open".

open("/var/run/loader.run", O_RDWR|O_CREAT|O_TRUNC, 0666) = 3
open("/dev/tty3", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3
open("/dev/tty3", O_WRONLY|O_LARGEFILE) = 4
open("/tmp/anaconda.log", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EIO 
(Input/output error)
open("/proc/cmdline", O_RDONLY|O_LARGEFILE) = 5
open("/tmp/netinfo", O_RDONLY)          = -1 ENOENT (No such file or 
directory)
open("/modules/module-info", O_RDONLY|O_LARGEFILE) = 5
open("/proc/modules", O_RDONLY|O_LARGEFILE) = 5
open("/modules/modules.dep", O_RDONLY|O_LARGEFILE) = 5
open("/modules/modules.cgz", O_RDONLY)  = 5
open("/tmp/modprobe.conf", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = 
-1 EIO (Input/output error)
open("/etc/screenfont.gz", O_RDONLY)    = -1 ENOENT (No such file or 
directory)
open("/dev/console", O_RDWR|O_LARGEFILE) = 5
open("/proc/meminfo", O_RDONLY|O_LARGEFILE) = 5
open("/modules/modules.cgz", O_RDONLY)  = 5
open("/tmp/modprobe.conf", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = 
-1 EIO (Input/output error)
open("/modules/modules.cgz", O_RDONLY)  = 5
open("/tmp/modprobe.conf", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = 
-1 EIO (Input/output error)
open("/modules/modules.cgz", O_RDONLY)  = 5
open("/tmp/modprobe.conf", O_WRONLY|O_APPEND|O_CREAT|O_LARGEFILE, 0666) = 
-1 EIO (Input/output error)
open("/usr/share/hwdata/pcitable", O_RDONLY) = 5
open("/lib/modules/2.6.9-xenU/modules.pcimap", O_RDONLY) = -1 ENOENT (No 
such file or directory)
open("/etc/modules.pcimap", O_RDONLY)   = -1 ENOENT (No such file or 
directory)
open("/modules/modules.pcimap", O_RDONLY) = 5
open("/usr/share/hwdata/pcitable", O_RDONLY) = 5
open("/lib/modules/2.6.9-xenU/modules.pcimap", O_RDONLY) = -1 ENOENT (No 
such file or directory)
open("/etc/modules.pcimap", O_RDONLY)   = -1 ENOENT (No such file or 
directory)
open("/modules/modules.pcimap", O_RDONLY) = 5
open("/modules/pcitable", O_RDONLY)     = 5
open("/modules/modules.pcimap", O_RDONLY) = 5
open("/.buildstamp", O_RDONLY)          = 5
open("//.terminfo/l/linux", O_RDONLY)   = -1 ENOENT (No such file or 
directory)
open("/usr/share/terminfo/l/linux", O_RDONLY) = 6
open("/dev/tty", O_RDWR)                = -1 ENXIO (No such device or 
address)
open("/proc/cmdline", O_RDONLY|O_LARGEFILE) = 6
open("/lib/modules/2.6.9-xenU/modules.usbmap", O_RDONLY) = -1 ENOENT (No 
such file or directory)
open("/usr/share/hwdata/usb.ids", O_RDONLY) = -1 ENOENT (No such file or 
directory)
open("./usb.ids", O_RDONLY)             = -1 ENOENT (No such file or 
directory)
open("/proc/bus/usb/devices", O_RDONLY) = -1 ENOENT (No such file or 
directory)
open("/proc/scsi/usb-storage-0", O_RDONLY|O_DIRECTORY) = -1 ENOENT (No 
such file or directory)
open("/etc/lang-table", O_RDONLY)       = 6
open("/lib/modules/2.6.9-xenU/modules.usbmap", O_RDONLY) = -1 ENOENT (No 
such file or directory)
open("/usr/share/hwdata/usb.ids", O_RDONLY) = -1 ENOENT (No such file or 
directory)
open("./usb.ids", O_RDONLY)             = -1 ENOENT (No such file or 
directory)
open("/proc/bus/usb/devices", O_RDONLY) = -1 ENOENT (No such file or 
directory)
open("/proc/scsi/usb-storage-0", O_RDONLY|O_DIRECTORY) = -1 ENOENT (No 
such file or directory)
open("/lib/modules/2.6.9-xenU/modules.usbmap", O_RDONLY) = -1 ENOENT (No 
such file or directory)
open("/usr/share/hwdata/usb.ids", O_RDONLY) = -1 ENOENT (No such file or 
directory)
open("./usb.ids", O_RDONLY)             = -1 ENOENT (No such file or 
directory)
open("/proc/bus/usb/devices", O_RDONLY) = -1 ENOENT (No such file or 
directory)
open("/proc/scsi/usb-storage-0", O_RDONLY|O_DIRECTORY) = -1 ENOENT (No 
such file or directory)
open("/proc/driver/cciss/cciss0", O_RDONLY) = -1 ENOENT (No such file or 
directory)
open("/proc/driver/cpqarray/ida0", O_RDONLY) = -1 ENOENT (No such file or 
directory)
open("/proc/rd/c0/current_status", O_RDONLY) = -1 ENOENT (No such file or 
directory)
open("/proc/i2o/iop0/lct", O_RDONLY)    = -1 ENOENT (No such file or 
directory)



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel