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.
debian:/home/jkfisher# lilo
Fatal: open /initrd.img: No such file or directory
Long Version:
Hiya. Sorry for the probably newbie question. I used apt-get (actually wajig, but who's counting?) to update, incl. my kernel, which I've done many times before, but for the first time I've seen, LILO is throwing an error now, and I'm afraid to restart, in case it doesn't come back up.
Helpe moi, sil vous plait?
Code:
Preparing to replace kernel-image-2.6.8-1-686 2.6.8-5 (using .../kernel-image-2.6.8-1-686_2.6.8-9_i386.deb) ...
The directory /lib/modules/2.6.8-1-686 still exists. Continuing as directed.
Unpacking replacement kernel-image-2.6.8-1-686 ...
The link /initrd.img is a dangling link
Removing symbolic link /initrd.img
Unless you used the optional flag in lilo, you may need to re-run lilo
Code:
Setting up kernel-image-2.6.8-1-686 (2.6.8-9) ...
You are attempting to install a kernel version that is the same as
the version you are currently running (version 2.6.8-1-686). The modules
list is quite likely to have been changed, and the modules dependency
file /lib/modules/2.6.8-1-686/modules.dep needs to be re-built. It can
not be built correctly right now, since the module list for the
running kernel are likely to be different from the kernel installed.
I am creating a new modules.dep file, but that may not be
correct. It shall be regenerated correctly at next reboot.
I repeat: you have to reboot in order for the modules file to be
created correctly. Until you reboot, it may be impossible to load
some modules. Reboot as soon as this install is finished (Do not
reboot right now, since you may not be able to boot back up until
installation is over, but boot immediately after). I can not stress
that too much. You need to reboot soon.
Please Hit return to continue.
Not touching initrd symlinks since we are being reinstalled (2.6.8-5)
Not updating image symbolic links since we are being updated (2.6.8-5)
A new kernel image has been installed, and usually that means
that some action has to be taken to make sure that the new
kernel image is used next time the machine boots. Usually,
this entails running a ``bootloader'' like SILO, loadlin, LILO,
ELILO, QUIK, VMELILO, ZIPL, or booting from a floppy. (Some
boot loader, like grub, for example, do not need to be run on
each new image install, so please ignore this if you are using
such a boot loader).
A new kernel image has been installed at /boot/vmlinuz-2.6.8-1-686
(Size: 1136kB)
Initial rootdisk image: /boot/initrd.img-2.6.8-1-686 (Size: 4540kB)
Symbolic links, unless otherwise specified, can be found in /
LILO sets up your system to boot Linux directly from your hard
disk, without the need for booting from a boot floppy.
WARNING
If you are keeping another operating system or another version
of Linux on a separate disk partition, you should not have LILO
install a boot block now. Wait until you read the LILO documentation.
That is because installing a boot block now might make the other
system un-bootable. If you only want to run this version of Linux,
go ahead and install the boot block here. If it does not work, you
can still boot this system from a boot floppy.
You already have a LILO configuration in /etc/lilo.conf
Install a boot block using the existing /etc/lilo.conf? [Yes]
Testing lilo.conf ...
An error occurred while running lilo in test mode, a log is
available in /var/log/lilo_log.17311. Please edit /etc/lilo.conf
manually and re-run lilo, or make other arrangements to boot
your machine.
Please hit return to continue
Code:
debian:/home/jkfisher# cat /var/log/lilo_log.17311
Fatal: open /initrd.img: No such file or directory
debian:/home/jkfisher# lilo
Fatal: open /initrd.img: No such file or directory
Thanks in advance
Last edited by JohnKFisher; 11-24-2004 at 04:11 PM.
"The link /initrd.img is a dangling link
Removing symbolic link /initrd.img
Unless you used the optional flag in lilo, you may need to re-run lilo"
Did you?
You don't say, so i speculate that you dist-upgraded from Woody. If so, did you do before and after the dist-ugrade:
#apt-get update
#apt-get dist-upgrade
sometimes it's necesary. I have never had a problem with installing a kernel-image with LILO or GRUB, (i prefer GRUB, but i chose XFS with the net installer, and only works with LILO) you might have answered a question wrongly. To play it safe, install 'synaptic' look for the new kernel, if it's there, delete it. (it should be under All or Installed.
Then get rid of LILO:
#dpkg --purge lilo
#apt-get clean
#apt-get update
#apt-get install grub
#grub-install /dev/hda (if you only have one hd)
#update-grub
Then start again:
#apt-get install kernel-image-<whatever>
there will be no questions, it will upgrade grub menu list automatically. At the end, at the prompt:
Hi, This same thing happened to me the other day. I casually did a dist-upgrade and everything went to HEC. I got the same messages that said rebooting would rebuild the module dependencies, but it didn't boot at all! The only difference with my scenario is that instead of it complaining about initrd.img, I got a message saying that root was invalid.
I've spent the last two days trying to rebuild my boot record and manually installing a new kernel image using several boot CD's that I've downloaded from the web but so far nothing has worked. I'm not sure what to do now.. I can't boot so I can't apt-get install grub or a new kernel image. Any tips that can help me?
I'm thinking of booting a cd, then monting /dev/hda1 (my boot partition), then I will have to mount all my other partitions.. I have several for home, proc, usr, etc.., then I can do a chroot to hda1 and maybe from there I can run apt-get. I haven't tried this yet, but I can't think of any other way to get apt-get to work. Does this sound like it might work?
Any suggestions would be greatly appreciated!
Thanks!
Jim
Quote:
Originally posted by macondo "The link /initrd.img is a dangling link
Removing symbolic link /initrd.img
Unless you used the optional flag in lilo, you may need to re-run lilo"
Did you?
You don't say, so i speculate that you dist-upgraded from Woody. If so, did you do before and after the dist-ugrade:
#apt-get update
#apt-get dist-upgrade
sometimes it's necesary. I have never had a problem with installing a kernel-image with LILO or GRUB, (i prefer GRUB, but i chose XFS with the net installer, and only works with LILO) you might have answered a question wrongly. To play it safe, install 'synaptic' look for the new kernel, if it's there, delete it. (it should be under All or Installed.
Then get rid of LILO:
#dpkg --purge lilo
#apt-get clean
#apt-get update
#apt-get install grub
#grub-install /dev/hda (if you only have one hd)
#update-grub
Then start again:
#apt-get install kernel-image-<whatever>
there will be no questions, it will upgrade grub menu list automatically. At the end, at the prompt:
Originally posted by Draygo Had this happen to me too. For some reason the kernel install went borked. You can fix it really easily. Just recreate the /initrd.img link.
ln -s /boot/initrd.img-2.6.8-1-686 /initrd.img
after this rerun lilo
I the 2.6.8-1-686 kernel package was borked when made.
Thanks, now I get the kernel to boot.. but it panics.. error says
VFS: Cannot open root device "301" or unknown-block(3,1)
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on unknown-block(3,1)
I have no idea what this means, but this is as close as I've come to getting this resolved.
in my lilo.conf, I have
boot=/dev/hda
root=/dev/hda1
I have run lilo, and I get my lilo boot menu (I have kernel-image-2.6.8-1-k7 as well as my old kernel-image-2.4.24-1-k6) both kernels give me the same panic, almost the exact message. The k6 message differs only slightly where the k7 says 'device "301" ' the k6 error says 'device "" '
it also has a different block() number..
I finally fixed my boot problems. I posted to the deboian user forum but since I had asked questions here I wanted to follow up here as well in case anyone lse ever runs into this problem. Hope this helps!
begin
--------------
I was finally able to get lilo working again,
but
kernel panics (image 2.6.8-1-k7)
VFS: Cannot open root device "301" or
unknown-block(3,1)
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on
unknown-block(3,1)
I have no idea what this means, but this is as
close as I've come to getting this resolved.
in my lilo.conf, I have
boot=/dev/hda
root=/dev/hda1
What I did was this:
Booting to knoppix cd, I was able to mount all
of
my partitions, then I did chroot to my hda1
partition. doing this was able to do apt-get
install --reinstall kernel-image-2.6.8-1-k7 (I
still have the .deb in my apt cache) and it did
go thru the install and it asked me all kinds
of
lilo questions. It created a new lilo.conf
which
looks drammitacally different (it only hase one
image= defined) but for some reason I still get
my old lilo boot menu as if it were getting it
from somewhere else!
Being fed up with this, I did apt-get remove
lilo
and did apt-get install grub
when that was done I did grub-install /dev/hda.
I rebooted and I got the grub prompt:
grub>
so I did
grub> kernel /vmlinuz
(vmlinuz is symlink to kernel-2.6.7-1-k7)
grub> initrd /initrd.img
grub> root
(grub uses (hd0,0) )
grub> boot
the kernel begins to boot and it gets to a new
and completely different kernel panic:
pivot_root: No such file or directory
/sbin/init: 426: connot open dev/console: No
such
file
Kernel panic: Attempted to kill init!
I figured out that that basically root
needs to be defined twice.. not sure if that's
the correct terminology or not...
I created a /boot/grub/menu.lst file and here it
is in case anyone else ever needs it. and I will
never again do a dist-upgrade with out a full
backup of everything. I never want to go thru
this again.
Xucean... I'm having the exact same issue with Grub that you had, getting the Kernel Panic trying to kill INIT error right now.
I want to try your menu.lst, with some minor modifications for my system, but I can't even get to a place to edit the menu.lst... how did you manage this? Right now I'm downloading Knoppix and hoping I can about it that way.
Also, once I modify the file, do I need to run anything, as with modifying lilo.conf needing to run lilo
Please, this system is driving me insane, I would love any help, as it stands I'm about 10 minutes from just installing redhat and being done with it... I love debian, but this machine is just not playing right with it (HP DL360 with a SCSI Raid Controller in it)
Hi, menu.lst does not exist until you create it and it must reside in directory /boot/grub.
You can copy and paste my example menu.lst (see my other post above) beginning at "default" and ending at "boot" then you need to make the appropriate changes for your system. I've never configured raid before so I don't know what specific settings you need to put in. I have a 2gb ide drive as my boot drive and it is /dev/hda1 so root=/dev/hda1 and my kernel image name is vmlinuz-2.6.7-1-k7 and resides in /boot.
The line which reads "root (hd0,0)" has special meaning and the man page can explaine it better than I can. All I know is hd0,0 is basically the same thing as hda1.
You do not have to run anything like lilo does. grub simply reads in the menu.lst when it boots.
I'm sure it would've helped me... but I finally gave up and stuck with lilo. Dryago's advice above solved the lilo problems I was having, and I've pretty much run out of time to tinker and just need to get the box out the door.. so lilo it is.
Perhaps once I'm confident in my boot floppies and the like I'll tinker more with grub since I prefer it, but this raid controller just doesn't seem to want to play nicely with it.
Thanks for the information though, I'm sure it will help me down the line at the very least.
Originally posted by skiflyer I want to try your menu.lst, with some minor modifications for my system, but I can't even get to a place to edit the menu.lst... how did you manage this? Right now I'm downloading Knoppix and hoping I can about it that way.
I'm slow, I just figured out what you meant. Yes, I used a knoppix cd, mounted my hda1 partition and created my menu.lst.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.