Kernel install problem

I tried to do an update this morning and ran into the problem below when
it came to installing the kernel. I've looked in
/boot/boot/grub/menu.lst and the new kernel 2.6.18-4 hasn't been added
(I'm running 2.6.18-3 and that is the top kernel in the list).

Any ideas what's gone wrong?

dpkg: dependency problems prevent configuration of linux-image-2.6-486:
linux-image-2.6-486 depends on linux-image-2.6.18-4-486; however:
Package linux-image-2.6.18-4-486 is not configured yet.
dpkg: error processing linux-image-2.6-486 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-2.6.18-4-486
linux-image-2.6-486
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
Setting up linux-image-2.6.18-4-486 (2.6.18.dfsg.1-11) ...
Running depmod.
Finding valid ramdisk creators.
Using mkinitramfs-kpkg to build the ramdisk.
Running postinst hook script /usr/sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/boot/grub
Searching for default file ... Generating /boot/boot/grub/default file
and setting the default boot entry to 0
No GRUB directory found under /
User postinst hook script [/usr/sbin/update-grub] exited with value 1
dpkg: error processing linux-image-2.6.18-4-486 (--configure):
subprocess post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-2.6-486:
linux-image-2.6-486 depends on linux-image-2.6.18-4-486; however:
Package linux-image-2.6.18-4-486 is not configured yet.
dpkg: error processing linux-image-2.6-486 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-image-2.6.18-4-486
linux-image-2.6-486

--

0

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Kernel install problem

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, Mar 01, 2007 at 09:54:14AM +0000, Graham Smith wrote:
> I tried to do an update this morning and ran into the problem below when
> it came to installing the kernel. I've looked in
> /boot/boot/grub/menu.lst and the new kernel 2.6.18-4 hasn't been added
> (I'm running 2.6.18-3 and that is the top kernel in the list).
>
> Any ideas what's gone wrong?
>
> dpkg: dependency problems prevent configuration of linux-image-2.6-486:
> linux-image-2.6-486 depends on linux-image-2.6.18-4-486; however:
> Package linux-image-2.6.18-4-486 is not configured yet.
> dpkg: error processing linux-image-2.6-486 (--configure):
> dependency problems - leaving unconfigured
> Errors were encountered while processing:
> linux-image-2.6.18-4-486
> linux-image-2.6-486
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> A package failed to install. Trying to recover:
> Setting up linux-image-2.6.18-4-486 (2.6.18.dfsg.1-11) ...
> Running depmod.
> Finding valid ramdisk creators.
> Using mkinitramfs-kpkg to build the ramdisk.
> Running postinst hook script /usr/sbin/update-grub.
> Searching for GRUB installation directory ... found: /boot/boot/grub
> Searching for default file ... Generating /boot/boot/grub/default file
> and setting the default boot entry to 0
> No GRUB directory found under /
> User postinst hook script [/usr/sbin/update-grub] exited with value 1
> dpkg: error processing linux-image-2.6.18-4-486 (--configure):
> subprocess post-installation script returned error exit status 1
> dpkg: dependency problems prevent configuration of linux-image-2.6-486:
> linux-image-2.6-486 depends on linux-image-2.6.18-4-486; however:
> Package linux-image-2.6.18-4-486 is not configured yet.
> dpkg: error processing linux-image-2.6-486 (--configure):
> dependency problems - leaving unconfigured
> Errors were encountered while processing:
> linux-image-2.6.18-4-486
> linux-image-2.6-486
why do you use "/boot/boot/grub/" and not the default "/boot/grub/"?
what is in /boot/grub/menu.lst vs /boot/boot/grub/menu.lst ?

- --
| .''`. == Debian GNU/Linux == | my web site: |
| : :' : The Universal |mysite.verizon.net/kevin.mark/|
| `. `' Operating System | go to counter.li.org and |
| `- http://www.debian.org/ | be counted! #238656 |
| my keyserver: subkeys.pgp.net | my NPO: cfsg.org |
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFF5wjdv8UcC1qRZVMRAqZtAJ9NyXfjAeKlKtKGQySnq0YGYXoUSwCffyrP
hn2ZnuT3QAKUejka8g3VgVM=
=uqLY
-----END PGP SIGNATURE-----

--

Kernel install problem

On Thu, Mar 01, 2007 at 12:09:49PM -0500, Kevin Mark wrote:
>
> why do you use "/boot/boot/grub/" and not the default "/boot/grub/"?
> what is in /boot/grub/menu.lst vs /boot/boot/grub/menu.lst ?
>
Using /boot/boot/grub is necessary when /boot is its own filesystem.

Regards,

-Roberto

--
Roberto C. Sanchez
http://people.connexer.com/~roberto
http://www.connexer.com

Kernel install problem

Roberto C. Sanchez wrote:
> On Thu, Mar 01, 2007 at 12:09:49PM -0500, Kevin Mark wrote:
>
>> why do you use "/boot/boot/grub/" and not the default "/boot/grub/"?
>> what is in /boot/grub/menu.lst vs /boot/boot/grub/menu.lst ?
>>
>>
> Using /boot/boot/grub is necessary when /boot is its own filesystem.
>
>
I'd think most people with that setup have /boot/boot symlinked to /boot ?

--
Håkon Alstadheim tlf: 74 82 60 27 mob: 47 35 39 38
7510 Skatval
http://alstadheim.priv.no/hakon/

--

Kernel install problem

On Thu, Mar 01, 2007 at 06:36:38PM +0100, Håkon Alstadheim wrote:
> Roberto C. Sanchez wrote:
> > On Thu, Mar 01, 2007 at 12:09:49PM -0500, Kevin Mark wrote:
> >
> >> why do you use "/boot/boot/grub/" and not the default "/boot/grub/"?
> >> what is in /boot/grub/menu.lst vs /boot/boot/grub/menu.lst ?
> >>
> >>
> > Using /boot/boot/grub is necessary when /boot is its own filesystem.
> >
> >
> I'd think most people with that setup have /boot/boot symlinked to /boot ?
>
You can't do that becasue the first thing grub looks for is the boot/
directory on the "root" filesystem. If /boot is a separate partition,
it is the first thing that grub sees, and so it looks for boot/ under
it. When we mount it on /boot, it ends up looking to us (but not to
grub) as /boot/boot.

Regards,

-Roberto

--
Roberto C. Sanchez
http://people.connexer.com/~roberto
http://www.connexer.com

Kernel install problem

On Thu, Mar 01, 2007 at 01:03:07PM -0500, Roberto C. Sanchez wrote:
> On Thu, Mar 01, 2007 at 06:36:38PM +0100, Håkon Alstadheim wrote:
> > Roberto C. Sanchez wrote:
> > > On Thu, Mar 01, 2007 at 12:09:49PM -0500, Kevin Mark wrote:
> > >
> > >> why do you use "/boot/boot/grub/" and not the default "/boot/grub/"?
> > >> what is in /boot/grub/menu.lst vs /boot/boot/grub/menu.lst ?
> > >>
> > >>
> > > Using /boot/boot/grub is necessary when /boot is its own filesystem.
> > >
> > >
> > I'd think most people with that setup have /boot/boot symlinked to /boot ?
> >
> You can't do that becasue the first thing grub looks for is the boot/
> directory on the "root" filesystem. If /boot is a separate partition,
> it is the first thing that grub sees, and so it looks for boot/ under
> it. When we mount it on /boot, it ends up looking to us (but not to
> grub) as /boot/boot.

I thought the /boot/boot thing came from installing grub
incorrectly. When I have been too smart for my own good and applied a
--root-directory switch to grub-install, its ended up in
/boot/boot. If I just let it work on its own it end sup in /boot. This
is with /boot on a seperate partition. At elast once, I've messed up
and had it in /boot/boot and just mv'ed it up one level and all works
well.

A

Kernel install problem

Roberto C. Sanchez wrote:
> On Thu, Mar 01, 2007 at 12:09:49PM -0500, Kevin Mark wrote:
>> why do you use "/boot/boot/grub/" and not the default "/boot/grub/"?
>> what is in /boot/grub/menu.lst vs /boot/boot/grub/menu.lst ?
>>
> Using /boot/boot/grub is necessary when /boot is its own filesystem.
>
> Regards,
>
> -Roberto
>

Not so. My setup is:

$ uname -r
2.6.18-3-686
$ mount|grep boot
/dev/sda1 on /boot type ext3 (rw)
$ ls /boot/*2.6.18-3-686*
/boot/System.map-2.6.18-3-686 /boot/initrd.img-2.6.18-3-686
/boot/config-2.6.18-3-686 /boot/vmlinuz-2.6.18-3-686
$grep boot /etc/fstab
/dev/sda1 /boot ext3 defaults 0 2

My /boot/grub/menu.lst for the default boot:

title Debian GNU/Linux, kernel 2.6.18-3-686
root (hd0,0)
kernel /vmlinuz-2.6.18-3-686 root=LABEL=/root ro
initrd /initrd.img-2.6.18-3-686

===

NOTE that the path names for the kernel and initrd image DO NOT have a
leading '/boot', this is because, for the filesystem on /dev/sda1, these
files are 'connected' to the filesystem's 'root', which ONLY becomes
/boot/... when the system is up and running, with filesystems from the
fstab file mounted.

The above was set up automatically, during the install, by the Debian
installer. I explicitly selected to have '/boot' be a separate file
system. I suspect the OP's problem is, in fact, because of the
differences between what the actual setup is and what the dpkg scripts
expect. I further conjecture that the original install was with /boot
on the root filesystem, and that a later decision was made to change it,
with the boot files on a separate filesystem.

To fix this, as root:

# cd /boot/boot
# mv * .. # no hidden files to worry about.
# cd ..
# rmdir boot
# edit /etc/fstab
- add/modify line to mount the boot partition, see above example
# edit grub/menu.lst
- to fix any kernel/initrd paths, removing /boot, see above example
# reboot
...
# apt-get update ....

Of course, you should make backups of everything, just in case. And,
rather than just removing the extra 'boot' directory, you might also
want to do 'ln -s . boot', so if there are any residual dependencies on
/boot/boot/..., they will automatically resolve to the right place.

Bob

Kernel install problem

On Thu, Mar 01, 2007 at 10:08:25AM -0800, Bob McGowan wrote:
> Roberto C. Sanchez wrote:
> >On Thu, Mar 01, 2007 at 12:09:49PM -0500, Kevin Mark wrote:
> >>why do you use "/boot/boot/grub/" and not the default "/boot/grub/"?
> >>what is in /boot/grub/menu.lst vs /boot/boot/grub/menu.lst ?
> >>
> >Using /boot/boot/grub is necessary when /boot is its own filesystem.
> >
> >Regards,
> >
> >-Roberto
> >
>
> Not so. My setup is:
>
> $ uname -r
> 2.6.18-3-686
> $ mount|grep boot
> /dev/sda1 on /boot type ext3 (rw)
> $ ls /boot/*2.6.18-3-686*
> /boot/System.map-2.6.18-3-686 /boot/initrd.img-2.6.18-3-686
> /boot/config-2.6.18-3-686 /boot/vmlinuz-2.6.18-3-686
> $grep boot /etc/fstab
> /dev/sda1 /boot ext3 defaults 0 2
>
> My /boot/grub/menu.lst for the default boot:
>
> title Debian GNU/Linux, kernel 2.6.18-3-686
> root (hd0,0)
> kernel /vmlinuz-2.6.18-3-686 root=LABEL=/root ro
> initrd /initrd.img-2.6.18-3-686
>
Hmmm. My system started out on Woody a long time ago and I gave messed
with the partition scheme several times, so that might be why I have
mine like that.

Regards,

-Roberto

--
Roberto C. Sanchez
http://people.connexer.com/~roberto
http://www.connexer.com

Kernel install problem

Bob McGowan wrote:
> Roberto C. Sanchez wrote:
>> On Thu, Mar 01, 2007 at 12:09:49PM -0500, Kevin Mark wrote:
>>> why do you use "/boot/boot/grub/" and not the default "/boot/grub/"?
>>> what is in /boot/grub/menu.lst vs /boot/boot/grub/menu.lst ?
>>>
>> Using /boot/boot/grub is necessary when /boot is its own filesystem.
>>
>> Regards,
>>
>> -Roberto
>>
>
> Not so. My setup is:
>
> $ uname -r
> 2.6.18-3-686
> $ mount|grep boot
> /dev/sda1 on /boot type ext3 (rw)
> $ ls /boot/*2.6.18-3-686*
> /boot/System.map-2.6.18-3-686 /boot/initrd.img-2.6.18-3-686
> /boot/config-2.6.18-3-686 /boot/vmlinuz-2.6.18-3-686
> $grep boot /etc/fstab
> /dev/sda1 /boot ext3 defaults 0 2
>
> My /boot/grub/menu.lst for the default boot:
>
> title Debian GNU/Linux, kernel 2.6.18-3-686
> root (hd0,0)
> kernel /vmlinuz-2.6.18-3-686 root=LABEL=/root ro
> initrd /initrd.img-2.6.18-3-686
>
> ===
>
> NOTE that the path names for the kernel and initrd image DO NOT have a
> leading '/boot', this is because, for the filesystem on /dev/sda1, these
> files are 'connected' to the filesystem's 'root', which ONLY becomes
> /boot/... when the system is up and running, with filesystems from the
> fstab file mounted.
>
> The above was set up automatically, during the install, by the Debian
> installer. I explicitly selected to have '/boot' be a separate file
> system. I suspect the OP's problem is, in fact, because of the
> differences between what the actual setup is and what the dpkg scripts
> expect. I further conjecture that the original install was with /boot
> on the root filesystem, and that a later decision was made to change it,
> with the boot files on a separate filesystem.
>
> To fix this, as root:
>
> # cd /boot/boot
> # mv * .. # no hidden files to worry about.
> # cd ..
> # rmdir boot
> # edit /etc/fstab
> - add/modify line to mount the boot partition, see above example
> # edit grub/menu.lst
> - to fix any kernel/initrd paths, removing /boot, see above example
> # reboot
> ...
> # apt-get update ....
>
> Of course, you should make backups of everything, just in case. And,
> rather than just removing the extra 'boot' directory, you might also
> want to do 'ln -s . boot', so if there are any residual dependencies on
> /boot/boot/..., they will automatically resolve to the right place.
>
> Bob

Thanks for the help. I've have indeed got /boot on it's own partition. I
apt installed grub an age ago and it created /boot/boot itself - I
thought it a little odd at the time. Perhaps the install scripts weren't
very clever way back when it was installed.

The machine has been running Debian for a long time - it started out on
late 2.2 kernels - and up until now grub has updated fine when a new
kernel is installed even with the /boot/boot oddness. I'm wondering if
something has changed with the way new kernels are installed.

I was actually thinking about retiring the machine any way as it's
getting a bit long in the tooth. As it's a server and currently
providing some vital network services I can't realistically afford large
amounts of down time on it so I think I'll hold off making the changes
you suggest. Many thanks though.

Graham

--

Syndicate content