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

Re: Installing RPMs without booting normally



On Thu, 28 Aug 2003, Jesse Merriman wrote:

> Hello,
> 
> I posted the following to linuxforum.com[*], but I was wondering if 
> anyone on this list can help me. Oh, and I'm running Mandrake 9.1. 
> Here's the problem:
> 
> -------------------------------------
> Recently while messing around with a new kernel I tried updating 
> initscripts, but must have screwed something up because it was 
> uninstalled and the new one was not installed right, so I can't boot up 
> correctly now. I do have the original initscripts RPM, though, so I 
> tried booting with the install CD and going into rescue mode, mounting 
> my partitions under /mnt, going to the console, and then installing the 
> rpm, but since the system was not booted normally this fails with errors 
> like:
> 
> error: cannot open Packages index using db3 - No such file or directory (2)
> error: cannot open Packages database in /var/lib/rpm
> 
> So, my question is this: is it possible to install an RPM onto an 
> unbooted system, as I have tried to do? Or is there some other way to 
> restore it? [Note: I've also asked this at linuxquestions.org, the 
> thread is here: 
> http://www.linuxquestions.org/questions/sh...&threadid=86112 
> <http://www.linuxquestions.org/questions/showthread.php?s=&threadid=86112> ]
>
You need to chroot to /mnt/sysimage, and then all will be well.  This of
course means that you would need to copy the rpm to 
/mnt/sysimage/something.

On the other hand you can achieve the same thing by doing from the 
non-chrooted environment:

	rpm -Uvh --root /mnt/sysimage path_to_rpm

If your on RH 9 you will get an error message about not being able
to read the trigger index.  If nothing is triggered on this package
then your fine (Jeff, if you read this, I think this is revealing 
a bug with triggers and --root, but it could just be the verison of
rpm in the RH rescue environement; I saw this in the RHCE class last
week but forgot to mention it).

Cheers...james 
> -------------------------------------
> 
> Thanks,
> 
> -jdm
> 
> [*] http://www.linuxforum.com/forums/index.php?showtopic=1884
> 
> 
> 
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@redhat.com
> https://www.redhat.com/mailman/listinfo/rpm-list
> 




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