[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



> 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.