LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-23-2007, 09:41 PM   #1
Scotteh
Member
 
Registered: May 2006
Distribution: Debian, Kubuntu Gutsy
Posts: 44

Rep: Reputation: 15
Failed to symbolic-link boot/initrd.img-2.6.18-4-486 to initrd.img


I can't really give any details about what's going on here because I don't understand it at all. It happens everytime I do anything such as installing a package or removing a package. I am using Debian, and this error occurs with aptitude and with apt-get.

This is what is outputted:
Code:
Setting up linux-image-2.6.18-4-486 (2.6.18.dfsg.1-12) ...
Running depmod.
Finding valid ramdisk creators.
Using mkinitramfs-kpkg to build the ramdisk.
Failed to symbolic-link boot/initrd.img-2.6.18-4-486 to initrd.img.
dpkg: error processing linux-image-2.6.18-4-486 (--configure):
 subprocess post-installation script returned error exit status 17
Errors were encountered while processing:
 linux-image-2.6.18-4-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-12) ...
Running depmod.
Finding valid ramdisk creators.
Using mkinitramfs-kpkg to build the ramdisk.
Failed to symbolic-link boot/initrd.img-2.6.18-4-486 to initrd.img.
dpkg: error processing linux-image-2.6.18-4-486 (--configure):
 subprocess post-installation script returned error exit status 17
Errors were encountered while processing:
 linux-image-2.6.18-4-486
 
Old 05-29-2007, 04:01 PM   #2
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
There should what appears to be a file called initrd.img (but is just a link)in the root directory that points to /boot/initrd-version.img which is a real file.

Why it can't make this link is strange - is /boot on a mounted partition?
 
Old 05-30-2007, 06:54 AM   #3
Scotteh
Member
 
Registered: May 2006
Distribution: Debian, Kubuntu Gutsy
Posts: 44

Original Poster
Rep: Reputation: 15
I don't believe it is. I never explicitly created a separate partition for it, and it isn't listed in /etc/fstab

This is pretty interesting though...
Code:
/; ls -l
lrwxrwxrwx   1 root root    23 2007-03-25 14:39 initrd.img -> initrd.img-2.6.18-4-486
lrwxrwxrwx   1 root root    27 2007-03-25 06:20 initrd.img.old -> boot/initrd.img-2.6.7-1-386
lrwxrwxrwx   1 root root    20 2007-03-25 14:39 vmlinuz -> vmlinuz-2.6.18-4-486
lrwxrwxrwx   1 root root    24 2007-03-25 06:20 vmlinuz.old -> boot/vmlinuz-2.6.7-1-386
/boot; ls
config-2.6.18-4-486  initrd.img-2.6.18-4-486      System.map-2.6.18-4-486
grub                 initrd.img-2.6.18-4-486.bak  vmlinuz-2.6.18-4-486
It appears as if the vmlinuz and initrd.img symlinks in / do not point to the correct place because vmlinuz and initrd.img are in /boot, not in /.
 
Old 05-30-2007, 08:30 AM   #4
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
Yeah that sounds about right - they should point to something like that for the initrd and the vmlinuz:

lrwxrwxrwx 1 root root 27 2007-05-30 10:11 initrd.img -> boot/initrd.img-2.6.21-1-k7

Are there a initrd-2.6.18-4-486 and vmlinuz under / or is that just a dangling symlink?
If those are there I'd just copy that to /boot and change the symlink to see whats going on.

Unfortunately I use Lilo as bootloader and wouldn't have the faintest idea if this is a grub related thing.I did try grub on Debian once and dumped it at once because it left the system for some reason unbootable.
 
Old 05-31-2007, 07:34 AM   #5
Scotteh
Member
 
Registered: May 2006
Distribution: Debian, Kubuntu Gutsy
Posts: 44

Original Poster
Rep: Reputation: 15
I've been very happy with grub but I've never tried LILO.

initrd-2.6.18-4-486 doesn't exist in /. If I manually change the symlinks to point to /boot, could this prevent me from booting? If so, is it fixable with Knoppix? I don't fancy breaking my system.
 
Old 05-31-2007, 07:56 AM   #6
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
Depends on various things - with grub it _shouldn't_ prevent you from booting but I wouldn't bet on it.
As far as that is concerned it shouldn't with lilo either but thats no your concern right now.
After all you got already a dangling symlink there as is.

Are the initrd and the vmlinuz with the respective versions in /boot ?

If so try to make a symlink to boot like:

cd /
rm initrd
cd /boot
ln -s initrd-version /initrd

and the same stuff for the vmlinuz.

Then you need to make sure you got an entry in grub for the whole thing.
Thats the tricky part since I don't use grub and can't be of any help there

BTW - did you try uname -a to see if you are not by any chance are running the new kernel and the warnings are bogus?
 
Old 06-01-2007, 08:17 AM   #7
Scotteh
Member
 
Registered: May 2006
Distribution: Debian, Kubuntu Gutsy
Posts: 44

Original Poster
Rep: Reputation: 15
Code:
/ $ sudo mv initrd.img initrd.img\~
/ $ sudo mv vmlinuz vmlinuz\~
/ $ sudo ln -s boot/initrd.img-2.6.18-4-486 initrd.img-2.6.18-4-486
/ $ sudo ln -s boot/vmlinuz-2.6.18-4-486 vmlinuz-2.6.18-4-486
/ $ sudo /sbin/shutdown -r now
Reboot was successful, no errors that I saw. I then upgraded some program to trigger the apt-get error. I chose tzdata because it's small.

Code:
~ $ sudo apt-get install tzdata
Setting up linux-image-2.6.18-4-486 (2.6.18.dfsg.1-12) ...
Running depmod.
Finding valid ramdisk creators.
Using mkinitramfs-kpkg to build the ramdisk.
Running postinst hook script /sbin/update-grub.
Your /etc/kernel-img.conf needs to be updated. Read grub's NEWS.Debian[1]
file and follow its instructions.

  1. /usr/share/doc/grub/NEWS.Debian.gz

Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.18-4-486
Updating /boot/grub/menu.lst ... done

Press return to continue.
Which of course made me happy. Thanks for your help! It was just in time for the new kernel! :P
 
Old 06-01-2007, 08:21 AM   #8
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
Strange - anyway if you are happy so am I.
 
Old 06-01-2007, 11:24 PM   #9
Scotteh
Member
 
Registered: May 2006
Distribution: Debian, Kubuntu Gutsy
Posts: 44

Original Poster
Rep: Reputation: 15
If anyone happens to have the same problem I had, manually symlinking /boot/initrd.img-2.6.18-4-486 to /initrd.img-2.6.18-4-486 was unnecessary. All that needed to be done was to remove the symlink in / that was pointing to /initrd.img-2.6.18-4-486 which didn't exist.
 
  


Reply

Tags
apt-get, aptitude, debian, initrd, kernel, link, symbolic, symlink


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how to make initrd.img for your kernel without boot disk? donaldtalbert Linux - Software 1 06-19-2005 10:30 PM
Mounting boot/initrd.img Law1213 Linux - Software 10 01-25-2005 02:37 PM
Initrd.img spaguzz Slackware 4 12-16-2004 03:35 AM
Initrd.img spaguzz Linux - Software 1 12-09-2004 03:21 PM
No /boot/initrd*.img in RH7? stoub Linux - Newbie 0 12-15-2002 10:59 PM


All times are GMT -5. The time now is 06:08 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration