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

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



Well, drat.  Ian's and Luciano's comments are correct: on the FC2 and FC3 
ISO images, the anaconda installer appears to require a successful module 
load before proceeding with an installation.  This is true even when 
mountable block device nodes exist on the system.

I'm going to throw in the towel for now, but there are several possible 
continuing approaches if anyone in the future wants to give this a shot:

1. Modify anaconda to automatically bypass the module loading.  There are 
several web sites that discuss modifying anaconda (to resolve specific 
boot issues, such as when using new motherboards), but I unfortunately 
found no good central reference on anaconda itself.

2. Load a bootstrap file system (see below), then invoke the installation 
routines that would normally be called by anaconda.  (Note: it is not 
immediately obvious to me that this is possible without rebuilding 
anaconda; there is a single "loader" executable that's called by the 
installer's "init" executable, and "loader" appears to do everything by 
itself.)

3. Recompile the xenU kernel to use modules for the disk and network 
interfaces, then modify the installer's initrd image to recognize and 
include these modules during its initial probe.

4. As per Luciano's suggestion, [i] install the anaconda RPM and run it 
from the xen0 partition with the --rootpath option or [ii] use the 
"debootstrap" utility with the Red Hat images.  This isn't quite solving 
the problem I set out to solve (installing Red Hat, wholly within xenU 
domains, with no/few modifications), but this will perhaps allow the 
creation of a file system without requiring both a reboot and an actual 
disk partition.

> I've never tried it, but I wander if its possible to run anaconda
> directly from an installed system? If so, running it under strace
> might provide a useful clue as to what's going on.

I was able to run strace on the anaconda "loader" executable, by booting 
xenU directly into the "stage2.img" image included with the ISO images:

A. Mount the DVD image in loopback mode.

B. Mount the file "Fedora/base/stage2.img" (in the DVD image) in loopback 
mode.  (Note, this is a "cramfs" image, which requires kernel support.)

C. Create a blank 256MB file (or partition), make an ext2 file system on 
it, mount it, copy the contents of "stage2.img" into it.  [I refer to this 
as stage2-ext2.img below.]

D. You'll need to make some changes to stage2-ext2.img before booting from 
it, depending on what you want to do below.  At a minimum, you can copy 
the "strace" binary into /usr/bin.  To run the anaconda installer, you'll 
need to make directories for /proc, /sys, /var/run, and perhaps some 
others.  You also may need to copy some files (for example, search for 
"lang-table" and copy that file into /etc); you'll see error messages for 
each of these when you try to run anaconda.

E. Start an unprivileged domain with options something like this:

  disk    = [ 'file:/flash/fc2-install/stage2-ext2.img,sda1,w' ]
  root    = "/dev/sda1"
  #extra   = "ro init=/usr/lib/anaconda-runtime/loader/init"
  extra   = "ro init=/usr/bin/bash"

Using the first "extra" line will boot into the anaconda installer, which 
will ultimately fail or get into the no-module-found black hole.  Using 
the second "extra" line will get you a helpful bash prompt and a 
reasonably populated /usr/bin directory.  Unfortunately, invoking "strace" 
on the "loader" executable produced a 500KB file.  In lieu of posting that 
here, I will forward the trace directly to Ian.



-------------------------------------------------------
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®.