LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Kernel Panic (https://www.linuxquestions.org/questions/slackware-14/kernel-panic-582630/)

ssin14 09-06-2007 04:58 AM

Kernel Panic
 
Got this problem to a working systems

kernel Panic: Unable to mount root on fs 03:01

Please assist me in how to overcome this problem.

I think I am booting from the right place as it was working.

Dont want to format it again as got heaps of stuff there.

Thanks in advance

tramni1980 09-06-2007 05:08 AM

Make sure that:
1. your root partition is bootable(if not, toggle it bootable using fdisk or cfdisk)
2. the file system you use is compiled directly into the kernel, not as a loadable module

duryodhan 09-06-2007 05:11 AM

Does the bootable flag matter at all for linux ? I know windows doesn't boot up without bootable flag, but my linux seems to work fine without such flag...

tramni1980 09-06-2007 05:58 AM

Quote:

Originally Posted by duryodhan (Post 2883027)
Does the bootable flag matter at all for linux ? I know windows doesn't boot up without bootable flag, but my linux seems to work fine without such flag...

I think in linux the bootable flag matters when the partition you want to boot is not the first one on the hard drive. At least my experience so far leads me to this conclusion.

Pearlseattle 09-06-2007 06:32 AM

If the "bootable" flag is not set, the system won't boot, even if the boot partition is the first one. I am 100% sure, as it happened to me twice to forget to set it on the first partition, and after a reboot nothing moved anymore, until I set it :)

tommcd 09-06-2007 07:06 AM

Quote:

Originally Posted by duryodhan (Post 2883027)
Does the bootable flag matter at all for linux ? I know windows doesn't boot up without bootable flag, but my linux seems to work fine without such flag...

I have always wondered about that also. On my desktop I have: winXP, ubuntu and zenwalk. On my laptop I have: ubuntu, slackware, and debian. Grub in installed to the MBR of each. On each system I only set the OS on the first primary partition to be bootable (winXP on the desktop, ubuntu on the laptop) and I can boot them all.
Here is "fdisk -l" from my desktop:
----------------------------
Device Boot Start End Blocks Id System
/dev/sda1 * 1 2550 20482843+ 7 HPFS/NTFS
/dev/sda2 2551 4374 14651280 83 Linux
/dev/sda3 4375 4617 1951897+ 82 Linux swap
/dev/sda4 4618 19457 119202300 5 Extended
/dev/sda5 4618 6441 14651248+ 83 Linux
/dev/sda6 6442 19457 104550988+ 83 Linux
-------------------------------
Hmmm, running "fdisk -l" from slackware on the laptop shows that nothing seems to have boot flag set. Ubuntu is sda1, slakware is sda5, and debian is sda6:
------------------------------------
Device Boot Start End Blocks Id System
/dev/sda1 1 1216 9767488+ 83 Linux
/dev/sda2 1217 1338 979965 82 Linux swap
/dev/sda3 1339 9729 67400707+ 5 Extended
/dev/sda5 1339 2554 9767488+ 83 Linux
/dev/sda6 2555 3770 9767488+ 83 Linux
/dev/sda7 3771 9729 47865636 83 Linux
bash-3.1#
-------------------------------------
They all can boot though.

onebuck 09-06-2007 07:29 AM

Quote:

Originally Posted by ssin14 (Post 2883014)
Got this problem to a working systems

kernel Panic: Unable to mount root on fs 03:01

Please assist me in how to overcome this problem.

I think I am booting from the right place as it was working.

Dont want to format it again as got heaps of stuff there.

Thanks in advance

Hi,

You can use the Slackware install cd1 to boot the system. Just pass the correct information on the 'boot:' prompt. The 'boot' screen gives you an example. You can use the 'F1', 'F2' keys to see the options.

Code:

~ boot: root=/dev/hda1 noinitrd ro    #select correct device for '/'
If the above allows you to boot then you will need to correct the problem. That could be that your filesystem is not compile in your kernel. You can use a initrd. Read on!

If you don't have a working system or other problems you can still use the cd1 to boot the system to correct the problem.

The easiest way would be to use the install cd1 to boot the system as if you were going to install. Make sure that you don't need a initrd. If the filesystem is not compiled into your kernel then you will need one. Read the '/boot/README.initrd' after you have 'chroot' to see how to create initrd.

After you get to the login then from the cli (command line);

Code:

~#mkdir /slacktemp                  #temporary mount point
~#mount /dev/your_device /slacktemp  #this is the device you installed to
~#chroot /slacktemp                  #change to yours
~#cd /slacktemp/etc                  #change to directory with lilo.conf
                                    #if you need to edit lilo.conf
                                    #else to create initrd then

>>> ~#cd /boot                      #read '/boot/README.initrd' <<<
>>>  this where you should create your initrd if you need one,  <<<
>>>  to allow the inclusion in the proper stanza of lilo.conf    <<<
 
~#vi lilo.conf                      #edit lilo.conf, if need be
~#lilo -v -t -b /dev/your_device    #sda, hda this will only test
~#lilo -v -b /dev/your_device        #this will write MBR to your_device

You should now be able to re-boot your system.

In the future, please provide information about your kernel, system or any other relative information for your problem.

ssin14 09-08-2007 05:30 AM

Thanks for the replies

I think after trial and error basis on hdb2 it says error occured furing root file system checkand prompted me to enter into single user mode to fix the prob...

when I entered it asked for my root password. So I am thinking bare.i root=/dev/hdb2 is my drive.

If it is what do I have to fix.

Kernel 2.4.31


cheers

Alien Bob 09-08-2007 05:48 AM

If your box tells you an error occurred during root file system check, and drops you into single user mode, that is where you have to fix your root partition (the example below assumes that your damaged fs is on /dev/hdb2):
Code:

fsck -y /dev/hdb2
This will try to fix the partition on /dev/hdb2 automatically assuming "YES" to all the questions that the fsck program might ask (like, "OK to fix this error?")

Eric

ssin14 09-09-2007 12:41 AM

Man that worked.....so thankful... holi shit man... all my data back now..


Will never forget. for kind assistance


cheers


All times are GMT -5. The time now is 03:50 AM.