PDA

View Full Version : [ubuntu] System doesnt boot after dist-upgrade



micdhack
December 9th, 2009, 12:31 PM
Hello i am having serious problems with my server.
Last night i saw that there were updates for bind apache php so i decided to do a dist-upgrade.

the log is:

~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
libdns36 linux-image-2.6.24-26-server linux-ubuntu-modules-2.6.24-26-server
The following packages will be upgraded:
apache2 apache2-doc apache2-mpm-prefork apache2-utils apache2.2-common bind9
dnsutils libapache2-mod-php5 libbind9-30 libdns35 libisc35 libisccc30
libisccfg30 liblwres30 linux-image-server linux-libc-dev linux-server
php-pear php5 php5-cgi php5-cli php5-common php5-curl php5-gd php5-mhash
php5-mysql php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy
php5-xmlrpc php5-xsl tzdata
34 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 40.6MB of archives.
After this operation, 109MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://de.archive.ubuntu.com hardy-updates/main linux-image-2.6.24-26-server 2.6.24-26.64 [17.8MB]
Get:2 http://de.archive.ubuntu.com hardy-updates/main linux-ubuntu-modules-2.6.24-26-server 2.6.24-26.43 [5690kB]
Get:3 http://de.archive.ubuntu.com hardy-updates/main tzdata 2009s~repack-0ubuntu0.8.04 [685kB]
Get:4 http://de.archive.ubuntu.com hardy-updates/main bind9 1:9.4.2.dfsg.P2-2ubuntu0.4 [284kB]
Get:5 http://de.archive.ubuntu.com hardy-updates/main dnsutils 1:9.4.2.dfsg.P2-2ubuntu0.4 [144kB]
Get:6 http://de.archive.ubuntu.com hardy-updates/main libisc35 1:9.4.2.dfsg.P2-2ubuntu0.4 [139kB]
Get:7 http://de.archive.ubuntu.com hardy-updates/main libdns35 1:9.4.2.dfsg.P2-2ubuntu0.4 [11.1kB]
Get:8 http://de.archive.ubuntu.com hardy-updates/main libdns36 1:9.4.2.dfsg.P2-2ubuntu0.4 [551kB]
Get:9 http://de.archive.ubuntu.com hardy-updates/main libisccc30 1:9.4.2.dfsg.P2-2ubuntu0.4 [25.4kB]
Get:10 http://de.archive.ubuntu.com hardy-updates/main libisccfg30 1:9.4.2.dfsg.P2-2ubuntu0.4 [45.4kB]
Get:11 http://de.archive.ubuntu.com hardy-updates/main liblwres30 1:9.4.2.dfsg.P2-2ubuntu0.4 [43.5kB]
Get:12 http://de.archive.ubuntu.com hardy-updates/main libbind9-30 1:9.4.2.dfsg.P2-2ubuntu0.4 [27.9kB]
Get:13 http://de.archive.ubuntu.com hardy-updates/main apache2-utils 2.2.8-1ubuntu0.14 [142kB]
Get:14 http://de.archive.ubuntu.com hardy-updates/main apache2-mpm-prefork 2.2.8-1ubuntu0.14 [249kB]
Get:15 http://de.archive.ubuntu.com hardy-updates/main apache2.2-common 2.2.8-1ubuntu0.14 [804kB]
Get:16 http://de.archive.ubuntu.com hardy-updates/main apache2 2.2.8-1ubuntu0.14 [45.9kB]
Get:17 http://de.archive.ubuntu.com hardy-updates/main apache2-doc 2.2.8-1ubuntu0.14 [1929kB]
Get:18 http://de.archive.ubuntu.com hardy-updates/main php5-cli 5.2.4-2ubuntu5.9 [2571kB]
Get:19 http://de.archive.ubuntu.com hardy-updates/main php5-cgi 5.2.4-2ubuntu5.9 [5088kB]
Get:20 http://de.archive.ubuntu.com hardy-updates/main php5-mysql 5.2.4-2ubuntu5.9 [74.4kB]
Get:21 http://de.archive.ubuntu.com hardy-updates/main php5-mhash 5.2.4-2ubuntu5.9 [5542B]
Get:22 http://de.archive.ubuntu.com hardy-updates/main php5-xsl 5.2.4-2ubuntu5.9 [13.6kB]
Get:23 http://de.archive.ubuntu.com hardy-updates/main php5-pspell 5.2.4-2ubuntu5.9 [9538B]
Get:24 http://de.archive.ubuntu.com hardy-updates/main php5-snmp 5.2.4-2ubuntu5.9 [12.4kB]
Get:25 http://de.archive.ubuntu.com hardy-updates/main php5-curl 5.2.4-2ubuntu5.9 [25.0kB]
Get:26 http://de.archive.ubuntu.com hardy-updates/main php5-recode 5.2.4-2ubuntu5.9 [5032B]
Get:27 http://de.archive.ubuntu.com hardy-updates/main php5-xmlrpc 5.2.4-2ubuntu5.9 [38.5kB]
Get:28 http://de.archive.ubuntu.com hardy-updates/main php5-sqlite 5.2.4-2ubuntu5.9 [39.6kB]
Get:29 http://de.archive.ubuntu.com hardy-updates/main php5-gd 5.2.4-2ubuntu5.9 [37.3kB]
Get:30 http://de.archive.ubuntu.com hardy-updates/main php5-tidy 5.2.4-2ubuntu5.9 [17.9kB]
Get:31 http://de.archive.ubuntu.com hardy-updates/main libapache2-mod-php5 5.2.4-2ubuntu5.9 [2614kB]
Get:32 http://de.archive.ubuntu.com hardy-updates/main php5-common 5.2.4-2ubuntu5.9 [320kB]
Get:33 http://de.archive.ubuntu.com hardy-updates/restricted linux-server 2.6.24.26.28 [26.7kB]
Get:34 http://de.archive.ubuntu.com hardy-updates/main linux-image-server 2.6.24.26.28 [26.7kB]
Get:35 http://de.archive.ubuntu.com hardy-updates/main linux-libc-dev 2.6.24-26.64 [707kB]
Get:36 http://de.archive.ubuntu.com hardy-updates/main php-pear 5.2.4-2ubuntu5.9 [355kB]
Get:37 http://de.archive.ubuntu.com hardy-updates/main php5 5.2.4-2ubuntu5.9 [1078B]
Fetched 40.6MB in 3s (10.2MB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
Selecting previously deselected package linux-image-2.6.24-26-server.
(Reading database ... 45324 files and directories currently installed.)
Unpacking linux-image-2.6.24-26-server (from .../linux-image-2.6.24-26-server_2.6.24-26.64_amd64.deb) ...
Done.
Selecting previously deselected package linux-ubuntu-modules-2.6.24-26-server.
Unpacking linux-ubuntu-modules-2.6.24-26-server (from .../linux-ubuntu-modules-2.6.24-26-server_2.6.24-26.43_amd64.deb) ...
Preparing to replace tzdata 2009r~repack-0ubuntu0.8.04 (using .../tzdata_2009s~repack-0ubuntu0.8.04_all.deb) ...
Unpacking replacement tzdata ...
Setting up tzdata (2009s~repack-0ubuntu0.8.04) ...

Current default timezone: 'Europe/Athens'
Local time is now: Tue Dec 8 20:13:35 EET 2009.
Universal Time is now: Tue Dec 8 18:13:35 UTC 2009.
Run 'dpkg-reconfigure tzdata' if you wish to change it.


(Reading database ... 47813 files and directories currently installed.)
Preparing to replace bind9 1:9.4.2.dfsg.P2-2ubuntu0.2 (using .../bind9_1%3a9.4.2.dfsg.P2-2ubuntu0.4_amd64.deb) ...
* Stopping domain name service... bind [ OK ]
Unpacking replacement bind9 ...
Preparing to replace dnsutils 1:9.4.2.dfsg.P2-2ubuntu0.2 (using .../dnsutils_1%3a9.4.2.dfsg.P2-2ubuntu0.4_amd64.deb) ...
Unpacking replacement dnsutils ...
Preparing to replace libisc35 1:9.4.2.dfsg.P2-2ubuntu0.2 (using .../libisc35_1%3a9.4.2.dfsg.P2-2ubuntu0.4_amd64.deb) ...
Unpacking replacement libisc35 ...
Preparing to replace libdns35 1:9.4.2.dfsg.P2-2ubuntu0.2 (using .../libdns35_1%3a9.4.2.dfsg.P2-2ubuntu0.4_amd64.deb) ...
Unpacking replacement libdns35 ...
Selecting previously deselected package libdns36.
Unpacking libdns36 (from .../libdns36_1%3a9.4.2.dfsg.P2-2ubuntu0.4_amd64.deb) ...
Preparing to replace libisccc30 1:9.4.2.dfsg.P2-2ubuntu0.2 (using .../libisccc30_1%3a9.4.2.dfsg.P2-2ubuntu0.4_amd64.deb) ...
Unpacking replacement libisccc30 ...
Preparing to replace libisccfg30 1:9.4.2.dfsg.P2-2ubuntu0.2 (using .../libisccfg30_1%3a9.4.2.dfsg.P2-2ubuntu0.4_amd64.deb) ...
Unpacking replacement libisccfg30 ...
Preparing to replace liblwres30 1:9.4.2.dfsg.P2-2ubuntu0.2 (using .../liblwres30_1%3a9.4.2.dfsg.P2-2ubuntu0.4_amd64.deb) ...
Unpacking replacement liblwres30 ...
Preparing to replace libbind9-30 1:9.4.2.dfsg.P2-2ubuntu0.2 (using .../libbind9-30_1%3a9.4.2.dfsg.P2-2ubuntu0.4_amd64.deb) ...
Unpacking replacement libbind9-30 ...
Preparing to replace apache2-utils 2.2.8-1ubuntu0.11 (using .../apache2-utils_2.2.8-1ubuntu0.14_amd64.deb) ...
Unpacking replacement apache2-utils ...
Preparing to replace apache2-mpm-prefork 2.2.8-1ubuntu0.11 (using .../apache2-mpm-prefork_2.2.8-1ubuntu0.14_amd64.deb) ...
* Stopping web server apache2 [ OK ]
Unpacking replacement apache2-mpm-prefork ...
Preparing to replace apache2.2-common 2.2.8-1ubuntu0.11 (using .../apache2.2-common_2.2.8-1ubuntu0.14_amd64.deb) ...
Unpacking replacement apache2.2-common ...
Preparing to replace apache2 2.2.8-1ubuntu0.11 (using .../apache2_2.2.8-1ubuntu0.14_all.deb) ...
Unpacking replacement apache2 ...
Preparing to replace apache2-doc 2.2.8-1ubuntu0.11 (using .../apache2-doc_2.2.8-1ubuntu0.14_all.deb) ...
Unpacking replacement apache2-doc ...
Preparing to replace php5-cli 5.2.4-2ubuntu5.7 (using .../php5-cli_5.2.4-2ubuntu5.9_amd64.deb) ...
Unpacking replacement php5-cli ...
Preparing to replace php5-cgi 5.2.4-2ubuntu5.7 (using .../php5-cgi_5.2.4-2ubuntu5.9_amd64.deb) ...
Unpacking replacement php5-cgi ...
Preparing to replace php5-mysql 5.2.4-2ubuntu5.7 (using .../php5-mysql_5.2.4-2ubuntu5.9_amd64.deb) ...
Unpacking replacement php5-mysql ...
Preparing to replace php5-mhash 5.2.4-2ubuntu5.7 (using .../php5-mhash_5.2.4-2ubuntu5.9_amd64.deb) ...
Unpacking replacement php5-mhash ...
Preparing to replace php5-xsl 5.2.4-2ubuntu5.7 (using .../php5-xsl_5.2.4-2ubuntu5.9_amd64.deb) ...
Unpacking replacement php5-xsl ...
Preparing to replace php5-pspell 5.2.4-2ubuntu5.7 (using .../php5-pspell_5.2.4-2ubuntu5.9_amd64.deb) ...
Unpacking replacement php5-pspell ...
Preparing to replace php5-snmp 5.2.4-2ubuntu5.7 (using .../php5-snmp_5.2.4-2ubuntu5.9_amd64.deb) ...
Unpacking replacement php5-snmp ...
Preparing to replace php5-curl 5.2.4-2ubuntu5.7 (using .../php5-curl_5.2.4-2ubuntu5.9_amd64.deb) ...
Unpacking replacement php5-curl ...
Preparing to replace php5-recode 5.2.4-2ubuntu5.7 (using .../php5-recode_5.2.4-2ubuntu5.9_amd64.deb) ...
Unpacking replacement php5-recode ...
Preparing to replace php5-xmlrpc 5.2.4-2ubuntu5.7 (using .../php5-xmlrpc_5.2.4-2ubuntu5.9_amd64.deb) ...
Unpacking replacement php5-xmlrpc ...
Preparing to replace php5-sqlite 5.2.4-2ubuntu5.7 (using .../php5-sqlite_5.2.4-2ubuntu5.9_amd64.deb) ...
Unpacking replacement php5-sqlite ...
Preparing to replace php5-gd 5.2.4-2ubuntu5.7 (using .../php5-gd_5.2.4-2ubuntu5.9_amd64.deb) ...
Unpacking replacement php5-gd ...
Preparing to replace php5-tidy 5.2.4-2ubuntu5.7 (using .../php5-tidy_5.2.4-2ubuntu5.9_amd64.deb) ...
Unpacking replacement php5-tidy ...
Preparing to replace libapache2-mod-php5 5.2.4-2ubuntu5.7 (using .../libapache2-mod-php5_5.2.4-2ubuntu5.9_amd64.deb) ...
Unpacking replacement libapache2-mod-php5 ...
Preparing to replace php5-common 5.2.4-2ubuntu5.7 (using .../php5-common_5.2.4-2ubuntu5.9_amd64.deb) ...
Unpacking replacement php5-common ...
Preparing to replace linux-server 2.6.24.24.26 (using .../linux-server_2.6.24.26.28_amd64.deb) ...
Unpacking replacement linux-server ...
Preparing to replace linux-image-server 2.6.24.24.26 (using .../linux-image-server_2.6.24.26.28_amd64.deb) ...
Unpacking replacement linux-image-server ...
Preparing to replace linux-libc-dev 2.6.24-25.63 (using .../linux-libc-dev_2.6.24-26.64_amd64.deb) ...
Unpacking replacement linux-libc-dev ...
Preparing to replace php-pear 5.2.4-2ubuntu5.7 (using .../php-pear_5.2.4-2ubuntu5.9_all.deb) ...
Unpacking replacement php-pear ...
Preparing to replace php5 5.2.4-2ubuntu5.7 (using .../php5_5.2.4-2ubuntu5.9_all.deb) ...
Unpacking replacement php5 ...
Processing triggers for man-db ...
Setting up linux-image-2.6.24-26-server (2.6.24-26.64) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.24-26-server
The link /initrd.img is a dangling linkto /boot/initrd.img-2.6.24-24-server
The link /vmlinuz is a dangling linkto /boot/vmlinuz-2.6.24-24-server

Setting up linux-ubuntu-modules-2.6.24-26-server (2.6.24-26.43) ...
update-initramfs: Generating /boot/initrd.img-2.6.24-26-server
update-initramfs: lilo run failed for /boot/initrd.img-2.6.24-26-server:

Warning: LBA32 addressing assumed
Fatal: open /boot/vmlinuz-2.6.22-14-server: No such file or directory
dpkg: error processing linux-ubuntu-modules-2.6.24-26-server (--configure):
subprocess post-installation script returned error exit status 1
Setting up libisc35 (1:9.4.2.dfsg.P2-2ubuntu0.4) ...

Setting up libdns36 (1:9.4.2.dfsg.P2-2ubuntu0.4) ...

Setting up libisccc30 (1:9.4.2.dfsg.P2-2ubuntu0.4) ...

Setting up libisccfg30 (1:9.4.2.dfsg.P2-2ubuntu0.4) ...

Setting up libbind9-30 (1:9.4.2.dfsg.P2-2ubuntu0.4) ...

Setting up liblwres30 (1:9.4.2.dfsg.P2-2ubuntu0.4) ...

Setting up bind9 (1:9.4.2.dfsg.P2-2ubuntu0.4) ...
* Reloading AppArmor profiles ... * Warning: found /etc/apparmor.d/force-complain/usr.bin.freshclam, forcing complain mode
* Warning: found /etc/apparmor.d/force-complain/usr.sbin.clamd, forcing complain mode
* Warning: found /etc/apparmor.d/force-complain/usr.sbin.named, forcing complain mode
[ OK ]
* Starting domain name service... bind [ OK ]

Setting up dnsutils (1:9.4.2.dfsg.P2-2ubuntu0.4) ...

Setting up libdns35 (1:9.4.2.dfsg.P2-2ubuntu0.4) ...
Setting up apache2-utils (2.2.8-1ubuntu0.14) ...
Setting up apache2.2-common (2.2.8-1ubuntu0.14) ...

Setting up apache2-mpm-prefork (2.2.8-1ubuntu0.14) ...
* Starting web server apache2 [ OK ]

Setting up apache2 (2.2.8-1ubuntu0.14) ...
Setting up apache2-doc (2.2.8-1ubuntu0.14) ...
* Reloading web server config apache2 [ OK ]

Setting up php5-common (5.2.4-2ubuntu5.9) ...
Setting up php5-cli (5.2.4-2ubuntu5.9) ...

Setting up php5-cgi (5.2.4-2ubuntu5.9) ...

Setting up libapache2-mod-php5 (5.2.4-2ubuntu5.9) ...
* Reloading web server config apache2 [ OK ]

Setting up php5-mysql (5.2.4-2ubuntu5.9) ...

Setting up php5-mhash (5.2.4-2ubuntu5.9) ...

Setting up php5-xsl (5.2.4-2ubuntu5.9) ...

Setting up php5-pspell (5.2.4-2ubuntu5.9) ...

Setting up php5-snmp (5.2.4-2ubuntu5.9) ...

Setting up php5-curl (5.2.4-2ubuntu5.9) ...

Setting up php5-recode (5.2.4-2ubuntu5.9) ...

Setting up php5-xmlrpc (5.2.4-2ubuntu5.9) ...

Setting up php5-sqlite (5.2.4-2ubuntu5.9) ...

Setting up php5-gd (5.2.4-2ubuntu5.9) ...

Setting up php5-tidy (5.2.4-2ubuntu5.9) ...

dpkg: dependency problems prevent configuration of linux-image-server:
linux-image-server depends on linux-ubuntu-modules-2.6.24-26-server; however:
Package linux-ubuntu-modules-2.6.24-26-server is not configured yet.
dpkg: error processing linux-image-server (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-server:
linux-server depends on linux-image-server (= 2.6.24.26.28); however:
Package linux-image-server is not configured yet.
dpkg: error processing linux-server (--configure):
dependency problems - leaving unconfigured
Setting up linux-libc-dev (2.6.24-26.64) ...
Setting up php-pear (5.2.4-2ubuntu5.9) ...
Setting up php5 (5.2.4-2ubuntu5.9) ...
Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
linux-ubuntu-modules-2.6.24-26-server
linux-image-server
linux-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

After i read the errors i decided to go to the /boot directory and i saw that indeed the only initrd and vmlinuz files where for the new kernel 2.6.24.26. Everything else was missing along side with the 2.6.22-14.

So decided to trick the system and i made a copy of this images of 2.6.24.26 into 2.6.22-14 using cp for intrd and vmlinuz.

The result i got afterwards:

sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]?
Setting up linux-ubuntu-modules-2.6.24-26-server (2.6.24-26.43) ...
update-initramfs: Generating /boot/initrd.img-2.6.24-26-server
Warning: LBA32 addressing assumed
Added Linux *
One warning was issued.

Setting up linux-image-server (2.6.24.26.28) ...
Setting up linux-server (2.6.24.26.28) ...


To add up with all this confusion when i typed uname -a i got a response that my current running kernel was: 2.6.28-15-server.
Checking my /lib/modules also verified that this was the latest in the system:

2.6.22-14-generic 2.6.22-14-server 2.6.24-24-server 2.6.28-14-server
2.6.22-14-rt 2.6.24-23-server 2.6.24-26-server 2.6.28-15-server


So thinking that that is a weird quirk but the upgrade was successful i sudo reboot now the system and it wouldnt boot. Then i used a rescue console to access the server and checked the /var/log/syslog which didnt have anything else in it after the restart. Essentially from what i understand everything just crashed before even the kernel was loaded.

I checked then my lilo.conf and discovered that it had the old version of a linux kernel...the one that was missing in the /boot:


boot=/dev/sda
root=/dev/sda2
timeout=40
prompt
default=Linux

image=/boot/vmlinuz-2.6.22-14-server
label=Linux
read-only
initrd=/boot/initrd.img-2.6.22-14-server


So i replaced this values with the only ones existing in the /boot and restarted and the system still wouldnt boot.

Checking my backups before the upgrade that i kept i found that the folder /boot was empty before that but the lilo config was as in the log that i presented.

So i wonder if the system could boot without anything in the /boot directory.

Also i would kindly ask for your help cause i am desperate to fix the problem and i have no idea how...

phillw
December 9th, 2009, 01:20 PM
Hi,

I'd go for re-installing grub, the below thread covers that & the setting of UUID's kernel images etc..

http://ubuntuforums.org/showthread.php?t=1093613

Hopefully, that'll get you running - if not - post the response of the boot-check-script on here.

Regards,

Phill.

micdhack
December 9th, 2009, 03:12 PM
Yeap you are correct Phil.
I edited the /etc/fstab, removed the lilo and installed grub, reinstalled all the images and recreated all the initgr.

Thanks for the help!

guvnr
June 8th, 2010, 11:41 PM
aptitude flags a conflict between dnsutils adn bind9-host .. likely related

safe-upgrade is the moral :P