LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-21-2011, 09:40 PM   #1
Zaraphrax
Member
 
Registered: Sep 2010
Posts: 57

Rep: Reputation: 10
Update Problem


Hi all,

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.

Any ideas?

Thanks.
 
Old 03-21-2011, 09:48 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Why is there sarge in your sources.list !?

/dev/xvda1 - looks like a Xen-based VPS. Is this a Linode?
 
Old 03-21-2011, 09:53 PM   #3
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
Quote:
Originally Posted by Zaraphrax View Post
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.
What does your /boot/grub/device.map say?

Is your grub installed to the partition boot record?
 
Old 03-21-2011, 11:10 PM   #4
Zaraphrax
Member
 
Registered: Sep 2010
Posts: 57

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by AlucardZero View Post
Why is there sarge in your sources.list !?

/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 View Post
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...
 
Old 03-21-2011, 11:31 PM   #5
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
Quote:
Originally Posted by Zaraphrax View Post
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 just looked at

http://download.webmin.com/download/repository/dists/

and sarge is the only one that they have and it does seem to be current.

Quote:
Archive: stable
Version: 3.1
Component: contrib
Origin: Jamie Cameron
Label: Webmin
Architecture: all i386 amd64
Description: Webmin and related packages
Codename: sarge
Suite: stable
Date: Thu, 02 Dec 2010 01:38:17 UTC
 
Old 04-17-2011, 01:11 PM   #6
Franciozzy
LQ Newbie
 
Registered: Apr 2011
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by Zaraphrax View Post
Hi all,

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.

I hope this helps.
 
Old 05-10-2011, 05:42 AM   #7
Zaraphrax
Member
 
Registered: Sep 2010
Posts: 57

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by Franciozzy View Post
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/'.
I made device.map look like this:

Code:
root@enterprise:/boot/grub# cat device.map
(hd0) /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.
 
Old 05-11-2011, 12:44 AM   #8
Franciozzy
LQ Newbie
 
Registered: Apr 2011
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by Zaraphrax View Post
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/'.
...

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.

Cheers
 
Old 05-11-2011, 09:23 PM   #9
Zaraphrax
Member
 
Registered: Sep 2010
Posts: 57

Original Poster
Rep: Reputation: 10
Quote:
Originally Posted by Franciozzy View Post
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.
 
Old 05-12-2011, 07:09 AM   #10
Franciozzy
LQ Newbie
 
Registered: Apr 2011
Posts: 9

Rep: Reputation: 0
Quote:
Originally Posted by Zaraphrax View Post
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()?

Cheers
 
Old 02-05-2012, 05:36 AM   #11
ckeilah
LQ Newbie
 
Registered: Feb 2009
Posts: 4

Rep: Reputation: 0
Solved

grub-mkdevicemap
grub-mkconfig
update-grub
aptitude safe-upgrade

problem solved!
 
Old 02-05-2012, 09:55 PM   #12
k3lt01
Senior Member
 
Registered: Feb 2011
Location: Australia
Distribution: Debian Wheezy, Jessie, Sid/Experimental, playing with LFS.
Posts: 2,900

Rep: Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637Reputation: 637
You picked a thread that nobody has posted in for 9 months to say that.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
update problem cusri2004 Ubuntu 1 05-24-2010 08:48 AM
YAST Update problem, won't update anymore sir_shunt SUSE / openSUSE 7 04-11-2006 12:55 PM
I have problem to update with the update function under fedora core 2 babyboss Fedora 4 08-10-2005 07:34 AM
Update Problem jbclarkman Mandriva 4 01-13-2005 12:56 PM
Update Fedora2 using "yum update" problem chinaundead Fedora 9 04-27-2004 09:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration