Announcement

Collapse
No announcement yet.

[SOLVED!!] - Katastrophic Koala upgrade - system completely borked...

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #61
    Re: Katastrophic Koala upgrade - system completely borked...

    The only error that is really of interest is the first one, in which the dbus.postinst script fails. All the others are a result of that. I have not seen the actual output with "set -x" so I don't know for sure exactly where it is failing but I think it is this line near the end of the script.
    update-rc.d -f dbus remove >/dev/null || exit $?
    That $? is telling it to return the status of the last command, so if update-rc.d -f dbus remove fails the script fails. Edit that script and change $? to 0, that is a zero. It will then read
    update-rc.d -f dbus remove >/dev/null || exit 0
    That should generate some movement.

    Comment


      #62
      Re: Katastrophic Koala upgrade - system completely borked...

      Apologies mando_hacker but am a little bit lost here on what to do next...

      Are you saying that I should input the following code?:

      Code:
      update-rc.d -f dbus remove >/dev/null || exit $?
      or that this is an error output from the script? It's just that you 'quote' it, and don't 'code' it as text on the screen...

      Or is it part of the script? Do you want me to open up the script and modify it as you suggest to "exit 0"??

      Please also remember that I have removed /dev/null (as per the info on the ubuntuforums link I posted much earlier) - should I add it back in?

      Am at work now, but will be home in a couple of hours for lunch - so can give it a go then...

      Cheers.

      Bag

      Comment


        #63
        Re: Katastrophic Koala upgrade - system completely borked...

        My intent is for you to modify the postinst script. I am not sure if you removed the /dev/null device itself or removed it in a script. If you removed the device, reboot to recreate it. If you took it out of a script, put it back in.

        Comment


          #64
          Re: Katastrophic Koala upgrade - system completely borked...

          Right then, done that.

          I opened up the script, and modified it to show a 0 at the end, just as you suggested. It didn't seem to make much difference.

          It still fails on a dbus error, claiming that "Failed to open connection to "system" message bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory"

          Then the errors all start off again... but it all stems from this dbus error.

          "Status dbus" shows that the process is running, with a PID of 4930.

          Seems to be a never-ending cycle...!

          Any suggestions?

          Bag.

          Comment


            #65
            Re: Katastrophic Koala upgrade - system completely borked...

            Edit the script again and right after where it says
            set -e
            put a line that says
            exit 0
            At that point it should have no chance of failing or doing anything else. Then run the dpkg --configure -a command.

            Comment


              #66
              Re: Katastrophic Koala upgrade - system completely borked...

              OMG!!!!

              Wow! That moved it along a touch...!!!

              It whizzed by with a whole load of messages, most seemed to work fine, although I did notice that some showed up as [Fail] on the right hand side of the screen.

              I updated the script as you said, although I left both the "set -e" and the "set -x" in before adding in the "exit 0".

              Running "sudo dpkg --configure -a" then pushed through a whole bunch of packages. As I said, some seemed to fail, but I couldn't tell you which one's went OK and which didn't - too fast.

              I then ran a "sudo aptitude -f install"

              It told me that it needed to remove one package (xulrunner-1.9), but it failed on this -
              Code:
              Removing xulrunner-1.9 ...
              update-alternatives: error: no alternatives for xulrunner. 
              update-alternatives: error: no alternatives for xulrunner.
              dpkg: error processing xulrunner-1.9 (--remove):
               subprocess installed pre-removal script returned error exit status 2
              Errors were encountered while processing:
               xulrunner-1.9
              E: Sub-process /usr/bin/dpkg returned an error code (1)
              A package failed to install. Trying to recover:
              Reading package lists... Done
              Building dependency tree
              Reading state information ... Done
              Reading extended state information
              Inititalizing package states... Done
              I don't think that this is a major hassle - I presume that it might be sorted out if it finally boots into the GUI (KDE) later.

              FWIW, I did see that the most recent kernel was being worked over during the install. Didn't actually see if it worked or failed, but still, I have a little confidence that it might have cleaned itself up to the point where it might boot...

              Right then, is there anything special I should do before I reboot?

              Just thinking about it - is there a way to make sure that the kernel image has been put onto /boot before I shut down? What should be the next steps before I rebooted the machine?

              Thanks,

              Bag.

              Comment


                #67
                Re: Katastrophic Koala upgrade - system completely borked...

                To see the kernels run
                Code:
                ls -l /boot
                kernels themselves are vmlinuz-2.6.31-14-generic, or similar. Each kernel should have an accompanying initrd.img, initrd.img-2.6.31-14-generic and config and System.map. The vmlinuz and initrd.img are essential.

                Grub must be installed so try
                Code:
                dpkg -l | grep grub
                . If is shows grub-pc and version 1.97 you have been upgraded to grub2. If it is version 0.97 and grub-legacey you have grub. For grub2 the boot configuration is in /boot/grub/grub.cfg and for grub it is in /boot/grub/menu.lst. The correct file must have an entry that mentions the latest kernel and its initrd.img.

                Comment


                  #68
                  Re: Katastrophic Koala upgrade - system completely borked...

                  mando_hacker,

                  I ran the list command but it didn't show what I expected it to...

                  I'm not at home now, but from memory, it only showed me two lines - one for 2.6.28-16-generic and one for 2.6.31-14-generic. The old one is the last kernel I was using prior to attempting an upgrade, and the new one is the stock standard kernel for the new Karmic (I believe).

                  From memory, neither of them were vmlinuz either - which struck me as odd. Made me think that I hadn't mounted the /boot system correctly and that I was actually looking at the /boot of the CD-ROM, updated in memory with the other kernel that it had reworked. I'd need to check to be sure, but they both looked like initrd.img...

                  I do know that before the last dpkg command worked, I had ten different lines in my grub file - five kernels and five 'safe boot' options, so seeing only two makes me a little concerned...

                  Didn't get to run a check for the grub system before I had to leave for work. Will check at lunch.

                  Anyway, just in case, I've copied the file of 2.6.28-16 to my /(root) drive since I know that I have the correct /(root) system up and running. This means that if I have accidentally not connected the correct boot drive, I can copy it across manually later.

                  I think that I may need to change permissions on it once I have done that copy though, is that correct? If I was to copy across the file from inside the LiveCD GUI later then what would I need to do with the permissions to make it accessible/usable?

                  Getting somewhere now - I can feel it...!!! Just hope it's far enough down the road to boot to a GUI again and see it fixed once and for all.

                  Cheers,

                  Bag

                  Comment


                    #69
                    Re: Katastrophic Koala upgrade - system completely borked...

                    Mando_hacker,

                    Right, had a good look at it at lunch and I have some more details for you...

                    Firstly, the problem about the /boot partition. I double-checked it and it was not properly mounted inside the chroot environment. Once mounted, it showed all the lines I had previously expected... five different kernels and safe-boot options.

                    I then renamed the existing initrd.img-2.6.28-16-generic file to one with an ".old"extension, and copied across the newly reworked initrd.img file that I had saved to my root partition. I double-checked the status with ls -l and it showed that it has exactly the same permissions, so I hope it's good to go.

                    Something that I did notice though, was that the size of the new initrd file is slightly smaller than the original one that was there (and also slightly smaller than the others around it). Hope this isn't an issue. The original was 7,815,131 bytes and the new version is 7,258,411 bytes. The others around on the /boot partition all seemed to be of the 7,800,000 sort of size...

                    Out of interest, the new kernel does not seem to have been installed - I'm still there with the old ones....

                    Grub, has not been upgraded either. It shows version 0.97 - but nothing there mentions grub-legacy. Was that you talking about old vs new grub or was that a file that you were expecting to see?

                    /boot/grub/menu.lst mentions the latest 9.04 kernel of vmlinuz-2.6.28-16-generic (since it was there before) and seems good to go.

                    So then, all seems in place. The only concern that I have is ensuring/hoping that the new initrd file will work with the existing kernel in place. Can't be any worse than the one that was there before though, can it? After all, that one didn't boot!!!

                    So then, it seems that I might as well just umount the /boot partition, exit the chroot environment and reboot...

                    Is there anything else I should check / do before I reboot and see if it goes to a KDE GUI?

                    Cheers.

                    Bag

                    Comment


                      #70
                      Re: Katastrophic Koala upgrade - system completely borked...

                      I would say go ahead and reboot. It either will work or it won't. I would say that booting from hard disc is success at the moment, wouldn't much care if the GUI starts or not. Once you get it to boot off the hard disc you will want to run
                      Code:
                      aptitude reinstall dbus
                      as well as
                      Code:
                      aptitude -f dist-upgrade
                      to get the system entirely updated. If the upgrade does not finish cleanly keep doing the dpkg --configure -a and aptitude -f dist-upgrade until it completes. If it stops somewhere again we will need to get it past that stopping point.

                      Comment


                        #71
                        Re: Katastrophic Koala upgrade - system completely borked...

                        Stalled on boot...

                        It tried to boot up from the /boot partition, no problems. Then it complains about a firmware bug and that I should complain to my BIOS vendor - but this is nothing new, it was there before.

                        Then the very next line says:

                        chroot: cannot execute /etc/apparmor/initramfs: No such file or directory
                        Doesn't go any further... completely stuck.

                        Am confused about why it thinks it's a chroot environment...

                        Any comments anyone?

                        Bag

                        Comment


                          #72
                          Re: Katastrophic Koala upgrade - system completely borked...

                          Ok, so having hard reset that one, I chose the recovery mode version of the same kernel (2.6.28-16-generic) and it booted through to the command line...!!!

                          Woo hoo!!!

                          Except that trying to reinstall dbus tells me that it needs to remove the package xulrunner-1.9. When I agree to that, it tries to remove it but fails out.

                          Some text that is shown is copied below:

                          Code:
                          Writing extended state information... done
                          (Reading database ... 179150 files and directories currently installed.)
                          Removing xulrunner-1.9 ...
                          update-alternatives: error: no alternatives found for xulrunner.
                          update-alternatives: error: no alternatives found for xulrunner.
                          dpkg: error processing xulrunner-1.9 (--remove):
                           subprocess installed pre-removal script returned error exit status 2
                          Errors were encountered while processing:
                           xulrunner-1.9
                          E: Sub-process /usr/bin/dpkg returned an error code (1)
                          A package failed to install. Trying to recover:
                          Reading package list... Done
                          Building dependency tree
                          Reading state information... Done
                          Reading extended state information
                          Initialising package states... Done
                          So it seems that I still have a little work to do. I'm now back in my own system, but still can't update properly...

                          Any ideas on how to jump this last hurdle?

                          Cheers.

                          Bag

                          Comment


                            #73
                            Re: Katastrophic Koala upgrade - system completely borked...

                            Assuming that you have the patience to continue, I think that you're pretty close to have it solved. The so-called "recovery mode" is a regular kernel without most of the services running, but with enough functionality to do almost anything.

                            What about "forcing" removal of xulrunner, then installing it again? I know that forcing the package manager is not good practice, but I cannot see how it could be related to dbus.

                            Comment


                              #74
                              Re: Katastrophic Koala upgrade - system completely borked...

                              Probably not the last hurtle, but definite progress. The solution is one you have seen before. This script only does one thing so just by passing it doesn't worry me. Add
                              Code:
                              exit 0
                              to /var/lib/dpkg/info/xulrunner-1.9.prerm right after set -e. Then
                              Code:
                              aptitude update
                              and reinstall dbus and then the linux-image package. To see exactly which linux-image use
                              Code:
                              dpkg -l | grep linux-image
                              and choose the latest package. You are just about there now, although you will probably still find many packages that need upgrading.

                              Comment


                                #75
                                Re: Katastrophic Koala upgrade - system completely borked...

                                OK, so hit upon a minor snag. Nothing stunning I suspect...

                                Firstly, I edited the xulrunner script - and then reinstalled dbus. No apparent problems at all. The system did tell me though that it was waiting for 416 upgrades...

                                However, then trying to do a "sudo aptitude update" I hit a snag... apparently, it cannot resolve the web addresses required to update the package list. So then, a quick question - the recovery options on the kernel - do they disable the network connection? If so, how do I re-enable?

                                I've gone back in and changed the /etc/hosts file back the name of kubuntu (now that I'm back in my own system and no longer in a chroot environment). I presume that this doesn't have an impact - please let me know if I'm wrong.

                                I've tried pinging yahoo and it fails with unknown host. I've also tried pinging the router in our house - and it returns

                                Code:
                                xxxxxxx@kubuntu:~$ ping -c 4 192.168.11.1
                                connect: Network is unreachable
                                However, pinging the router from another PC on the network returns the normal info. So it seems that the PC cannot connect to the network somehow. How do I remedy this?

                                Other than that, trying to reinstall the linux-image (which on mine, the latest is 2.6.28-16-generic) returns that it cannot find the file. More specifically it says:

                                Code:
                                E: I wasn't able to locate file for the linux-image-2.6.28-16-generic package. This might mean you need to manually fix this package.
                                Writing extended information... Done
                                E: I wasn't able to locate file for the linux-image-2.6.28-16-generic package. This might mean you need to manually fix this package.
                                E: Internal error: couldn't generate list of packages to download
                                As I say - I think that these are fairly minor and that they could be resolved once the network issue is sorted out.

                                Any clues on how to enable the network and get it working?

                                Thanks in advance.

                                Bag

                                Comment

                                Working...
                                X