New IT forum
29 June 2022, 12:07:50 pm *
Welcome, %1$s. Please login or register.

: GertDuino now in stock.
 
Pages: [1]

Author Topic: Failed to upgrade to Ubuntu Lucid - how can I recover?  (Read 13845 times)

bittner

  • Newbie
  • *
  • Posts: 6
    • Notes on Linux
Failed to upgrade to Ubuntu Lucid - how can I recover?
« on: 31 October 2010, 10:07:49 am »

Hi,

I've bought the eSata SheevaPlug with EU power kit and the Ubuntu UBIFS file system last week. It booted fine and I could log in using SSH.

The first thing I wanted to do with it is upgrade Ubuntu Jaunty to Lucid (since Jaunty support ends this month, and Lucid is an LTS release - long time support). Unfortunately, I didn't read this post before doing it, which explains that the SheevaPlug cannot be upgraded to any other Ubuntu release newer than Jaunty!

What I have done is:
  • Upgrade the Jaunty system first: apt-get update && apt-get upgrade && apt-get dist-upgrade
  • Edit /etc/apt/sources.list, and replace "jaunty" by "lucid"
  • Run dist-upgrade: apt-get dist-upgrade

The operation failed and left my system in a state that leaves me unable to revert back (with my current knowledge). When I try to run apt (with any arbitrary parameter) it says:
Code: [Select]
[email protected]:~# apt-get update
Illegal instruction

Here is the output of the dist-upgrade process: (I omitted the file downloading part)
Code: [Select]
[email protected]:~# apt-get dist-upgrade
[...]
Fetched 71.3MB in 1min 35s (746kB/s)                                                                                              
Extracting templates from packages: 100%
Preconfiguring packages ...
Selecting previously deselected package gcc-4.4-base.
(Reading database ... 13259 files and directories currently installed.)
Unpacking gcc-4.4-base (from .../gcc-4.4-base_4.4.3-4ubuntu5_armel.deb) ...
Setting up gcc-4.4-base (4.4.3-4ubuntu5) ...
(Reading database ... 13266 files and directories currently installed.)
Preparing to replace libgcc1 1:4.3.3-5ubuntu4 (using .../libgcc1_1%3a4.4.3-4ubuntu5_armel.deb) ...
Unpacking replacement libgcc1 ...
Setting up libgcc1 (1:4.4.3-4ubuntu5) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
dpkg: error processing /var/cache/apt/archives/libglib2.0-0_2.24.1-0ubuntu1_armel.deb (--unpack):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
dpkg: error processing /var/cache/apt/archives/netcat-openbsd_1.89-3ubuntu2_armel.deb (--unpack):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
dpkg: error processing /var/cache/apt/archives/libdbus-1-3_1.2.16-2ubuntu4_armel.deb (--unpack):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
dpkg: error processing /var/cache/apt/archives/libnih1_1.0.1-1_armel.deb (--unpack):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
No apport report written because MaxReports is reached already
                                                              dpkg: error processing /var/cache/apt/archives/libnih-dbus1_1.0.1-1_armel.deb (--unpack):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
No apport report written because MaxReports is reached already
                                                              dpkg: error processing /var/cache/apt/archives/libudev0_151-12.1_armel.deb (--unpack):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
No apport report written because MaxReports is reached already
                                                              dpkg: error processing /var/cache/apt/archives/libdrm2_2.4.18-1ubuntu3_armel.deb (--unpack):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
No apport report written because MaxReports is reached already
                                                              dpkg: error processing /var/cache/apt/archives/libdrm-intel1_2.4.18-1ubuntu3_armel.deb (--unpack):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
No apport report written because MaxReports is reached already
                                                              dpkg: error processing /var/cache/apt/archives/libdrm-nouveau1_2.4.18-1ubuntu3_armel.deb (--unpack):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
No apport report written because MaxReports is reached already
                                                              dpkg: error processing /var/cache/apt/archives/libdrm-radeon1_2.4.18-1ubuntu3_armel.deb (--unpack):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
No apport report written because MaxReports is reached already
                                                              dpkg: error processing /var/cache/apt/archives/libpng12-0_1.2.42-1ubuntu2.1_armel.deb (--unpack):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
No apport report written because MaxReports is reached already
                                                              dpkg: error processing /var/cache/apt/archives/libplymouth2_0.8.2-2ubuntu2_armel.deb (--unpack):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
No apport report written because MaxReports is reached already
                                                              dpkg: error processing /var/cache/apt/archives/initramfs-tools-bin_0.92bubuntu78_armel.deb (--unpack):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
No apport report written because MaxReports is reached already
                                                              dpkg: error processing /var/cache/apt/archives/busybox-initramfs_1%3a1.13.3-1ubuntu11_armel.deb (--unpack):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
No apport report written because MaxReports is reached already
                                                              dpkg: error processing /var/cache/apt/archives/libc-bin_2.11.1-0ubuntu7.5_armel.deb (--unpack):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 /var/cache/apt/archives/libglib2.0-0_2.24.1-0ubuntu1_armel.deb
 /var/cache/apt/archives/netcat-openbsd_1.89-3ubuntu2_armel.deb
 /var/cache/apt/archives/libdbus-1-3_1.2.16-2ubuntu4_armel.deb
 /var/cache/apt/archives/libnih1_1.0.1-1_armel.deb
 /var/cache/apt/archives/libnih-dbus1_1.0.1-1_armel.deb
 /var/cache/apt/archives/libudev0_151-12.1_armel.deb
 /var/cache/apt/archives/libdrm2_2.4.18-1ubuntu3_armel.deb
 /var/cache/apt/archives/libdrm-intel1_2.4.18-1ubuntu3_armel.deb
 /var/cache/apt/archives/libdrm-nouveau1_2.4.18-1ubuntu3_armel.deb
 /var/cache/apt/archives/libdrm-radeon1_2.4.18-1ubuntu3_armel.deb
 /var/cache/apt/archives/libpng12-0_1.2.42-1ubuntu2.1_armel.deb
 /var/cache/apt/archives/libplymouth2_0.8.2-2ubuntu2_armel.deb
 /var/cache/apt/archives/initramfs-tools-bin_0.92bubuntu78_armel.deb
 /var/cache/apt/archives/busybox-initramfs_1%3a1.13.3-1ubuntu11_armel.deb
 /var/cache/apt/archives/libc-bin_2.11.1-0ubuntu7.5_armel.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
[email protected]:~# apt-get dist-upgrade
Illegal instruction
[email protected]:~# apt-get upgrade
Illegal instruction
[email protected]:~# apt-get install
Illegal instruction
[email protected]:~# apt-get update
Illegal instruction
[email protected]:~# apt-get update --force
Illegal instruction
[email protected]:~#

Can anyone suggest how I can get back to a working system? I still have my SSH session open, I don't dare to close it, just in case.   ???

Any help is greatly appreciated!
« Last Edit: 31 October 2010, 10:48:57 am by bittner »
Logged

NewIT_Marcus

  • Hero Member
  • *****
  • Posts: 960
Re: Failed to upgrade to Ubuntu Lucid - how can I recover?
« Reply #1 on: 31 October 2010, 02:08:25 pm »

In the past I had considered attempting what you have done in order to be able to offer advice for anyone else who did the same thing. Unfortunately for you, I never did follow up on it so right now you are the guinea pig.

You have a few options for recovery, and ultimately you will probably need access to the serial console.

However:

If you still have your ssh session running, the first thing to test for is perhaps disk usage. df -h and if the NAND drive is full, try deleting any downloaded packages from the attempted upgrade. After you've done that, maybe the system will become more responsive to any other commands that you attempt.

The other way you may be able to tidy up the file system is by booting from SD card and mounting the NAND.

Frankly, my expectation of recovery by trying to tidy up your messed up file system is low.

The final solution is to rewrite the entire NAND, and you have 2 choices for that. As above, you could boot from SD card, mount the NAND, and rewrite it.
Alternatively (and this is comparatively simple because you purchased a plug that was already reflashed this way, and the environment varables are still set up ready for a re-re-flash), you could prepare a USB stick with the rootfs and re-run the final part of the installer procedure. You'll need to establish a serial connection to the U-Boot prompt in order to be able to do this. What you've already done won't interfere with your ability to get to U-Boot.

To do this, you'll need to obtain a compressed rootfs. There's an Ubuntu one inside the installer package, or you can download a debian or fedora rootfs if you wanted to use a different distribution. (I googled briefly for a downloadable version of a debian rootfs but couldn't find anything. Maybe there is one to be found, maybe not. The alternative to this is to build your own using debootstrap; you can do this on your plug by booting from SD card. Therefore the link I've given is to the one that we use internally). The fedora rootfs needs to be decompressed and recompressed to .tar.gz in order for the installer to be able to process it.

You also need on your USB stick a kernel and modules. There may be a minor complication here if you have an A1 plug, but if you do end up with a plug with corrupted characters in the serial console, you will still be able to ssh in and perform the final kernel upgrade.

The best way to prepare the USB stick (the documentation refers to it as a DOK - "disk on key") is to follow the installer instructions, then replace the important files:


If you choose incorrectly, you may lack eSATA functionality when your plug comes back up. That will be easily fixed by running the kernel upgrade script from sheeva.with-linux.com for an alternative kernel.

So, finally, this is how you do it:

  • Insert your DOK USB stick into the plug
  • Get to the U-Boot prompt
  • type run recover2
  • Watch and wait for about 6 minutes
  • When the plug comes back up, login and test it

If you are using our uImage, your U-Boot environment variable arcNumber should be 2097. If you are using a kernel from sheeva.with-linux.com then you will need to change it to 2678.

setenv arcNumber 2678
saveenv
reset

You will be completely safe in using arcNumber 2097 (its current setting) until the plug reboots. When you login and test eSATA, and it doesn't work, that's when to change arcNumber. (If you change arcNumber before the attempted recovery, and you use an old uImage, the procedure may not work).

If you do all of this and get your plug back, but without eSATA, don't panic. Report back here and I'll give you the final nudge.
Logged

bittner

  • Newbie
  • *
  • Posts: 6
    • Notes on Linux
Re: Failed to upgrade to Ubuntu Lucid - how can I recover?
« Reply #2 on: 01 November 2010, 09:09:44 am »

Thanks, that worked!

Here's a short summary of what I did, step-by-step:

  • Prepared FAT32 USB stick (sudo fdisk /dev/sdb1; sudo mkfs.vfat /dev/sdb1; sudo mount /dev/sdb1 /mnt)
  • Copied content of installer tarball's installer directory to stick (sudo cp installer/* /mnt/)
  • Copied your uImage over the one on the stick (sudo cp uImage /mnt/)
  • Unmounted the stick (sudo umount /mnt)
  • Plugged the stick in on the SheevaPlug, powered the SheevaPlug on, and started the terminal client (PuTTY, using /dev/ttyUSB0)
  • After a few seconds on the screen it said "Hit any key to stop autoboot:", and I pressed a key to stop the SheevaPlug from booting.
The screen looked list this:
Code: [Select]
512 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0
Marvell>>

  • At this point I typed "run recover2", and the installation started.
  • When it was finished the device rebooted automatically, and I could log in as "root" with the default password.

The SheevaPlug works fine again, I can access it again using SSH, as before.
« Last Edit: 01 November 2010, 11:12:34 am by bittner »
Logged

bittner

  • Newbie
  • *
  • Posts: 6
    • Notes on Linux
Re: Failed to upgrade to Ubuntu Lucid - how can I recover?
« Reply #3 on: 01 November 2010, 09:17:00 am »

Just a quick question that fits with this installation:

There are some error messages when the SheevaPlug boots. I had noted this before re-installing the (defunct) SheevaPlug, and with the new installed device the error messages stay the same.

Code: [Select]
512 MB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0
Error! cmd : 8, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 55, err : 0201
Error! cmd : 41, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
Error! cmd : 1, err : 0201
No MMC card found
** Bad partition 1 **
## Booting image at 00800000 ...
Bad Magic Number

NAND read: device 0 offset 0x100000, size 0x400000

Reading data from 0x4ff800 -- 100% complete.
 4194304 bytes read: OK
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.30.2
   Created:      2010-08-24  19:10:27 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2584208 Bytes =  2.5 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

As I said, the device boots fine and all is great. But those error messages ("Error! cmd : nn, err : 0201", and the "Bad Magic Number"), what do they mean?

NewITMalcolm

  • Administrator
  • Sr. Member
  • *****
  • Posts: 394
Re: Failed to upgrade to Ubuntu Lucid - how can I recover?
« Reply #4 on: 01 November 2010, 03:42:12 pm »

Those errors are normal for a Multiboot sheevaplug. It's just trying to boot to the SD card which is not plugged in so the errors appear, it then gives up trying and boots to the Nand.

Logged
NewITJames

roosoft

  • Newbie
  • *
  • Posts: 1
Re: Failed to upgrade to Ubuntu Lucid - how can I recover?
« Reply #5 on: 13 April 2011, 02:29:47 pm »

Well I can help narrow down what is going on, and hopefully we can work out what we can do to avoid a bare recovery.

Simply put I too added lucid to the sources.list and  tried to upgrade zoneminder. During that process I got one fatal error:


E: Internal Error, Could not perform immediate configuration (2) on util-linux

So being the adventurous sort that I am I decided to try and install things manually.

Going to the archives directory and running dpkg -i on the util-linux gave me some dependency errors, so I tried again with those until I hit libgcc1.

An extract follows:

-- CUT --

dpkg -i util-linux_2.17.2-0ubuntu1_armel.deb
dpkg: regarding util-linux_2.17.2-0ubuntu1_armel.deb containing util-linux, pre-dependency problem:
 util-linux pre-depends on libblkid1 (>= 2.17)
  libblkid1 is installed, but is version 1.41.4-1ubuntu1.
dpkg: error processing util-linux_2.17.2-0ubuntu1_armel.deb (--install):
 pre-dependency problem - not installing util-linux
Errors were encountered while processing:
 util-linux_2.17.2-0ubuntu1_armel.deb
[email protected]:/var/cache/apt/archives# dpkg -i util-linux_2.17.2-0ubuntu1_armel.deb libblkid1_2.17.2-0ubuntu1_armel.deb
dpkg: regarding util-linux_2.17.2-0ubuntu1_armel.deb containing util-linux, pre-dependency problem:
 util-linux pre-depends on libblkid1 (>= 2.17)
  libblkid1 is installed, but is version 1.41.4-1ubuntu1.
dpkg: error processing util-linux_2.17.2-0ubuntu1_armel.deb (--install):
 pre-dependency problem - not installing util-linux
(Reading database ... 17421 files and directories currently installed.)
Preparing to replace libblkid1 1.41.4-1ubuntu1 (using libblkid1_2.17.2-0ubuntu1_armel.deb) ...
Unpacking replacement libblkid1 ...
dpkg: dependency problems prevent configuration of libblkid1:
 libblkid1 depends on libgcc1 (>= 1:4.4.0); however:
  Version of libgcc1 on system is 1:4.3.3-5ubuntu4.
 libblkid1 depends on libuuid1 (>= 2.16); however:
  Version of libuuid1 on system is 1.41.4-1ubuntu1.
dpkg: error processing libblkid1 (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 util-linux_2.17.2-0ubuntu1_armel.deb
 libblkid1
[email protected]:/var/cache/apt/archives# dpkg -i util-linux_2.17.2-0ubuntu1_armel.deb libblkid1_2.17.2-0ubuntu1_armel.deb libgcc1_1%3a4.4.3-4ubuntu5_armel.deb
dpkg: regarding util-linux_2.17.2-0ubuntu1_armel.deb containing util-linux, pre-dependency problem:
 util-linux pre-depends on libblkid1 (>= 2.17)
  libblkid1 latest configured version is 1.41.4-1ubuntu1.
dpkg: error processing util-linux_2.17.2-0ubuntu1_armel.deb (--install):
 pre-dependency problem - not installing util-linux
(Reading database ... 17424 files and directories currently installed.)
Preparing to replace libblkid1 2.17.2-0ubuntu1 (using libblkid1_2.17.2-0ubuntu1_armel.deb) ...
Unpacking replacement libblkid1 ...
Preparing to replace libgcc1 1:4.3.3-5ubuntu4 (using libgcc1_1%3a4.4.3-4ubuntu5_armel.deb) ...
Unpacking replacement libgcc1 ...
dpkg: dependency problems prevent configuration of libblkid1:
 libblkid1 depends on libuuid1 (>= 2.16); however:
  Version of libuuid1 on system is 1.41.4-1ubuntu1.
dpkg: error processing libblkid1 (--install):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgcc1:
 libgcc1 depends on gcc-4.4-base (= 4.4.3-4ubuntu5); however:
  Package gcc-4.4-base is not installed.
dpkg: error processing libgcc1 (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 util-linux_2.17.2-0ubuntu1_armel.deb
 libblkid1
 libgcc1
[email protected]:/var/cache/apt/archives# dpkg -i util-linux_2.17.2-0ubuntu1_armel.deb libblkid1_2.17.2-0ubuntu1_armel.deb libgcc1_1%3a4.4.3-4ubuntu5_armel.deb  gcc-4.4-base
dpkg: error processing util-linux_2.17.2-0ubuntu1_armel.deb (--install):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
dpkg: error processing libblkid1_2.17.2-0ubuntu1_armel.deb (--install):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
dpkg: error processing libgcc1_1%3a4.4.3-4ubuntu5_armel.deb (--install):
 subprocess dpkg-deb --control killed by signal (Illegal instruction)
dpkg: error processing gcc-4.4-base (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 util-linux_2.17.2-0ubuntu1_armel.deb
 libblkid1_2.17.2-0ubuntu1_armel.deb
 libgcc1_1%3a4.4.3-4ubuntu5_armel.deb
 gcc-4.4-base
-- CUT --

I am currently logged into the system however it looks like a key library (libgcc1 I suspect) is corrupt as anything other than shell commands are not working. Even ls fails with an illegal instruction. Could it be the lib is the wrong endian and broke like that?

Thoughts please.. I would be curious to do something other than re-installing from scratch.


-- UPDATE --

Ok so my hunch was right. libgcc_s_so.1 is broken  in some way for the sheeva plug. How do I know this? Because fortunately I was still logged into the box and command like cat, echo, more, less and most importantly mount still worked. So I copied a slightly older version of libgcc_s_so.1 (libgcc1_4.3.3-5ubuntu4_armel.deb to be precise) onto an SDcard and was able to mount it and use "cat libgcc_s_so.1 > /lib/libgcc_s_so.1". Hey presto all works again now. I don't as yet know what is wrong with the old version but I will supersede it with this one that does work.


ok Further update

This link explains it all. Ubuntu you SUCK! I was going to install Debian anyway.. Talk about shoddy ports..

http://plugcomputer.org/plugforum/index.php?topic=885.0

Later,

Good luck.
« Last Edit: 13 April 2011, 03:57:13 pm by roosoft »
Logged
Pages: [1]
 
 

Powered by MySQL Powered by PHP SMF 2.0.10 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!