Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Write an article for LinuxForums Today! Win Great Prizes!
Fedora 6: kernel panic when moving to new computer
Hello, I need help/advice on the following problem.
I had Fedora 6 installed on my old desktop (DELL DIMENSION 2400) back in January 2007 and had no problems with it until recently. It was installed on a separate physical internal SATA HD. Unfortunately, the desktop died (motherboard got bad), so I took out the HD with Fedora 6 and now I am trying to use it with my new laptop (Lenovo T60). I got a USB SATA HD enclosure for the hard drive. The laptop's BIOS has an option for booting from external USB HD. However, during the boot process I get "Kernel panic - not syncing: Attempted to kill init!" message.
To give you more details, I am using GRUB to chose between the opearting systems I want to load. The grub is on a diskette. So, back when I used desktop, I inserted a diskette and picked between Windows XP (which was installed on a primary IDE HD) and Fedora 6 (which resided on a second SATA HD). Now I am doing the same thing on a laptop: on primary HD there's Windows XP, on connected via USB SATA HD I have Fedora 6. Technically, I have the same configuration as before except the formerly internal SATA drive is now external and is connected via USB.
Here's the output of grub on laptop (hd0 has Windows XP, hd1 has Fedora 6):
grub> geometry (hd0)
drive 0x80: C/H/S = 1023/240/63, The number of sectors=234441648, LBA
Partition num 0, Filesystem type unknown, partition type 0x7
Partition num 1, Filesystem type unknown, partition type 0x12
grub> geometry (hd1)
drive 0x81: C/H/S = 1024/255/63, The number of sectors=321672960, LBA
Partition num 0, Filesystem type ext2fs, partition type 0x83
Partition num 1, Filesystem type unknown, partition type 0x8e
grub> root (hd1,0)
Filesystem type is ext2fs, partition type 0x83
grub> boot
...
Kernel panic - not syncing: Attempted to kill init!
Fedora 6 is still booting and working when I use the SATA drive as an internal HD with another desktop (which is not mine).
What might be causing this behavior? Also, is there a way to save the output of the boot process to a file? It just goes very fast and I can show the last 24 lines that are shown right now on the laptop screen:
************************************************** **
Loading dm-snapshot.ko module
Making device-mapper control node
Scanning logical volumes
Reading all physical volumes. This might take a while.
No volume groups found
Activating logical volumes
Volume group "VolGroup00" not found
Trying to resume from /dev/VolGroup00/LogVol01
Unable to access resume device (/dev/VolGroup00/LogVol01)
Creating root device.
Mounting root filesystem.
mount: could not find filesystem '/dev/root'
Setting up other filesystems.
Setting up new root fs
setuproot: moving /dev failed: No such file or directory
no fstab.sys, mounting internal defaults
setuproot: error mounting /proc: No such file or directory
setuproot: error mounting /sys: No such file or directory
Switching to new root and running init.
unmounting old /dev
unmounting old /proc
unmounting old /sys
switchroot: mount failed: No such file or directory
Kernel panic - not syncing: Attempted to kill init!
************************************************** **
What you're trying to do is to pry and open a box, the key to which, is inside that very box !!
When you use HD as an internal disk, which was the configuration with your desktop, the IDE drivers for the disk were compiled within the kernel or got loaded by the initrd image and thus the disk could work. Now, when you're trying to use it as an external USB drive, you don't have the USB drivers loaded which will allow linux to access the USB drive. Without the USB drivers, linux won't be able to access the USB drive and will panic !!
All that you need to is to recompile a kernel with the USB drivers built into the kernel or have them built into the initrd so, they get loaded before linux tried to mount the root filesystem. Once the USB drivers are loaded, linux can access the disk and mount the root filesystem and continue with the boot process.
You don't have to use the floppy disk to choose between linux and windoz. You can install GRUB on one or both the disks and configure it to provide you with boot options to select between linux and windoz etc. You can achieve the same by configuring the windoz bootloader to present you with the boot selection screen. You'll find several threads on this forum that discuss these issues and provide a solution too.
I had Fedora 6 installed on my old desktop (DELL DIMENSION 2400) back in January 2007 and had no problems with it until recently. It was installed on a separate physical internal SATA HD. Unfortunately, the desktop died (motherboard got bad), so I took out the HD with Fedora 6 and now I am trying to use it with my new laptop (Lenovo T60). I got a USB SATA HD enclosure for the hard drive. The laptop's BIOS has an option for booting from external USB HD. However, during the boot process I get "Kernel panic - not syncing: Attempted to kill init!" message.
Your SATA Harddisk in USB enclosure is not configured as it was in other machine. You have to edit /etc/fstab and grub.conf files.
Boot up from any LiveCD and mount Partitions of Fedora disk.
Post the contents of /etc/fstab and /boot/grub/grub.conf files. Post the output of fdisk -l command too.
__________________
It takes a lot of time to be a genius, you have to sit around so much doing nothing, really doing nothing. - Gertrude Stein New Users:Read This First
What you're trying to do is to pry and open a box, the key to which, is inside that very box !!
When you use HD as an internal disk, which was the configuration with your desktop, the IDE drivers for the disk were compiled within the kernel or got loaded by the initrd image and thus the disk could work. Now, when you're trying to use it as an external USB drive, you don't have the USB drivers loaded which will allow linux to access the USB drive. Without the USB drivers, linux won't be able to access the USB drive and will panic !!
All that you need to is to recompile a kernel with the USB drivers built into the kernel or have them built into the initrd so, they get loaded before linux tried to mount the root filesystem. Once the USB drivers are loaded, linux can access the disk and mount the root filesystem and continue with the boot process.
You don't have to use the floppy disk to choose between linux and windoz. You can install GRUB on one or both the disks and configure it to provide you with boot options to select between linux and windoz etc. You can achieve the same by configuring the windoz bootloader to present you with the boot selection screen. You'll find several threads on this forum that discuss these issues and provide a solution too.
Thanks kevkim55!
I know I don't have to use floppy to choose b/n Windows and Linux. I am not that familiar with Linux to be eager to go into core recompilation unless its the only way out. Is this possible to upgrade/update the kernel or initrd to include USB drives without recompiling, say just adding them to a disk?
If the only solution is to recompile the kernel, can you suggest a link that describes the commands?
I don't use Fedora. There could be a file under /etc in which you could specify the modules to be included in initrd image. So, you could specify the usb modules in this file and simply run mkinitrd. But as a general rule it should be possible to specify the modules to include in the initrd to the command mkinitrd.
It would be something like:
Quote:
mkinitrd -k /boot/vmlinuz-2.6.19-1.2895.fc6 -i /boot/initrd-2.6.19-1.2895.fc6.img -m <list modules here seperated by commas>
Back up your existing initrd somewhere. Extract the contents of initrd image somewhere. Normally initrd is a compressed cpio archive. So first uncompress using gunzip and extract using cpio command. Check what modules are included already and specify those along with the usb modules on the mkinitrd command line. You don't have to do this step if, you could locate the mkinitrd config file and add the usb modules to the configuration.
Ah ! I presumed that, you already have modified menu.lst and /etc/fstab. If you haven't already done so, follow devils_casper's instructions.
I don't use Fedora. There could be a file under /etc in which you could specify the modules to be included in initrd image. So, you could specify the usb modules in this file and simply run mkinitrd. But as a general rule it should be possible to specify the modules to include in the initrd to the command mkinitrd.
It would be something like:
Back up your existing initrd somewhere. Extract the contents of initrd image somewhere. Normally initrd is a compressed cpio archive. So first uncompress using gunzip and extract using cpio command. Check what modules are included already and specify those along with the usb modules on the mkinitrd command line. You don't have to do this step if, you could locate the mkinitrd config file and add the usb modules to the configuration.
Ah ! I presumed that, you already have modified menu.lst and /etc/fstab. If you haven't already done so, follow devils_casper's instructions.
First, thank you and devils_casper!
I don't have a live CD but I will boot Fedora on a desktop PC to look at /etc/fstab and /boot/grub/grub.conf.
kevkim55, how do I find out which modules (USB drivers) to list for the mkinitrd command? Is there a place where they are listed?
As a side note, I want to understand one thing. I noticed that when I connect both floppy and external SATA drives and GRUB loads from a floppy, I get a nice "blue" background (splash screen) inside GRUB. When SATA HD is not connected, GRUB is text-only black and white. So, I figure that it reads a picture with the splash image from the SATA drive? If so, GRUB knows how to read data on SATA connected via USB. Is this possible that GRUB is smarter than Linux kernel or initrd? After all, it's a small utility that fits into a floppy. Could you explain?
I dont think you need to USB modules/drivers unless you are using custom compiled kernel.
Quote:
As a side note, I want to understand one thing. I noticed that when I connect both floppy and external SATA drives and GRUB loads from a floppy, I get a nice "blue" background (splash screen) inside GRUB. When SATA HD is not connected, GRUB is text-only black and white. So, I figure that it reads a picture with the splash image from the SATA drive? If so, GRUB knows how to read data on SATA connected via USB. Is this possible that GRUB is smarter than Linux kernel or initrd? After all, it's a small utility that fits into a floppy. Could you explain?
I can explain this after checking output of fdisk -l command and contents of /boot/grub/grub.conf file of Floppy.
GRUB and kernel/initrd are two entirely different things. GRUB checks config files and display Menu at startup. If its configs are configured correctly and points to correct kernel and initrd, both will work properly too.
__________________
It takes a lot of time to be a genius, you have to sit around so much doing nothing, really doing nothing. - Gertrude Stein New Users:Read This First
I dont think you need to USB modules/drivers unless you are using custom compiled kernel.
I can explain this after checking output of fdisk -l command and contents of /boot/grub/grub.conf file of Floppy.
GRUB and kernel/initrd are two entirely different things. GRUB checks config files and display Menu at startup. If its configs are configured correctly and points to correct kernel and initrd, both will work properly too.
Here's the contents of /boot/grub/grub.conf:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd1,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd1,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora Core (2.6.19-1.2895.fc6)
root (hd1,0)
kernel /vmlinuz-2.6.19-1.2895.fc6
initrd /initrd-2.6.19-1.2895.fc6.img
title WindowsXP
rootnoverify (hd0,0)
chainloader +1
As you can see, GRUB indeed reads splashimage from (hd1,0). hd1 is SATA HD. I will post the contents of the other files and commands tomorrow when I have access to a desktop.
Open Source Security Myths Dispelled Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization subscribe
InformationWeek InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology. subscribe