DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a VPS running Debian Squeeze. Today I ssh'd in to do an apt-get update and an apt-get upgrade. Some of the packages seem to install fine, however linux-image-2.6.32-5-amd64 gives an error. I've tried rebooting (hoping that it would indeed come back up after a reboot and it did) but nothing has helped. Here's the output from apt:
Code:
root@enterprise:~# apt-get update && apt-get upgrade
Hit http://webmin.mirror.somersettechsolutions.co.uk sarge Release.gpg
Ign http://webmin.mirror.somersettechsolutions.co.uk/repository/ sarge/contrib Translation-en
Hit http://webmin.mirror.somersettechsolutions.co.uk sarge Release
Ign http://webmin.mirror.somersettechsolutions.co.uk sarge/contrib amd64 Packages
Hit http://ftp.us.debian.org squeeze Release.gpg
Ign http://ftp.us.debian.org/debian/ squeeze/main Translation-en
Ign http://webmin.mirror.somersettechsolutions.co.uk sarge/contrib amd64 Packages
Hit http://webmin.mirror.somersettechsolutions.co.uk sarge/contrib amd64 Packages
Hit http://ftp.us.debian.org squeeze Release
Hit http://security.debian.org squeeze/updates Release.gpg
Ign http://security.debian.org/ squeeze/updates/main Translation-en
Hit http://download.webmin.com sarge Release.gpg
Hit http://ftp.us.debian.org squeeze/main amd64 Packages
Hit http://security.debian.org squeeze/updates Release
Hit http://security.debian.org squeeze/updates/main amd64 Packages
Ign http://download.webmin.com/download/repository/ sarge/contrib Translation-en
Hit http://download.webmin.com sarge Release
Ign http://download.webmin.com sarge/contrib amd64 Packages
Ign http://download.webmin.com sarge/contrib amd64 Packages
Hit http://download.webmin.com sarge/contrib amd64 Packages
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue [Y/n]? y
Setting up linux-image-2.6.32-5-amd64 (2.6.32-31) ...
Running depmod.
Running update-initramfs.
update-initramfs: Generating /boot/initrd.img-2.6.32-5-amd64
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 2.6.32-5-amd64 /boot/vmlinuz-2.6.32-5-amd64
Searching for GRUB installation directory ... found: /boot/grub
warning: grub-probe can't find drive for /dev/xvda1.
grub-probe: error: cannot find a GRUB drive for /dev/xvda1. Check your device.map.
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux-image-2.6.32-5-amd64.postinst line 799, <STDIN> line 2.
dpkg: error processing linux-image-2.6.32-5-amd64 (--configure):
subprocess installed post-installation script returned error exit status 2
configured to not write apport reports
Errors were encountered while processing:
linux-image-2.6.32-5-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
I also did an apt-get clean to drop the cache but that didn't help either.
/dev/xvda1 - looks like a Xen-based VPS. Is this a Linode?
Yes, it's Xen based but it's not Linode.
That has something to do with the Webmin repository, I believe. It shows as "Sarge" on all my Squeeze machines - don't ask me why because I don't know, it seems to work OK though.
---------- Post added 03-22-11 at 02:11 PM ----------
Quote:
Originally Posted by andrewthomas
What does your /boot/grub/device.map say?
Is your grub installed to the partition boot record?
I can't check that right now. I shall do that shortly. I wonder if it's running a special kernel for Xen (now that I think about it). I didn't install the OS or configure the thing, it was just handed to me like this so I don't know...
That has something to do with the Webmin repository, I believe. It shows as "Sarge" on all my Squeeze machines - don't ask me why because I don't know, it seems to work OK though.
I have a VPS running Debian Squeeze. Today I ssh'd in to do an apt-get update and an apt-get upgrade. Some of the packages seem to install fine, however linux-image-2.6.32-5-amd64 gives an error. I've tried rebooting (hoping that it would indeed come back up after a reboot and it did) but nothing has helped.
This was a tricky one, but the thing is that your /boot/grub/device.map probably contains "(hd0) /dev/sda", while your root fs is at /dev/xvda1 (and swap at /dev/xvda2).
To update the kernel, you will need to:
1) Edit /boot/grub/device.map and replace "/dev/sda" with "/dev/xvda".
2) Actually create a /dev/xvda, that probably does not exist. Do it with: "mknod /dev/xvda b 202 0"
3) Fix the "update-grub" script to find the device correctly, which you can do by editing /usr/sbin/update-grub, locating the function "find_device()" and replacing the "grub-probe" line with something like: "echo /dev/xvda"
4) Now, try "aptitude update" and "aptitude upgrade" again.
If you still have an error, try running "update-grub 0" manually and then "aptitude upgrade" again.
This was a tricky one, but the thing is that your /boot/grub/device.map probably contains "(hd0) /dev/sda", while your root fs is at /dev/xvda1 (and swap at /dev/xvda2).
To update the kernel, you will need to:
1) Edit /boot/grub/device.map and replace "/dev/sda" with "/dev/xvda".
2) Actually create a /dev/xvda, that probably does not exist. Do it with: "mknod /dev/xvda b 202 0"
3) Fix the "update-grub" script to find the device correctly, which you can do by editing /usr/sbin/update-grub, locating the function "find_device()" and replacing the "grub-probe" line with something like: "echo /dev/xvda"
4) Now, try "aptitude update" and "aptitude upgrade" again.
If you still have an error, try running "update-grub 0" manually and then "aptitude upgrade" again.
I hope this helps.
G'day,
Long time since I've had to try and fix this. I did what you suggested, but it's still not working. aptitude upgrade still gives me errors, and update-grub 0 gives this:
Code:
root@enterprise:/usr/sbin# update-grub 0
Searching for GRUB installation directory ... found: /boot/grub
warning: grub-probe can't find drive for /dev/xvda/.
grub-probe: error: cannot stat `/dev/xvda/'.
And I changed the update-grub script to this (linked because it's too long for the message boards, apparently).
Any ideas? This is very annoying. I'm going to mail the host once I get this figured out so he can configure this on his image so others don't have to go through this.
Long time since I've had to try and fix this. I did what you suggested, but it's still not working. aptitude upgrade still gives me errors, and update-grub 0 gives this:
Code:
root@enterprise:/usr/sbin# update-grub 0
Searching for GRUB installation directory ... found: /boot/grub
warning: grub-probe can't find drive for /dev/xvda/.
grub-probe: error: cannot stat `/dev/xvda/'.
...
Any ideas? This is very annoying. I'm going to mail the host once I get this figured out so he can configure this on his image so others don't have to go through this.
Oh yes... Here is the thing. grub-probe is reporting cannot stat "/dev/xvda/". I've checked your script and you shouldn't be outputting "/dev/xvda/". It should be "/dev/xvda", without the slash in the end.
Try fixing that in find_device() and give it another go.
Oh yes... Here is the thing. grub-probe is reporting cannot stat "/dev/xvda/". I've checked your script and you shouldn't be outputting "/dev/xvda/". It should be "/dev/xvda", without the slash in the end.
Try fixing that in find_device() and give it another go.
Cheers
Hmm, that's still not working. I've mailed the host asking if it's a problem with their image or whether I'm just lucky.
Hmm, that's still not working. I've mailed the host asking if it's a problem with their image or whether I'm just lucky.
Is the error the same? I've had exactly the same problem as you are describing on what appears to be the exact same setup and my solution fixed it.
Can you confirm "/dev/xvda" exists? Note that it's not /dev/xvda0 or xvda1, it's the actual minor 0 device (that you have to manually create with mknod, as I described in step 2 of my original solution). Note that manually created devices in /dev/ can go away after rebooting depending on your configuration.
Otherwise, can you attach the error logs after fixing find_device()?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.