LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-09-2006, 05:05 AM   #1
Rohan_mk1
LQ Newbie
 
Registered: Aug 2004
Posts: 27

Rep: Reputation: 15
Question Partition added in Windows caused kernel panic


Got a little problem here - everything worked just fine until I have decided to create another partition in that free space before Linux partitions.

hda
[hda1 ntfs] {hda2 extended [hda5 vfat] [hda6 ext3 (/home)] [hda7 ext3] [850MB free] [hda8 swap] [hda9 reiserFS (/)] }

hdb
[hdb1 ntfs (windows)][hdb2 ntfs]


Unfortunately, I don't remember the proper names.

I have added a FAT32 partition in place of the free space, the next day I booted Linux and it seems it can't find Reiserfs on /dev/hda8, what causes kernel panic.
I have immediately deleted the newly added partition, but the problem persists and my Mandriva 2006 won't boot.

How to solve this? How to tell the system which partition it should boot from?

Thanks in advance

EDIT: Added the partition names

Last edited by Rohan_mk1; 08-17-2006 at 03:49 AM.
 
Old 08-09-2006, 05:57 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Boot Mandriva into rescue mode (CD in need), or use something like Knoppix
Code:
fdisk -l
cat /etc/fstab
For the fdisk, that's a lower case ell, and for the fstab you may need extra pathing - say /media/etc/fstab (or somesuch); we need to see your (hard disk) original version.
 
Old 08-17-2006, 03:53 AM   #3
Rohan_mk1
LQ Newbie
 
Registered: Aug 2004
Posts: 27

Original Poster
Rep: Reputation: 15
I have edited my previous post so now it's correct. It seems that the partition names are shifted by one to what was before: the system tries to read /dev/hda7 as swap, /dev/hda8 as the system etc, should be /dev/hda8 and /dev/hda9 accordingly.

Where is the system information stored so I can edit it right now? I don't mind playing with system settings myself.
 
Old 08-17-2006, 04:30 AM   #4
ilpadrino
Member
 
Registered: Oct 2003
Location: Spain
Distribution: Fedora
Posts: 104

Rep: Reputation: 15
Post the content of your grub.conf file.
 
Old 08-22-2006, 06:20 AM   #5
Rohan_mk1
LQ Newbie
 
Registered: Aug 2004
Posts: 27

Original Poster
Rep: Reputation: 15
Here's my lilo.conf file, modified to the proper version:
Code:
# File generated by DrakX/drakboot
# WARNING: do not forget to run lilo after modifying this file

default="linux"
boot=/dev/hda
map=/boot/map
keytable=/boot/pl.klt
menu-scheme=wb:bw:wb:bw
prompt
nowarn
timeout=100
message=/boot/message
image=/boot/vmlinuz
	label="linux"
	root=/dev/hda9
	initrd=/boot/initrd.img
	append="resume=/dev/hda8 splash=silent"
	vga=788
image=/boot/vmlinuz
	label="linux-nonfb"
	root=/dev/hda9
	initrd=/boot/initrd.img
	append="resume=/dev/hda8 splash=silent"
image=/boot/vmlinuz
	label="failsafe"
	root=/dev/hda9
	initrd=/boot/initrd.img
	append="failsafe resume=/dev/hda8"
other=/dev/hdb1
	label="windows1"
	table=/dev/hdb
	map-drive=0x80
	   to=0x81
	map-drive=0x81
	   to=0x80
image=/boot/vmlinuz-smp
	label="linux-smp"
	root=/dev/hda9
	initrd=/boot/initrd-smp.img
	append="resume=/dev/hda8 splash=silent"
	vga=788
image=/boot/vmlinuz-2.6.12-22mdksmp
	label="2612-22smp"
	root=/dev/hda9
	initrd=/boot/initrd-2.6.12-22mdksmp.img
	append="resume=/dev/hda8 splash=silent"
	vga=788
image=/boot/vmlinuz-2.6.12-23mdk
	label="2612-23"
	root=/dev/hda9
	initrd=/boot/initrd-2.6.12-23mdk.img
	append="resume=/dev/hda8 splash=silent"
	vga=788
I suppose LILO needs to compile this file, but I don't know how to make it right since I can't boot...
 
Old 08-22-2006, 08:15 AM   #6
sonicbhoc
Member
 
Registered: Aug 2006
Distribution: Gentoo
Posts: 61

Rep: Reputation: 15
chroot into your installation and type "lilo".

you type in:

Code:
mount -o bind /dev /media/hda9/dev
mount -t proc none /media/hda9/proc
chroot /media/hda9 /bin/bash
env-update && source /etc/profile
lilo
exit
That should do it for you.
 
Old 08-22-2006, 09:06 AM   #7
Rohan_mk1
LQ Newbie
 
Registered: Aug 2004
Posts: 27

Original Poster
Rep: Reputation: 15
what does every line do? I need to be sure nothing's going to be screwed up. And the paths are slightly different in my distro, I suppose.
Will it work if I boot from a liveCD?
And how to chroot into the installation :|?
 
Old 08-22-2006, 09:31 AM   #8
sonicbhoc
Member
 
Registered: Aug 2006
Distribution: Gentoo
Posts: 61

Rep: Reputation: 15
These are the commands you would do from a livecd terminal.

The part that says /media/hda9 should go to wherever your root partition is.

and the stuff I typed was how to chroot.

mount -o bind /dev /media/hda9/dev mounts the /dev/ section of the liveCD to your hard drive, so that you can access your devices.

mount -t proc none /media/hda9/proc mounts /proc/ which is used for kernel processing.

chroot /media/hda9 /bin/bash chroots you into your installation, and runs the Bourne Again SHell.

env-update and source /etc/profile reconfigures things to the settings in your chroot.

IF YOU ARE NOT RUNNING OFF OF A LIVECD, JUST TYPE LILO INTO A COMMAND PROMPT. This stuff is for chrooting. If you are already in your installation, you don't have to chroot.

Last edited by sonicbhoc; 08-22-2006 at 09:32 AM.
 
Old 08-22-2006, 10:58 AM   #9
Rohan_mk1
LQ Newbie
 
Registered: Aug 2004
Posts: 27

Original Poster
Rep: Reputation: 15
Thanks, I get everything.

Just curious:
The only things overwritten are /media/hda9/dev and /media/hda9/proc, right?
Or they are "hidden" after the mount over them?
 
Old 08-23-2006, 09:41 AM   #10
sonicbhoc
Member
 
Registered: Aug 2006
Distribution: Gentoo
Posts: 61

Rep: Reputation: 15
nothing gets overwritten. I can't remember, but I think it is because neither of those directories have anything in them because proc gets written when the kernel boots and dev is populated by udev. But, it's been a long time before I checked, and my memory is pathetic, so I'm probably wrong.
 
Old 08-28-2006, 01:42 PM   #11
Rohan_mk1
LQ Newbie
 
Registered: Aug 2004
Posts: 27

Original Poster
Rep: Reputation: 15
After succesful running of previous commands, this happened:

[root@pawelc /]# env-update && source /etc/profile
bash: env-update: command not found

I've run lilo anyways and I'm going to check if this worked.

EDIT:
It didn't work and now I'm not sure what to do. It says that the Reiserfs superblock is corrupted on /dev/hda8 after checking root filesystem and puts me into maintenance mode (in which I can see properly mounted root partition, but other partitions are not mounted at all)

Last edited by Rohan_mk1; 08-28-2006 at 02:05 PM.
 
Old 09-04-2006, 10:36 AM   #12
Rohan_mk1
LQ Newbie
 
Registered: Aug 2004
Posts: 27

Original Poster
Rep: Reputation: 15
The problem is resolved - I used the old config file, but deleted the unnecessary partition between /home and swap. It was added after few months of Linux usage, so it was previously called hda9.
WARNING!
It seems that Windows rearranges the partition names - after that, their names suit their location on the drive (hda1 hda3 hda2 would be rearranged to hda1 hda2 hda3).
I'd recommend using a LiveCD or anything other based on Linux for playing with partitions to prevent damage.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
whenever kernel panic comes it destroys the whole partition including that of windows cybercop12us Linux - Software 2 08-29-2006 11:41 AM
'Kernel Panic' possibly caused by combination of PCI and PCMCIA bridges ukch Linux - Hardware 15 07-17-2006 08:19 AM
Kernel Update Caused Panic, Howto Downgrade hategiants Linux - Software 6 04-22-2006 07:10 PM
"make clean" caused system freeze, kernel panic on reboot jwhill2000 Linux - General 3 02-08-2005 07:59 PM
Added RAM now kernel panic? Risc91 Linux - Laptop and Netbook 6 09-09-2003 08:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration