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

Re: config for undetected hda



anaconda-devel-list-bounces redhat com wrote on 01/21/2005 04:05:45 PM:

> On Fri, 2005-01-21 at 14:57 -0500, David Becker wrote:
> > I am trying to use Rocks's anaconda to install on a Xen virtual
> > machine.   This fails when anaconda does not detect the existing
> > disk partitions.   I would not expect it to detect the xen virtual 
block
> > device since there is no PCI or IDE bus.  The hda1 and hda2 partitions
> > exist and have the same major/minor numbers as an IDE disk.
> 
> It's not going to work.  anaconda needs to be able to detect devices to
> use them to install to/from.  Otherwise, there's no way to be able to
> catch people trying to install to non-existent devices.
> 


While you're that anaconda needs to be to detect devices to use them, 
there is a way to make it work.  In my situation we had HP servers with no 
configured hardware RAID sets and I wanted to install RHEL on them in a 
scripted manner.  Well anaconda blatantly refused to let me even go into 
%pre to run some commands to create the raid sets (I think this is a 
flawed design, IMHO), in order to work around that, I did the following, 
which may work for you:


The first thing you need to do is make your own custom "loader" 
executable.. Extract the anaconda source somewhere and do the following:


cd anaconda-9.1.3/loader2

Look for the file named loader.c and bring it up in your favorite editor.
Search for the line that starts with:

checkForHardDrives(&kd, &flags); 

and comment  it out using C-style comments.  It would then look like:

/* checkForHardDrives(&kd, &flags); */

You will also have to comment out the function as well, which should look 
like:

/* static void wcheckForHardDrives(struct knownDevices * kd, int * 
flagsPtr) {
*lines of code
*lines of code
*/}

Now you will need to compile.  from the loader2/ directory, run 

make

now you need to disect the stage2.img:

bring up the stage2/usr/bin/anaconda in your editor.  Look for the 
following lines:

        os.symlink("/usr/%s/python2.2/site-packages/rhpl/%s" %(libdir, f),
                "/tmp/updates/rhpl/%s" %(f,))

Just below that line append the following

##do disk config stuff
print "Runnig Disk Config...\n"
os.system("/usr/bin/mknod whateverwhatever")
##

Yes I know that this is a hack but it works beautifuly, and is the only 
option unless Red Hat decides to at least give the option off that causes 
the installer to fail when no hdd's are detected (it should really probe 
after %pre is executed, or at least, re-probe).


James


James S. Martin, RHCE
Contractor
Administrative Office of the United States Courts
Washington, DC
(202) 502-2394

> Not to mention the bizarreness that is the fact that you only get the
> partitions instead of the whole disk.
> 
> Jeremy
> 
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list redhat com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list


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