Upgrade from Dapper to Edgy with update-manager failed because of too little free space on /boot

Asked by ronrafajko on 2006-12-12

I updated Ubuntu from 6.06 Dapper Drake to 6.10 Edgy Eft over the Internet.
I am on an Alienware AMD64 laptop.
I believe I used the command: sudo update-manager -c to upgrade.
The upgrade did not seem to go very well with multiple errors during the process.
On reboot after everything appeared to finish, I get these errors:

Failed to allocate mem resource #6: ___________ for _______________
RAMDISK: ran out of compressed data
invalid compressed format (err=1)
Kernel panic -not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

This happens when I boot GRUB with the 2.6.15-27-amd64-genericDefault kernel (the top entry).
When I boot the 2.6.17-10-generic kernel I only get the fourth error, then the machine reboots.
I have tried the recovery mode line items, and all of the others without getting to a login screen.

On my Bug #70683, Michael Vogt said:

Thanks for your bugreport and the logs.
The reason for the failre are too little free space on /boot:

2006-10-26 11:59:34,934 DEBUG Free space on /boot: 5704704
Setting up linux-image-2.6.17-10-generic (2.6.17-10.33) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.17-10-generic
gzip: stdout: No space left on device
Failed to create initrd image.

Cheers, Michael

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
2007-04-04
Last reply:
2007-04-06
Joe Bowser (infil00p) said : #1

/boot is it's own partition, right? So you may want to backup everything using a live CD and a Network Share, then either:

a) Use gparted to grow the /boot partition from the Live CD
b) Do a fresh install of Edgy, wiping out the Dapper kernels on /boot

gparted is on the Live disk, and is fairly safe, but before modifying your partition table, ALWAYS backup your data. I would try a first, and use b as a last resort.

Hope this helps.

Michael Flaig (mflaig) said : #2

Just some ideas to supply more information ...

How big is the /boot partition and how much space is left?
  check with df -h command
How many kernels do you have?
  dpkg --list | grep kernel-image
  or dpkg --list | grep linux-image

Can you get rid of some of the kernel packages installed (if more than 2)?

ronrafajko (ron-rafajko) said : #3

/boot is 29.19MB with only 23Kb free
/swap is 431.43 MB
/ is 92.7 GB with 67.41GB free

Can I shrink swap to 200MB and give the space to /boot?
I don't want to go through all of the work backing up / before shrinking it.

dpkg --list | grep kernel-image resulted in nothing.
dpkg --list | grep linux-image resulted in 2.6.17-10.33 and 2.6.17-10.

My GRUB boot loader still lists a ton of kernels but I guess the files are now gone?

THANKS!

ronrafajko (ron-rafajko) said : #4

I resized /swap to 150MB and /boot to 322MB but I still get errors booting to any of the kernels listed in GRUB. Which one should I be booting to?

I now presume the upgrade died because there was insufficient free space on /boot to complete the upgrade and I now do not have a working Dapper Drake or Edgy Eft. Is there a way to run the upgrade again without having to do a clean install and lose what I have? I do not want to backup and restore 25GB of data.

THANKS!

Rouben (rouben) said : #5

Please try the following:

1. When in GRUB, pick any kernel and hit "E" on the keyboard.
2. Select the "initrd" line and hit "D" (don't worry, this won't change your grub configuration; once you reboot it will be back to how it was originally). Make note if this path filename, you'll need it later!
3. Hit "B" to boot.

Hopefully that will bypass the initrd file and at least boot into your Ubuntu setup.

1. If you manage to boot into Ubuntu properly, issue this command:
sudo mkinitramfs -o initrd.new `uname -r`
2. Make a backup of your current initrd file (from step 2 above) and then put the newly generated initrd.new in its place with the same name.
3. Reboot the computer and hopefully things will just boot. :)

ronrafajko (ron-rafajko) said : #6

It did not work.
I started from the top entry in GRUB and worked my way down through the different kernels, and still I get the error: Kernel Panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
I was never able to get the kernel to load and get me to a login prompt.

ronrafajko (ron-rafajko) said : #7

Is there a way to run the upgrade again without having to do a clean install and lose what I have? I do not want to backup and restore 25GB of data.

Johnny Chadda (joch) said : #8

The easiest thing is to just ignore the /boot partition because of the small size and move everything to your root-partition.

I am assuming that you can not boot into your Ubuntu system, so if you boot from a live-CD , just mount the boot and the root partition and copy everything in the boot partition to /boot in the root partition.

You will also need to comment out /boot/ in /etc/fstab of the mounted root-partition, as well as change /boot/grub/menu.lst so the partitions point to your root partition instead of the other.

This is the general idea, but do tell if you need more detailed instructions.

Good luck.

ronrafajko (ron-rafajko) said : #9

I did not find a /boot listed in the /etc/fstab for my old system. Here are the contents of the fstab file:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sdb3 -- converted during upgrade to edgy
UUID=7aeb34c8-4c6b-4db9-9efc-2f04ed11b5a8 / ext3 defaults,errors=remount-ro 0 1
# /dev/sdb1 -- converted during upgrade to edgy
UUID=608cc707-3c4a-46e7-9825-09cb706cec9c /boot ext3 defaults 0 2
# /dev/sda1 -- converted during upgrade to edgy
UUID=D8E8FCC7E8FCA4C2 /media/sda1 ntfs defaults 0 0
# /dev/sdb2 -- converted during upgrade to edgy
UUID=ead769ed-ea0d-478c-923d-bbe0cc9b4d77 none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/hdd /media/cdrom1 udf,iso9660 user,noauto 0 0

ronrafajko (ron-rafajko) said : #10

I commented out the line: UUID=608cc707-3c4a-46e7-9825-09cb706cec9c /boot ext3 defaults 0 2
and copied the /boot partition files into the /boot directory,
same errors on boot as listed above.
Is there a way to clean out the boot menu? I have a ton of kernels listed and I am sure I don't need half of them.

THANKS!

danielmewes (danielmewes) said : #11

a) Try to append root=/dev/sdb3 to the kernel command line in grub (using the edit option).
b) Could you please post your /boot/grub/menu.lst?

To finish the update, you may try to chroot into your system from a live CD (please ask again if you need further information about how to do this) and run "dpkg-reconfigure linux-image-2.6.17-10-generic". If this does not work, try "aptitude reinstall linux-image-2.6.17-10-generic".

ronrafajko (ron-rafajko) said : #12

After appending the kernel line to read "root=/dev/sdb3" I booted and the root= line generated an error 11 "unrecognized device string. press any key to continue"

I have attached my menu.lst file.

THANKS!

ronrafajko (ron-rafajko) said : #13

# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 10

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
#hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=7aeb34c8-4c6b-4db9-9efc-2f04ed11b5a8 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd1,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## ## End Default Options ##

title Ubuntu, kernel 2.6.15-27-amd64-generic Default
root (hd1,0)
kernel /vmlinuz root=UUID=7aeb34c8-4c6b-4db9-9efc-2f04ed11b5a8 ro quiet splash
initrd /initrd.img
savedefault
boot

title Ubuntu, kernel 2.6.15-27-amd64-generic Default (recovery mode)
root (hd1,0)
kernel /vmlinuz root=UUID=7aeb34c8-4c6b-4db9-9efc-2f04ed11b5a8 ro single
initrd /initrd.img
boot

title Ubuntu, kernel 2.6.12-10-amd64-generic Previous
root (hd1,0)
kernel /vmlinuz.old root=UUID=7aeb34c8-4c6b-4db9-9efc-2f04ed11b5a8 ro quiet splash
initrd /initrd.img.old
savedefault
boot

title Ubuntu, kernel 2.6.12-10-amd64-generic Previous (recovery mode)
root (hd1,0)
kernel /vmlinuz.old root=UUID=7aeb34c8-4c6b-4db9-9efc-2f04ed11b5a8 ro single
initrd /initrd.img.old
boot

title Ubuntu, kernel 2.6.17-10-generic
root (hd1,0)
kernel /vmlinuz-2.6.17-10-generic root=UUID=7aeb34c8-4c6b-4db9-9efc-2f04ed11b5a8 ro quiet splash
savedefault
boot

title Ubuntu, kernel 2.6.17-10-generic (recovery mode)
root (hd1,0)
kernel /vmlinuz-2.6.17-10-generic root=UUID=7aeb34c8-4c6b-4db9-9efc-2f04ed11b5a8 ro single
boot

title Ubuntu, kernel 2.6.15-27-amd64-generic
root (hd1,0)
kernel /vmlinuz-2.6.15-27-amd64-generic root=UUID=7aeb34c8-4c6b-4db9-9efc-2f04ed11b5a8 ro quiet splash
initrd /initrd.img-2.6.15-27-amd64-generic
savedefault
boot

title Ubuntu, kernel 2.6.15-27-amd64-generic (recovery mode)
root (hd1,0)
kernel /vmlinuz-2.6.15-27-amd64-generic root=UUID=7aeb34c8-4c6b-4db9-9efc-2f04ed11b5a8 ro single
initrd /initrd.img-2.6.15-27-amd64-generic
boot

title Ubuntu, kernel 2.6.12-10-amd64-generic
root (hd1,0)
kernel /vmlinuz-2.6.12-10-amd64-generic root=UUID=7aeb34c8-4c6b-4db9-9efc-2f04ed11b5a8 ro quiet splash
initrd /initrd.img-2.6.12-10-amd64-generic
savedefault
boot

title Ubuntu, kernel 2.6.12-10-amd64-generic (recovery mode)
root (hd1,0)
kernel /vmlinuz-2.6.12-10-amd64-generic root=UUID=7aeb34c8-4c6b-4db9-9efc-2f04ed11b5a8 ro single
initrd /initrd.img-2.6.12-10-amd64-generic
boot

title Ubuntu, kernel 2.6.12-9-amd64-generic
root (hd1,0)
kernel /vmlinuz-2.6.12-9-amd64-generic root=UUID=7aeb34c8-4c6b-4db9-9efc-2f04ed11b5a8 ro quiet splash
initrd /initrd.img-2.6.12-9-amd64-generic
savedefault
boot

title Ubuntu, kernel 2.6.12-9-amd64-generic (recovery mode)
root (hd1,0)
kernel /vmlinuz-2.6.12-9-amd64-generic root=UUID=7aeb34c8-4c6b-4db9-9efc-2f04ed11b5a8 ro single
initrd /initrd.img-2.6.12-9-amd64-generic
boot

title Ubuntu, memtest86+
root (hd1,0)
kernel /memtest86+.bin
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title Other operating systems:
root

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1

ronrafajko (ron-rafajko) said : #14

I mounted the /dev/sdb3 partition, and ran "sudo chroot /home/ubuntu/ron dpkg-reconfigure linux-image-2.6.17-10-generic". It said there were some problems but completed.
I then ran "aptitude reinstall linux-image-2.6.17-10-generic" and it had problems. Sorry I did not save the log file.
I still have the /boot line commented out in my fstab file and the files are in my /boot directory. I will undo those and try the commands again.

THANKS!

ronrafajko (ron-rafajko) said : #15

Here is the log of the two commands run after I changed the fstab file back and checked the /boot partition (it still had the files I copied to the /boot directory off the / partition. NOTE: This is a dual boot laptop, /hda is the Windows XP boot HDD, Linux Ubuntu is installed on the /hdb HDD. On hdb, /hdb1 is the /boot partition, /hdb2 is the /swap partition, and /hdb3 is the / partition, GRUB is installed on the hda HDD and runs on bootup):

ubuntu@ubuntu:~$ sudo chroot /home/ubuntu/ron dpkg-reconfigure linux-image-2.6.17-10-generic
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.17-10-generic
Not updating initrd symbolic links since we are being updated/reinstalled
(2.6.17-10.33 was configured last, according to dpkg)
Not updating image symbolic links since we are being updated/reinstalled
(2.6.17-10.33 was configured last, according to dpkg)
Running postinst hook /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Cannot determine root device. Assuming /dev/hda1
This error is probably caused by an invalid /etc/fstab
findfs: Unable to resolve 'UUID=608cc707-3c4a-46e7-9825-09cb706cec9c'
Testing for an existing GRUB menu.list file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz
Found kernel: /boot/vmlinuz.old
Found kernel: /boot/vmlinuz-2.6.17-10-generic
Found kernel: /boot/vmlinuz-2.6.15-27-amd64-generic
Found kernel: /boot/vmlinuz-2.6.12-10-amd64-generic
Found kernel: /boot/vmlinuz-2.6.12-9-amd64-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

ubuntu@ubuntu:~$ sudo chroot /home/ubuntu/ron aptitude reinstall linux-image-2.6.17-10-generic
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following packages will be REINSTALLED:
  linux-image-2.6.17-10-generic
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0B/23.5MB of archives. After unpacking 0B will be used.
Writing extended state information... Done
Preconfiguring packages ...
(Reading database ... 114829 files and directories currently installed.)
Preparing to replace linux-image-2.6.17-10-generic 2.6.17-10.33 (using .../linux-image-2.6.17-10-generic_2.6.17-10.33_amd64.deb) ...
The directory /lib/modules/2.6.17-10-generic still exists. Continuing as directed.
Done.
Unpacking replacement linux-image-2.6.17-10-generic ...
Running postrm hook /sbin/update-grub .
Searching for GRUB installation directory ... found: /boot/grub
Cannot determine root device. Assuming /dev/hda1
This error is probably caused by an invalid /etc/fstab
findfs: Unable to resolve 'UUID=608cc707-3c4a-46e7-9825-09cb706cec9c'
Testing for an existing GRUB menu.list file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz
Found kernel: /boot/vmlinuz.old
Found kernel: /boot/vmlinuz-2.6.17-10-generic
Found kernel: /boot/vmlinuz-2.6.15-27-amd64-generic
Found kernel: /boot/vmlinuz-2.6.12-10-amd64-generic
Found kernel: /boot/vmlinuz-2.6.12-9-amd64-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done

Setting up linux-image-2.6.17-10-generic (2.6.17-10.33) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.17-10-generic
Not updating initrd symbolic links since we are being updated/reinstalled
(2.6.17-10.33 was configured last, according to dpkg)
Not updating image symbolic links since we are being updated/reinstalled
(2.6.17-10.33 was configured last, according to dpkg)
Running postinst hook /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Cannot determine root device. Assuming /dev/hda1
This error is probably caused by an invalid /etc/fstab
findfs: Unable to resolve 'UUID=608cc707-3c4a-46e7-9825-09cb706cec9c'
Testing for an existing GRUB menu.list file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz
Found kernel: /boot/vmlinuz.old
Found kernel: /boot/vmlinuz-2.6.17-10-generic
Found kernel: /boot/vmlinuz-2.6.15-27-amd64-generic
Found kernel: /boot/vmlinuz-2.6.12-10-amd64-generic
Found kernel: /boot/vmlinuz-2.6.12-9-amd64-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
ubuntu@ubuntu:~$

Launchpad Janitor (janitor) said : #16

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

ronrafajko (ron-rafajko) said : #17

Anyone else have an idea of how to recover my failed install?

Mackenzie Morgan (maco.m) said : #18

You have a lot of old kernels in there. Use the live cd and mount the hard drive. cd into /boot and then rm *2.6.12*
It'll delete the oldest of the kernels and free up some space in /boot for you to reinstall the new kernel.

Can you help with this problem?

Provide an answer of your own, or ask ronrafajko for more information if necessary.

To post a message you must log in.