Aborted an Ubuntu 12.04 Upgrade resulted in Booting into Blank Screen

Hi, Yesterday, a friend of mine proceeded with the Dist Upgrade to 12.04 process within the Update Manager of his Ubuntu 11.10 (64bit) system that I installed for him previously. (He did so before consulting me beforehand. Had he done so, I would have advised him to do the usual things before an upgrade, like: backup your system, etc; and I would have offered to do this with him together, because I had just done my upgrade recently). Well, everything was going well, until he got to the 4th point in the Upgrade Checklist (i.e. he saw 3 ticks in the checklist): - Preparing to upgrade - Setting new software channels - Getting new packages - Installing the upgrades - ... Later he told me that his PC seemed to have stuck at this point for a long time, no progress, PC seemed frozen. So he proceeded with the one option that many of us tend to do - pressed the RESET button. While I usually wouldn't do this myself, I can understand his rationale for doing so - aborting the upgrade so that he could get back to where he was. Instead, when his PC (there is no dual-boot in this machine - just pure Ubuntu) rebooted, after going pass the usual BIOS/Video card splash screen, followed by a quick splash of the Ubuntu logo, he got a blank screen. Not even the usual Ubuntu boot option list was displayed - just a black screen (with a tiny top bit coloured ubuntu purple). Subsequent rebooting attempts (powering off & on) got the same outcome. ** A quick note about the "computer freeze up" scenario during the upgrade before: From my own recent experience, actually the upgrade did not "freeze", it just sit there waiting for a user response. And the only way you can find this out is to expand the "Terminal" window within the Upgrade Wizard/Panel - which would show a message describing the issue at hand, and the user suppose to enter the relevant command before the whole install process would continue. @Ubuntu: How on earth a newbie would have known what to do in this scenario? More likely they would deem the process 'frozen' and did the next logical thing - reboot! I had used a Live CD to boot the PC up and confirmed that all his data (/home) is in a separate partition, so a clean install of 12.04 will not loose his data completely. However, that would mean I have to spend lots more time re-installing all his extra programs, installing codecs, configuring his scanner, etc (that I'd spent many hours/days fine-tuning in the previous 11.10 install). So my question to the LUV'ers out there, is there a way I can do to get back to his 11.10 version? Any tips will help as I have not done such rescue before. BTW, when I boot up an Ubuntu 12.04 amd64 Desktop Live CD on that PC, I didn't see a "Rescue mode" option. Should that be in the Alternate CD, or previous version of Ubuntu? This posting is meant not just to seek help as mentioned above, but also to warn those who are about to do an upgrade to 12.04 about that particular "Terminal" window trick - to avoid any unnecessary rebooting in the middle of an upgrade process. Cheers, Wen

On Sun, 13 May 2012, Wen Lin <vwenlin@gmail.com> wrote:
I had used a Live CD to boot the PC up and confirmed that all his data (/home) is in a separate partition, so a clean install of 12.04 will not loose his data completely. However, that would mean I have to spend lots more time re-installing all his extra programs, installing codecs, configuring his scanner, etc (that I'd spent many hours/days fine-tuning in the previous 11.10 install).
So my question to the LUV'ers out there, is there a way I can do to get back to his 11.10 version? Any tips will help as I have not done such rescue before.
When using dpkg to upgrade a system (via APT or whatever Ubuntu uses) you can't just downgrade. Downgrading an individual package is easy and should always work, downgrading lots of them isn't easy and I don't think we guarantee it to work. If you boot from another device (USB or CD) then you can get chroot into the filesystem (this can be expected to work in such situations of corruption) and then run dpkg commands to get a list of installed packages. Getting a useful list of packages to install after that situation will involve some manual work as an upgrade between major versions always involves some packages being removed and some new ones added. So a list of installed packages probably isn't doing to match either the old version of Ubuntu or the new version. Also after booting from another device you can make a backup of /etc which should be useful in recreating the new system. Don't try doing a cp -a over the new installation (that won't work and will probably give an unbootable system). The thing to do is to do a fresh install and then run "diff -ru" between the new /etc and the backup of /etc and then copy over whatever seems appropriate. This is what I did the last time I had a system in need of such a reinstall. Good luck! -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/

Thanks Russell for your quick response. Actually I was hoping that install process didn't get very far, and that none of the 11.10 packages had yet to be replaced. Then perhaps I could, say, go into rescue mode from a Live CD and just fix the corrupted boot loader or something? Initially I also thought that perhaps the problem was due to the X-Windows issue with the graphic card (it's a separate NVIDIA card, and the PC is a few-month-old new i5 whitebox, from CPL) resulting in display problem. However, I did a check using the Ctrl-Alt-F1 command but it didn't bring me to a pure terminal screen - indicates that the whole system did indeed froze by now (or is it?) Cheers, Wen On Sun, May 13, 2012 at 2:33 PM, Russell Coker <russell@coker.com.au> wrote:
On Sun, 13 May 2012, Wen Lin <vwenlin@gmail.com> wrote:
I had used a Live CD to boot the PC up and confirmed that all his data (/home) is in a separate partition, so a clean install of 12.04 will not loose his data completely. However, that would mean I have to spend lots more time re-installing all his extra programs, installing codecs, configuring his scanner, etc (that I'd spent many hours/days fine-tuning in the previous 11.10 install).
So my question to the LUV'ers out there, is there a way I can do to get back to his 11.10 version? Any tips will help as I have not done such rescue before.
When using dpkg to upgrade a system (via APT or whatever Ubuntu uses) you can't just downgrade. Downgrading an individual package is easy and should always work, downgrading lots of them isn't easy and I don't think we guarantee it to work.
If you boot from another device (USB or CD) then you can get chroot into the filesystem (this can be expected to work in such situations of corruption) and then run dpkg commands to get a list of installed packages. Getting a useful list of packages to install after that situation will involve some manual work as an upgrade between major versions always involves some packages being removed and some new ones added. So a list of installed packages probably isn't doing to match either the old version of Ubuntu or the new version.
Also after booting from another device you can make a backup of /etc which should be useful in recreating the new system. Don't try doing a cp -a over the new installation (that won't work and will probably give an unbootable system). The thing to do is to do a fresh install and then run "diff -ru" between the new /etc and the backup of /etc and then copy over whatever seems appropriate. This is what I did the last time I had a system in need of such a reinstall.
Good luck!
-- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/

On Sun, 13 May 2012, Wen Lin <vwenlin@gmail.com> wrote:
Actually I was hoping that install process didn't get very far, and that none of the 11.10 packages had yet to be replaced. Then perhaps I could, say, go into rescue mode from a Live CD and just fix the corrupted boot loader or something?
If it's got far enough to change the boot sequence then it's replaced packages.
Initially I also thought that perhaps the problem was due to the X-Windows issue with the graphic card (it's a separate NVIDIA card, and the PC is a few-month-old new i5 whitebox, from CPL) resulting in display problem.
Is Ubuntu one of those distributions that starts X really early in the boot? If so there should be a way of disabling that to get a text mode boot. Completing the upgrade in text mode should be possible.
However, I did a check using the Ctrl-Alt-F1 command but it didn't bring me to a pure terminal screen - indicates that the whole system did indeed froze by now (or is it?)
If the X server locks up badly then it can make CTRL-ALT-F1 not work. -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/

On 13/05/12 15:14, Russell Coker wrote:
Is Ubuntu one of those distributions that starts X really early in the boot? If so there should be a way of disabling that to get a text mode boot. Completing the upgrade in text mode should be possible.
No, it’s not. Fedora and Red Hat were the ones to do that in the olden days, but since Plymouth, they don’t do it these days either. But they do have the “quiet” and “splash” boot parameters enabled by default, which hides any useful output. On 13/05/12 14:09, Wen Lin wrote:
Instead, when his PC (there is no dual-boot in this machine - just pure Ubuntu) rebooted, after going pass the usual BIOS/Video card splash screen, followed by a quick splash of the Ubuntu logo, he got a blank screen. Not even the usual Ubuntu boot option list was displayed - just a black screen (with a tiny top bit coloured ubuntu purple).
Try holding Shift as you boot up. The GRUB menu is hidden by default if there is no other OS installed. You should be able to select a recovery option from there. If that doesn’t work, you may need to boot from a live CD, mount the target system, chroot in, and run "apt-get -f install" to complete the remaining installation. Of course, if there has been too much damage done, then this may not work, and you will need to follow Russell’s guidelines for recovering the system. I should point out that no operating system is invulnerable from monkey attacks like this one. I have seen Windows, Linux, and Mac OS X installations b0rked due to upgrades where a monkey took control before it completed. Unfortunately that’s the way the cookie crumbles, and data recovery is probably the best long-term option.

Jeremy Visser <jeremy@visser.name> wrote:
I should point out that no operating system is invulnerable from monkey attacks like this one. I have seen Windows, Linux, and Mac OS X installations b0rked due to upgrades where a monkey took control before it completed. Unfortunately that’s the way the cookie crumbles, and data recovery is probably the best long-term option.
Opinions will probably differ, but, having run Debian testing and unstable for a very long time, I somewhat prefer to upgrade just a subset of the packages every couple of days or every week than to upgrade the entire system in one move from one release to a significantly different release. This way, by reading the log of which packages were upgraded, I often know where to look and what to try downgrading when something breaks, as it sometimes does.

I should point out that no operating system is invulnerable from monkey attacks like this one. I have seen Windows, Linux, and Mac OS X installations b0rked due to upgrades where a monkey took control before it completed. Unfortunately that’s the way the cookie crumbles, and data recovery is probably the best long-term option. FWIW. Both Fedora and Ubuntu seem to recommend updating OS files regularly, I've seen this mentioned quite a lot over the years. I update both every few days. My daughter just yesterday updated her Ubuntu Oneiric laptop to Precise after updating to all the latest files, it took from about 4:30pm to 10:45pm to complete downloading, installing and checking the file system. Her system stopped for about 18 minutes - doing what ever it was doing, she just let it go and eventually it got going again. She googled some page or other every 5 minutes to make sure the bigpond inernet did not time out... we had that time out with the last ubuntu upgrade so she made sure it wouldn't happen again.
I'm thinking the stoppage experienced may have been internet time out that triggered monkey attack. Hope this helps Roger

On 13/05/12 17:56, Roger wrote:
I should point out that no operating system is invulnerable from monkey attacks like this one. I have seen Windows, Linux, and Mac OS X installations b0rked due to upgrades where a monkey took control before it completed. Unfortunately that’s the way the cookie crumbles, and data recovery is probably the best long-term option. FWIW. Both Fedora and Ubuntu seem to recommend updating OS files regularly, I've seen this mentioned quite a lot over the years. I update both every few days. My daughter just yesterday updated her Ubuntu Oneiric laptop to Precise after updating to all the latest files, it took from about 4:30pm to 10:45pm to complete downloading, installing and checking the file system. Her system stopped for about 18 minutes - doing what ever it was doing, she just let it go and eventually it got going again. She googled some page or other every 5 minutes to make sure the bigpond inernet did not time out... we had that time out with the last ubuntu upgrade so she made sure it wouldn't happen again.
That's odd.. The way the Ubuntu upgrader works is specifically designed to avoid that problem of internet connections timing out halfway through. The upgrader will download every package, before starting to install them.
I'm thinking the stoppage experienced may have been internet time out that triggered monkey attack. Hope this helps Roger

On 14 May 2012 11:01, Toby Corkindale <toby.corkindale@strategicdata.com.au> wrote:
That's odd.. The way the Ubuntu upgrader works is specifically designed to avoid that problem of internet connections timing out halfway through. The upgrader will download every package, before starting to install them.
... except for some non-free packages. e.g. adobe flash downloads its files at install time. I think there is some other package that does something similar for Microsoft fonts. IMHO Ubuntu's upgrade process is somewhat fragile, any errors will abort the entire upgrade, and it isn't possible to have it automatically resume from where it left of. Running out of disk space seems to be the most common problem I have had. Sure, it checks for diskspace before starting, but it seems to require more space then it asks for. Personally, when something goes wrong with an Ubuntu install (as happens far too often), I find these sequence of commands most useful. df -h dpkg --configure --pending apt-get -f install apt-get upgrade apt-get dist-upgrade The first one will display available disk space. No point continuing if you have little or no disk space. The next line, "dpkg --configure --pening", will configure any pending packages. Note that if one fails, any dependant packages will also fail, this produces very verbose output. Need to scroll to the top and see why the first one failed. This line might fail because dependant packages aren't installed yet, in which case the next statement may (or may not) fix that. "apt-get -f install". If the first line worked, the second line should do exactly nothing. Need to keep an eye on "apt-get -f install" - sometimes its resolution to problems is to delete half the installed packages on the system, which is obviously wrong. The last two lines will continue the upgrade. The "upgrade" is optional, but perhaps safest at this point. These just leaves the stop of deleting obsolete packages. I use a combination of aptitude and deborphan for that. If it gets too complicated and you don't feel up to the task, reinstalling from scratch might be the best solution. Fortunately I have never had to do this myself. -- Brian May <brian@microcomaustralia.com.au>

Also font packages have done downloads as have games downloading data files. But a reboot at that time would be unlikely to cause problems as nothing important is changing on disk. The problem in that case might be someone running out of patience during the download and pressing reset shortly afterwards. -- Sent from my Samsung Galaxy S Android phone with K-9 Mail.

On 14/05/12 11:39, Brian May wrote:
On 14 May 2012 11:01, Toby Corkindale <toby.corkindale@strategicdata.com.au> wrote:
That's odd.. The way the Ubuntu upgrader works is specifically designed to avoid that problem of internet connections timing out halfway through. The upgrader will download every package, before starting to install them.
... except for some non-free packages. e.g. adobe flash downloads its files at install time. I think there is some other package that does something similar for Microsoft fonts.
Ah, very good point there. I'd forgotten about those. I think the Sun^WOracle Java download used to do the same too, but Ubuntu switched to OpenJDK ages ago.

Toby Corkindale <toby.corkindale@strategicdata.com.au> wrote:
That's odd.. The way the Ubuntu upgrader works is specifically designed to avoid that problem of internet connections timing out halfway through.
This is probably inherited from apt-get and aptitude, which both download all packages before starting to install them. The only exceptions (as noted in this thread) are non-free packages that download the software from the vendor's site. I don't install these and I doubt that they're included in a standard installation.

Wen Lin <vwenlin@gmail.com> wrote:
I had used a Live CD to boot the PC up and confirmed that all his data (/home) is in a separate partition, so a clean install of 12.04 will not loose his data completely. However, that would mean I have to spend lots more time re-installing all his extra programs, installing codecs, configuring his scanner, etc (that I'd spent many hours/days fine-tuning in the previous 11.10 install).
So my question to the LUV'ers out there, is there a way I can do to get back to his 11.10 version? Any tips will help as I have not done such rescue before.
I suppose you could copy /etc, /usr/local and any other relevant directories to a backup drive, chroot into the system and try to extract the list of installed packages with dpkg --get-selections \* > filename (see the recent thread on this list), save this on the backup disk, take a copy of /home just in case and install the upgraded distribution from the beginning. You can then copy over the needed config files, automatically install all the packages in the get-selections list you took, and basically do the customizing much more quickly. Even if the package databases are corrupt, you should still be able to salvage /etc and other crucial directories. It all depends on the exact state of the partially upgraded system and what has been overwritten.
participants (7)
-
Brian May
-
Jason White
-
Jeremy Visser
-
Roger
-
Russell Coker
-
Toby Corkindale
-
Wen Lin