LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Kernel panic - not syncing (https://www.linuxquestions.org/questions/slackware-14/kernel-panic-not-syncing-377594/)

darkarcon2015 10-27-2005 09:15 PM

Kernel panic - not syncing
 
I have Slackware installed on a computer along with Gentoo and I can not get Slackware to boot. I have Grub installed and have Slackware installed on an LVM2 partition, but I can't get it to boot. I think I need to use a RAMdisk to load the LVM2 modules so the boot partition (non-LVM) can load Slackware. When I go to boot, I get this error:
Code:

Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,6)
Here is my grub.conf (note: my grub.conf and menu.lst are the same):
Code:

title=Slackware
  root(hd0,0)
  kernel /vmlinuz root=/dev/ram0 real_root=/dev/volumes/Slackware
  initrd /initrd-lvm2-2.6.13.gz

Please, any help is appreciated on this issue and no one on Google seems to have ever done this before.

nonzero 10-27-2005 09:43 PM

You need an initrd kernel or a stock Slackware kernel with the LVM modules compiled in. The contents of your /boot/grub/menu.1st would also help people troubleshoot this issue.

nz

darkarcon2015 10-27-2005 09:56 PM

Quote:

Originally posted by nonzero
You need an initrd kernel or a stock Slackware kernel with the LVM modules compiled in. The contents of your /boot/grub/menu.1st would also help people troubleshoot this issue.

nz

Okay, I added the relevent information, but as for the kernel... I told Slackware to use the test26 kernel during the configuration and it doesnt have LVM compiled in. The default kernel doesn't have LVM at all. I need to use LVM2 also.

darkarcon2015 10-30-2005 06:34 PM

UPDATE:

Okay, I ran a script that I found entitled "lvm2create_initrd". This worked great, it generated an init.gz file which I copied to my /boot partition. I then edited my grub.conf file (edited version can be cound above) and rebooted. I am now getting a new error:
Code:

Kernel panic - not syncing: No init found.  Try passing init= option to kernel.
Now, something seems to have happened, as right above this error is the following:
Code:

VFS: Mounted root (ext2 filesystem) readonly.
Freeing unused kernel memory: 252k freed

Though, my root partition is formatted at Ext3...

UPDATE TWO:

I have been messing with my grub.conf and still can't get this to work. All my attempts result in the exact same error. I have tried all the following "init=" arguments:
Code:

init=/etc/rc.d
Code:

init=/etc/rc.d/rc.S
Code:

init=/sbin/init
Any help is really appreciated.

nonzero 10-30-2005 10:34 PM

Do you have lines in your /boot/grub/menu.lst similar to below and is does the naming of the initrd image coincide with it?

title kernel-2.6.14.1.1-i386
root (hd0,0)
kernel /vmlinuz-2.6.14.1.1-i386 root=/dev/hdb3 ro quiet splash
initrd /initrd.img-2.6.14.1.1-i386
savedefault
boot

title kernel 2.6.14.1.1-i386 (recovery mode)
root (hd0,0)
kernel /vmlinuz-2.6.14.1.1-i386 root=/dev/hdb3 ro single
initrd /initrd.img-2.6.14.1.1-i386
savedefault
boot

The kernel panic follows the initrd boot (VFS stuff) because although the initrd image is loading, as it switches to your normal kernel it either cannot find the correct kernel or does not find the correct filesystem (for the modules it has available). The initrd image is an ext2 filesystem looped in RAM so it does not matter how your harddrive partitions are formatted until it tries to make the switch.
Maybe I'm brain dead but I did not see your menu.lst posted. I don't use initrd kernels for the reasons you are experiencing. I had some amount of toil trying to get Slack 10.3 on a system I wanted XFS on with the cpqarray driver. I finally got to the login prompt after about 2 days. I will try to retrace my steps and submit a reply if you don't suceed by then.

nz

darkarcon2015 10-31-2005 10:08 AM

My grub.conf and menu.lst are the same file.

darkarcon2015 11-01-2005 07:59 PM

UPDATE THREE
I have dumped the initrd file that `lvm2create_initrd` created for me and om now going with the one that `mkinitrd` gave me.

When I initially ran `mkinitrd` it set up an initrd-tree in my /boot directory in which I had to edit files signifying my archetecture (i386) and root directory (/mnt/volumes/Slackware one `vgchange -a y` is executed). So, I told `mkinitrd` that I needed the dm-mod to load in the ramdisk and that worked. I then edited my grub conf to use the new initrd file and set "init=/sbin/init". When I booted it set me into a bash terminal whose root directory was initrd-tree. I couldn't do anything except run commands linked by BusyBox.

After that, I put the lvm commands and libraries into initrd-tree thinking that I might be able to run lvm and such in this ramdisk when I reboot. That failed, as I would need to link them to busybox. So, I notice that there was a "linuxrc" file in "initrd-tree" which is what I was looking for. It contains the LVM setup (it runs `vgscan` and `vgchange -a y`) and `pivot_root`'s into my real root partition. So, I now told grub to use that file as "init=".

Once I did that, I got to my present situation:
Code:

VFS: Mounting root (ext2 filesystem).
Freeing unused kernel memory: 160k freed
/boot/initrd.gz: Loading kernel modules from initrd image:
Using /lib/modules/2.6.13/dm-mod.ko
device-mapper: 4.4.0-ioctl (2005-01-12) initialised: dm-devel@redhat.com
mount: Mounting /dev/volumes/Slackware on /mnt failed: No such device
ERROR:  mount returned erorr code 1.  Trouble ahead.
mount: Mounting /dev/volumes/Slackware on /mnt failed: Invalid argument
mount: Mounting /dev/volumes/Slackware on /mnt failed: Invalid argument
/boot/initrd.gz exiting
pivot_root: pivot_root: Device or resource busy
Kernel panic - not syncing: Attempted to kill init!

I feel that I am very close. I just don't know how to configure this "initrd-tree" directory. Again, any help is really appreciated!

nonzero 11-01-2005 09:02 PM

I would say that you are on the right trail, your solution to loading the right modules under the initrd is more elegant than mine. I copied the needed modules to a floppy from the CD then loaded them from the bash prompt under busybox. This allowed me to start the installation to XFS partitions on the Compaq RAID. It got messy though when I ran out of ram and had to unload some other modules, then start the whole process over again (several times).
As a wild ass guess I would ask if you have the soft links sll setup properly i.e. from /root to /boot and are your fstab's correct for your configuration.

nz


All times are GMT -5. The time now is 06:17 PM.