Jump to content
jethro

Kernel panic cause by hard drive - major problem

Recommended Posts

Hi everybody,

 

I just tried to use MCC to create an ext3 drive on some unpartionted space I had and to let this mount at /home/[user]/extra. Apparantly this went wrong, because while rebooting I got this:

Mounting /proc filesystem
Mounting sysfs
Creating device files
Mounting tmpfs on /dev
Creating root device
Mounting root filesystem /dev/root
VFS: Can't find ext3 filesystem on dev sda5.
mount: error 22 mounting ext3 flags defaults
well, retrying without the option flags
VFS: Can't find ext3 filesystem on dev sda5.
mount: error 22 mounting ext3 flags default
well, retrying read-only without any flag
VFS: Can't find ext3 filesystem on dev sda5.
mount: error 22 mounting ext3 flags default
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
umount /initrd/sys failed: 2
umount /initrd/proc failed: 2
Initrd finished
Freeing unused kernel memory: 244k freed
Kernel panic - not syncing: No init found. Try passing init= option to kernel.

 

Can someone help me to fix this (my bachelor thesis is on the drive)?

 

Jethro

Share this post


Link to post
Share on other sites

If you have a live-CD, boot with it, mount the system and remove the sda5 entry for now from fstab. If you don't have a live-CD, boot up the first Mandriva CD, go into rescue mode, chroot into the system and edit fstab.

Share this post


Link to post
Share on other sites

PS. Under Windows I see the created drive using Partition Magic. Is it an idea to delete it there or would that just mess it up even more?

 

Perhaps I can do some things with a LiveCD? I am not that familiar with Linux and partitioning so I am in the dark here...

Share this post


Link to post
Share on other sites

Don't use Partition Magic! It will probably make it all more complicated.

 

Boot your Live-CD, then log in as root (e.g. in a terminal), then mount the Mandriva root partition with e.g.

 

mount -t ext3 /dev/hda1 /mnt

 

Once this is done open the /mnt/etc/fstab file, which is where the Mandy fstab will be located now. Remove the entry for sda5, save and reboot.

 

For editing, you can use anything you like, vi, nano, gedit, kate, ...

 

Good luck :)

Share this post


Link to post
Share on other sites

Alright, thank you for your fast reply, I really appreciate it.

 

I booted with Knoppix and looked in "/mnt/sda6/etc", this is what my fstab file looks like:

# This file is edited by fstab-sync - see 'man fstab-sync' for details
/dev/sda6 / ext3 defaults 1 1
# /dev/sda1 /dev/sda4 ntfs defaults 0 0
/dev/sda8 /home ext3 defaults 1 2
/dev/hdc /mnt/cdrom auto pamconsole,exec,noauto,utf8,iocharset=utf8,managed 0 0
none /proc proc defaults 0 0
/dev/sda1 /windows ntfs umask=0,defaults 0 0
/dev/sda7 swap swap defaults 0 0

 

There is no sda5 thingie in there....

Edited by jethro

Share this post


Link to post
Share on other sites

Is this really your Mandriva fstab entry??? Or is this the knoppix fstab? If it is Mandrivas errm... looks a bit chaotic. :D

 

Before you do anything with fstab, you should perhaps copy your thesis now. You can check your home folder, copy the stuff (or tar.gz it), mail it to yourself or copy it to an usb stick or floppy.

 

Everything else after you have verified that this is Mandrivas or Knoppix' fstab.

 

PS: Once you have copied your work, you can type

 

fdisk -l

 

and paste the output here. It will list all partitions in a less chaotic way. Then we can compare it with fstab.

Share this post


Link to post
Share on other sites

I am sure that it is the correct tab, in the past I had to add something to it (for auto-mounting a remote hard drive for my work). Here is the output of "fdisk -l":

root@0[jethro]# fdisk -l

Disk /dev/sda: 60.0 GB, 60011642880 bytes
15 heads, 63 sectors/track, 124032 cylinders
Units = cylinders of 945 * 512 = 483840 bytes

  Device Boot	  Start		 End	  Blocks   Id  System
/dev/sda1   *		   1	   44384	20971408+   7  HPFS/NTFS
/dev/sda2		   44385	  124032	37633680	f  W95 Ext'd (LBA)
/dev/sda5		   44385	   61850	 8252653+  83  Linux
/dev/sda6		   61851	   74853	 6143886   83  Linux
/dev/sda7		   74854	   77236	 1125936   82  Linux swap / Solaris
/dev/sda8		   77237	  124032	22111078+  83  Linux

I think sda5 should be the drive I tried to add, it should be ~8Gb.

sda6 is my "/" drive

sda7 is my swap drive

sda8 is my "/home" drive

 

I think this give a clear picture of it all, I just do not know what exactly the problem is. In the ideal situation half of the sda5 is added to my sda6 and the other half is added to my sda8.

Share this post


Link to post
Share on other sites

I must think a bit on this one. Mandriva complains about sda5 being problematic and bombs out. But sda5 is not listed in fstab at all although it exists and was mounted... /me scratches his head.

 

The worst thing that I could think of is that by creating the sd5 partition your whole partition numbering got screwed up if mtab and fstab were not fixed properly by partitiondrake... :unsure:

Share this post


Link to post
Share on other sites

I think that could be the case. When I created the partition using MCC I got a message saying that the partition numbers where changed. It showd which number became which one.

Share this post


Link to post
Share on other sites

In that case, it could be that the numbers for sda5 and sda6 got swapped. Then you might try changing the sda6 entry to sda5 in fstab. Maybe that works.

Share this post


Link to post
Share on other sites

I can not do that, because "/etc/fstab" is on "/mnt/sda6/" and it is mounted read-only by Knoppix.

Share this post


Link to post
Share on other sites

Launch in the terminal

 

mount -o remount,rw /mnt/<partitionname>

 

this will give you write access. ;)

Share this post


Link to post
Share on other sites

Just an idea in the meantime....

 

If you have a USB stick just boot into knoppix and open the drive.... the part numbers might be messed about so keep trying and then copy the thesis onto the USB stick.... BEFORE you play with anything else.

 

Please don't mess about with your thesis... the more you do the harder it gets... you will get a load of really helpful people here and you can use the #mub channel on IRC as well. Don't panick... (easy for me to say I know)

 

What timezone are you in?

As this is really so important and you trust us here you could get online with knoppix and give us the IP as a last resort.

 

p.s. edit you above post and take out the samba mount line .. just to prevent anyone else dong something...

 

if you do chose to do this don't just post your IP ....

 

arctic and I are GMT +1

Share this post


Link to post
Share on other sites

Thank you for your reply! I live in the Netherlands, so that is also GMT+1.

 

Giving you guys my IP is fine as a last resort, but before that perhaps we can try some other things. Arctic said I could try to change the sda6 line in my fstab to sda5. I tried this but it gave the same result. If some of you are able to help I would be really greatful. Not panicking is quite hard, but I think I can manage.

 

At this point I am going to try to backup my home directory using an USB hard drive and Knoppix.

 

What are the steps I can take after that to try to fix this problem?

 

Jethro

 

PS. deleting the created drive which caused the error using qtparted would nog solve the problem?

Share this post


Link to post
Share on other sites

When you install Mandriva, /dev/sda5 normally is allocated to /. I guess they've got switched, which is why you have the problem.

 

This is how I normally do it. Boot the Mandriva CD1/DVD and type linux rescue at the prompt. This will boot rescue mode. I think a menu might appear with various options, one of which is to mount your partitions. If not, I would do this. Exit to the command prompt choosing the option from the menu and then:

 

mkdir /mnt/root
mount /dev/sda6 /mnt/root
chroot /mnt/root /bin/bash
source /etc/profile

 

this will mean you can just look at /etc/fstab after you've chrooted. Take a look in there, and see if you have a /dev/sda5 that points to /. If it does, you need to change this to /dev/sda6.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...