LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   "Successful" dualboot... but now kernel panic (https://www.linuxquestions.org/questions/linux-newbie-8/successful-dualboot-but-now-kernel-panic-370971/)

sina94 10-08-2005 12:58 PM

"Successful" dualboot... but now kernel panic
 
I've successfully gotten my PC to give me the choice between booting Win XP Pro or Knoppix 4.0 with with the Window's NTLOADER, and Win XP boots successfully. But when I try to boot Knoppix I get a "kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(3,2)".

I've searched around and found some people with the same problem and have resolved the issue. But it may as well have been in a foreign language... I either didn't understand what they were saying or it didn't fix the problem.

Can someone please give me some stuff to try and dumb it down enough so that I can follow it. Be as detailed as possible (assume I know nothing... I practically do).

Thank you for the help...

TexasDevilDog 10-08-2005 02:07 PM

"Unable to mount root fs on unknown-block(3,2)" This is not a kernel panic, it is an error from the boot loader. The boot loader needs to know where to boot from.

Is your Knoppix on the fourth hard drive, third partition? The block should be where /boot resides, the numbers are referenced from zero, so (0,0) would be first hard drive, first partition. Well, that is how grub see it.

sina94 10-08-2005 03:35 PM

No, the first partition on the first hard drive is linux swap and the second is knoppix itself, followed by Win XP on the third partition. NTLOADER boots grub from the knoppix root partition (i.e. NTLOADER loads C:\bootsect.lnx which loads GRUB and provides the "knoppix" boot menu).

I don't remember exactly what the grub configuration looks like, the first line is something along the lines of "boot hd0,1" and the second line is "kernel root=/dev/hda2" plus all the "other stuff". I don't know if that's exactly right, but the point is that it's pointing to the right hard drive and partition... so why I'm getting "unknown-block(3,2)", I don't know.

TexasDevilDog 10-08-2005 03:56 PM

I have never messed with NT loader, but block appears to mean a block device, like a hard drive. If it is like grub, (3,2) = 4th HD, 3rd partition. I would look at the setting of the NT loader and find something that looks like "block (3,2) and change it to, (0,1) which is 1st HD, 2nd partition, which is where you said Knoppix was at. I would set the linux boot to have the correct infomation you need.

First line of grub should be -> root (hd0,1)

For future reference, a swap partition is placed at the end of the drive or the last partition, due to the slow latency of the outside of the disk. The swap doesn't need to be responsive, but loading data and files for programs is more important and is placed first in partition order.

sina94 10-08-2005 05:16 PM

If I go here: /mnt/hda2/boot/grub, and open up menu.lst... I get a list of my menu options (obviously)... which are:

Code:

title                Debian GNU/Linux, kernel 2.6.12 Default
root                (hd0,1)
kernel                /boot/vmlinuz root=/dev/hda2 ro ### isk_size=100000 init=/etc/init lang=us apm=power-off nomce quiet vga=791
initrd                /boot/initrd.img
savedefault
boot

title                Debian GNU/Linux, kernel 2.6.12
root                (hd0,1)
kernel                /boot/vmlinuz-2.6.12 root=/dev/hda2 ro ### isk_size=100000 init=/etc/init lang=us apm=power-off nomce quiet vga=791
initrd                /boot/initrd.img-2.6.12
savedefault
boot

title                Debian GNU/Linux, kernel memtest86
root                (hd0,1)
kernel                /boot/memtest86.bin 
boot

title                Debian GNU/Linux, kernel memtest86+
root                (hd0,1)
kernel                /boot/memtest86+.bin 
boot

Plus this one for Windows:

Code:

title Windows 2K/XP/2003 (hda3)
chainloader (hd0,2)+1



NT Loader just chainloads (sorry if I'm not using the proper terminology) grub, which is located in the knoppix root partition instead of in the MBR. Once I choose knoppix from the first boot screen, it loads grub and gives me all of the choices listed above. Only after I select one of those do I get the "kernel panic" message. And each of those point to hd0,1. Is there somewhere else I should be looking?

TexasDevilDog 10-08-2005 05:50 PM

The hard drive and partitions look correct.

Quote:

Originally posted by sina94

Code:

title                Debian GNU/Linux, kernel 2.6.12 Default
root                (hd0,1)
kernel                /boot/vmlinuz??????????? root=/dev/hda2 ro ### isk_size=100000 init=/etc/init lang=us apm=power-off nomce quiet vga=791
initrd                /boot/initrd??????????.img
savedefault
boot


Where is the rest of the name of the kernel and initial ram disk? You can find the names of them by editing the line. If you erase everything back until it says kernel /boot and then press <tab> grub will then display the possible choices. The same for the initrd line.

sina94 10-08-2005 06:30 PM

The two vmlinuz files are vmlinuz and vmlinuz-2.6.12, and the same for initrd... initrd.img and initrd.img-2.6.12.

I get the same error regardless of which ones I use. And the same thing regardless of whether or not I delete all of the extra "boot options" after /boot/vmlinuz

sina94 10-08-2005 06:44 PM

When I take off the very end of the kernel line (the "quiet" and "vga=791" parts) it shows these two lines just before the error:

RAMDISK: compressed image found at block 0
RAMDISK: incomplete write (-28 != 32768) 4194304

TexasDevilDog 10-08-2005 06:48 PM

I still think you maybe point to the wrong partition. If not, then you will need to check the file system.
Can you give me the results from /sbin/fdisk -l ?

And df command?

sina94 10-08-2005 07:28 PM

For the fdisk I got:

Code:

Disk /dev/hda: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1              1        131    1052226  82  Linux swap / Solaris
/dev/hda2            132        1436    10482412+  83  Linux
/dev/hda3  *        1437        2741    10482412+  7  HPFS/NTFS

Disk /dev/sda: 249 MB, 249561088 bytes
16 heads, 32 sectors/track, 952 cylinders
Units = cylinders of 512 * 512 = 262144 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        952      243696    6  FAT16

and for the df I got:
Code:

Filesystem          1K-blocks      Used Available Use% Mounted on
/dev/root                2471        16      2455  1% /
/ramdisk                401232      7764    393468  2% /ramdisk
/UNIONFS              7503136  7109668    393468  95% /UNIONFS
/dev/hdc              3266524  3266524        0 100% /cdrom
/dev/cloop            5258024  5258024        0 100% /KNOPPIX
/dev/cloop2            1843882  1843882        0 100% /KNOPPIX2
/UNIONFS/dev/hda2    10482044  7040004  3442040  68% /mnt/hda2
/UNIONFS/dev/hda3    10482412  1791896  8690516  18% /mnt/hda3
/UNIONFS/dev/sda1      243440      120    243320  1% /mnt/sda1


TexasDevilDog 10-08-2005 09:14 PM

Thanks. I didn't see anything wrong. Have you fsck command on your hard drive? boot with knoppix live and don't mount the drive and then check it.

Never mind about the log file, your logger isn't running.

sina94 10-08-2005 09:41 PM

All I got when I ran fsck was "fsck 1.38 (30-Jun-2005)" and I'm assuming that there's supposed to be more to it than that.

And was this:

Quote:

Never mind about the log file, your logger isn't running.
...in reference to something I said?

TexasDevilDog 10-09-2005 12:21 AM

Quote:

Originally posted by sina94
All I got when I ran fsck was "fsck 1.38 (30-Jun-2005)" and I'm assuming that there's supposed to be more to it than that.

And was this:



...in reference to something I said?

The logger statement: I orginally posted about checking your log file, but later I thought that the logger thread in the kernel was probably not running yet, because it never loads the kernel. The log file is located at /var/logs/messages

The /sbin/fsck should syntax like this
Code:

[root@localhost Richard]# /sbin/fsck
fsck 1.37 (21-Mar-2005)
e2fsck 1.37 (21-Mar-2005)
/dev/hdc2 is mounted.

WARNING!!!  Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)? no

check aborted.
e2fsck 1.37 (21-Mar-2005)
ext2fs_check_if_mount: Permission denied while determining whether /dev/hdc1 is mounted.
/boot: recovering journal
/boot: clean, 32/25272 files, 13202/100768 blocks
[root@localhost Richard]#

Try the device drive -> /sbin/fsck /dev/hdc

Can you tell me the label of your partitions?
Code:

/sbin/e2label /dev/hdc1
 /sbin/e2label /dev/hdc2
 /sbin/e2label /dev/hdc3

Expect any swap partition to return an error.

sina94 10-09-2005 01:52 AM

Ok, I got errors on the first and third partitions because the first is my swap and the third is my NTFS partition for Windows... here's what I got for the second one:

Code:

fsck 1.38 (30-Jun-2005)
reiserfsck 3.6.19 (2003 www.namesys.com)

*************************************************************
** If you are using the latest reiserfsprogs and  it fails **
** please  email bug reports to reiserfs-list@namesys.com, **
** providing  as  much  information  as  possible --  your **
** hardware,  kernel,  patches,  settings,  all reiserfsck **
** messages  (including version),  the reiserfsck logfile, **
** check  the  syslog file  for  any  related information. **
** If you would like advice on using this program, support **
** is available  for $25 at  www.namesys.com/support.html. **
*************************************************************

Will read-only check consistency of the filesystem on /dev/hda2
Will put log info to 'stdout'

Do you want to run this program?[N/Yes] (note need to type Yes if you do):Yes

******************************************************
* Warning: The dma on your hard drive is turned off. *
* This may really slow down the fsck process.        *
******************************************************
###########
reiserfsck --check started at Sat Oct  8 23:21:09 2005
###########
Replaying journal..
Reiserfs journal '/dev/hda2' in blocks [18..8211]: 0 transactions replayed
Checking internal tree..finished
Comparing bitmaps..finished
Checking Semantic tree:
finished
No corruptions found
There are on the filesystem:
        Leaves 97214
        Internal nodes 608
        Directories 26626
        Other files 398051
        Data block pointers 1653970 (0 of them are zero)
        Safe links 0
###########
reiserfsck finished at Sat Oct  8 23:27:54 2005
###########


e2label wouldn't work because none of them are ext2 partitions (at least, that's why I'm assuming it didn't work). I fired up qtparted and it says the the linux-swap and NTFS partition labels are blank and for the reiserfs partion (on which Knoppix resides) the label is "No label" rather than just a blank.

And as a side note: I don't know whether this is important or not, but qtparted shows the status of the NTFS partition is "Active" and the unpartitioned space is "Hidden", but the status of the reiserfs and the linux-swap partitions are blank... right-clicking brings up a "Set active..." option.

AwesomeMachine 10-09-2005 03:09 AM

if everything else fails, you kernel is configure with the root filesystem as a module. Support for the root filesystem needs to be compiled into the kernel, as part of the kernel, not a module. Did you select a root filesystem that is not the default? This is what happens when you do that. Reinstall linux with the default filesystem for root. Typically, in linux, all filesystem support is modular, except the root filesystem. That is compiled into the kernel. Some distros don't catch that you changed from the default, and recompile the kernel. Debian is one that does this correctly.


All times are GMT -5. The time now is 07:05 PM.