Re: How do a fix a non working kernel installation ?

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

 



So here is what I did:

- open a regular (non chroot) session.
- cd to /media/-/
- mount /dev/sda1 boot   /dev/sda1 is the /media/-boot/ drive.  I
found this out by doing a df and looking at the mappings.
- the mount has to be done in the NON chroot session because the
chroot session doesn't have access to /media and its /dev doesn't have
the boot directory in it.  What all this does is mount the boot
partition to /boot for the chroot session, just like the linux OS does
when it boots for real.  Once that is all done, do this:

- open a chroot session
- cd to /home/xxx/Download, where the rpm files were that I installed
- rpm -i kernel*rpm.  This gave me an obscure error
- rpm -F kernel*rpm.  This worked
- rpm -q kernel  - this listed the f12 kernel.
- rpm -e kernel...rpm for the f12 kernel.  This worked.
- when I checked /media/-boot/ in the non chroot session, the f12
files were gone.  I will now reboot to see if my machine runs.

One thing I learned in all this is that its really, really nice doing
a rescue from a Live CD because you have full access to the Internet
and you can open both chroot and non chroot terminals to the hard
drive file system and operate as you need to.  The chroot sessions
allow you to use all the tools (in the correct versions) that you have
installed on the hard drive.  The non chroot sessions allow you to
access the hard drives from a more global view, ie via /media/-/, etc.
 Pretty neat.

I am going to reboot now...

On 7/16/09, linux guy <linuxguy123@xxxxxxxxx> wrote:
> No joy.  All I got was the same blinking cursor.  I'm running from the
> F9 Live CD.
>
> BTW: chroot above was actually /usr/sbin/chroot.   And the yum problem
> with the repos wasn't the repos at all.  The chroot session doesn't
> have access to the network.  ping www.google.com returns "unknown
> host" in the chroot session, whereas its found from a non chroot
> session.
>
> yum -C list kernel shows only the two F11 kernels.  The F12 kernel is gone.
>
> However, if I look at grub. conf in /media/-/boot, the entry for the
> F12 kernel is still there !  Furthermore so are the F12 kernel files.
>  So I am guessing that rpm didn't remove any of the actual files, even
> though it seems to have removed all of the database entries.  GREAT !
> I've got a mess on my hands.
>
> This makes sense, because if I do a cd /boot from the chroot session,
> it shows a blank directory.   However, if I cd to /media/-/boot, its
> definitely not empty.
>
> I think I need to link the /boot directory to /media/-/boot and then
> to an rpm -i against the F12 kernel rpm to reinstall the entries into
> the database and then do a rpm -e to actually remove the files.
>
> Does that make sense ?  Is there an easier way ?
>
> Thanks
>
>
> HOWEVER....
>
> On 7/16/09, linux guy <linuxguy123@xxxxxxxxx> wrote:
>> I think I got it fixed.  Here is what I did in case someone needs it
>> someday
>> :)
>>
>> - booted F9 Live.  Just because I had it around.
>> - opened Dolphin, because it displays the hard drives for the machine
>> - opened a terminal in Dolphin
>> - browse to the root directory of the hard drive
>> - did a pwd in the terminal and found the root of my hard drive was
>> /media/-/
>> - su
>> - chroot /media/-/
>> - yum -C list kernel  <- did -C because the Fedora repos seem to be
>> messed up again, thus I only used the local cache data
>> - yum -C remove kernel-2.6.31-0.69.rc3.fc12
>> - this resulted in an error due to some unrelated pooched dependencies.
>> - rpm -e kernel-2.6.31-0.69.rc3.fc12
>> - this resulted in an error due to some unrelated pooched dependencies
>> - rpm --nodeps -e kernel-2.6.31-0.69.rc3.fc12
>> - rpm -e kernel-firmware-2.6.31-0.69.rc3.fc12
>>
>> I will now reboot and see if my system runs.  I'll report back in a
>> bit if it does.
>>
>> On 7/16/09, linux guy <linuxguy123@xxxxxxxxx> wrote:
>>> Will chroot work when the target system has a broken kernel ?   It
>>> keeps running the old kernel ?
>>>
>>> I tried using rpm with --dbpath so that it used the F11 rpm data.  It
>>> wouldn't run because of incompatible rpm versions.
>>>
>>> On 7/16/09, davide <lists4davide@xxxxxxxxx> wrote:
>>>> linux guy <linuxguy123 <at> gmail.com> writes:
>>>>
>>>>
>>>>>  I am now running from a Fedora 9 live CD I had laying around.  I can
>>>>>  see the hard drive and its partitions from the live session.  How
>>>>>  would I fix the F11 installation so it runs again ?  Is it possible
>>>>> to
>>>>>  do an rpm -e on the non running F11 partition from the F9 live
>>>>> session
>>>>>  ?
>>>>
>>>> You can take control of the installed linux from a live cd with the
>>>> chroot
>>>> command using the command line.
>>>> But you should know what you are doing.
>>>> Basically it is very simple and powerful, but for this reason you can
>>>> also
>>>> break
>>>> your system.
>>>>
>>>> --
>>>> fedora-list mailing list
>>>> fedora-list@xxxxxxxxxx
>>>> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>>>> Guidelines:
>>>> http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
>>>>
>>>
>>
>

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux