I deleted partitions on one hdd and now get "kernel panic..." on other. Any ideas?
I have 2 hard drives in my system, both 20GB. One has Mandrake 9.0 on it, one has Slackware 9.
I never use Drake anymore and recently I was attempting to delete off some of the unused partitions, (leaving only the 12GB / partition because it stores all of my mp3s, and I've got nowhere else to put them) and install Win2K3 Server in its place.
Now comes the tricky part...I deleted the partitions as stated, started installing Windows, discovered that whoopsie, Windows had replaced Lilo with its own PoS bootloader (which I'd known but completely forgot about), and I was now unable to boot into linux.
I booted up with my trusty tomsrtbt disk, chroot'ed onto my slackware system and discovered that Lilo had been running off of the mandrake partition all this time. I can still boot to Mandrake, so I re-ran /sbin/lilo, it added everything fine, and I then rebooted and tried to boot to Slackware and now all I get is the "kernel panic! no init found, blah blah blah..." (it doesn't even start booting - that's the first message I get). As I didn't change anything on the entire hard drive Slack resides on or the / partition of Mandrake, I can't figure out what it's missing...
/etc/fstab from Mandrake: (/dev/hda)
/dev/hda1 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hdb1 /mnt/Slackware ext2 defaults 0 0
none /mnt/cdrom supermount dev=/dev/hdc,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
none /mnt/cdrom2 supermount dev=/dev/scd0,fs=auto,ro,--,iocharset=iso8859-1,codepage=850,umask=0 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=auto,--,iocharset=iso8859-1,sync,codepage=850,umask=0 0 0
none /proc proc defaults 0 0
/etc/fstab from Slackware (/dev/hdb)
/dev/hdb1 / ext2 defaults 1 1
/dev/hdb5 /home ext3 defaults 1 2
/dev/hda1 /mnt/mandrake ext3 defaults 0 0
/dev/hda6 /mnt/server ext3 defaults 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,0777 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
/etc/lilo.conf (on Mandrake)
append="quiet devfs=mount hdd=ide-scsi"
append="failsafe devfs=nomount hdd=ide-scsi"
append="quiet devfs=mount hdd=ide-scsi"
If anyone can find the inconsistency I'd truly appreciate it! I don't care at all about being able to boot to Mandrake or windows after this, if all I can get to is Slack I'll be perfectly happy.
Try chrooting to your Slack partition (not Drake), edit your lilo.conf and fstab files in Slack and reinstall lilo to the first hard drive (boot = /dev/hda)..... :)
If that works, or once you get it to work, be sure to save the mbr for booting Slack to the Slack drive and then copy it to a dos-formatted floppy, since the Windows install will replace it with a Windows mbr. Run this command from linux:
dd if=/dev/hda of=/slack.mbr count=1 bs=512
This will create a 512 byte file to Slack's root directory ( / and not /root) called slack.mbr, which can later be used by the Windows bootloader to boot Slack. Now you'll need to copy it to a dos-formatted floppy.
After installing Windows, copy the slack.mbr file from the floppy to C:\slack.mbr in Windows. Then you can add this line to the bottom of BOOT.INI (in the C:\ directory):
You can use upper- or lower-case in Windows for filenames, it doesn't matter. Windows doesn't make any distinction between slack.mbr, SLACK.MBR or even slack.MBR.
This is actually the most efficient way to do it with a Windows NT bootloader, for best compatability. And if you only have one Slack kernel to boot, just comment out the 'prompt' and 'timeout=' lines in the lilo.conf file (and 'delay=' line, too, if present) so Slack will be booted immediately :)
I'll try it, thanks so much!
OK, I've got to the point where I can boot Mandrake again, but Slack's still giving me problems.
When I try to boot into it, I get:
ext3: no journal on filesystem on ide0(3, 65)
mount: error 22 mounting ext3 flags
kernel panic...blah blah blah
I can't see where I'm telling it anything's ext3, however... my root Slack partition is still ext2, and /etc/fstab says as much... Where else is it looking?
well, the only oddity i notice is that both mandrake and slackware seem to be using the same kernel, lilo.conf always states image=/boot/vmlinuz
try booting slackware with the slack cd using the cd's bare.i kernel
once in slack (or you could do this in mandrake) post fdisk -l, your partition numbering may be a problem... i don't understand how lilo finds /boot in your lilo....
In fact, just remove everything that isn't essential to booting Slack in lilo.conf (after chrooting to Slack), using only the Slack image to boot. Then you can add your other images (failsafe, linux-nonfb, etc.) after getting Slack to boot.................In other words, just keep lilo.conf very simple at first. Then go from there.....:)
I don't see an image= entry under the Slackware section of lilo.conf. Examine your slackware system and see were the kernel and init.rd are actually located. Also check that the /dev/hda<n> links point to the proper device target in the /dev/ide ... tree. Repartitioning drives can change what hda<n> should refer to. But in your situaton, since you are just repartitioning the first ide drive, and slackware is in the second, then you should be ok.
When you run lilo (assuming you change-rooted to slackware like last-time, you will want to first copy the working <hda-root>/etc/lilo.conf to <hdb-root>/etc/lilo.conf.
For example after booting into Mandrake, backup the /mnt/Slackware/etc/lilo.conf file, then
cp /etc/lilo.conf /mnt/Slackware/etc/.
If you will be wiping out the hda drive when you are finished, you may want to change the boot partition to hdb, or hdb1 before reruning lilo, and copying the boot image to the windows drive.
Here's his image section for Slack:
My bad. My eye skipped over it. You do want to make sure that these files or links actually exist. Also, when you chroot'ed to /mnt/slackware, you changed where the /etc directory was located. Running lilo then, wrote the slackware's lilo.conf file, which you never posted.
To make it easier on eveyone, here's his whole lilo.conf from the first post, with each section separated:
From earlier message:
>ext3: no journal on filesystem on ide0(3, 65)
This error is from hda and not hdb.
Doing a ls -l on /dev/hda and /dev/hda1 and the device files they point to, should reveal which partition is using major mode 3, minor mode 65.
What I don't understand, is if he wiped out all of the partitions on hda except for one partition for the mp3's, where are the mandrake and windows partitions? What is his actual partition scheme? hda1, hda2, etc are links to actual device files and after repartitioning, may not be in sequential order.
Ok, I got it working...not exactly the orthodox solution perhaps, but...
The reason mandrake and slack were using the same boot image is because they were the same...I think I installed drake, installed slack, reinstalled drake, and all of those re-configured lilo...it was one big mess.
For everyone's sake, the harddrive scheme was this:
Previous to the windozing of my poor computer:
/dev/hda1: 12 gigs, Mandrake /
/dev/hda5: 5 gigs, Mandrake /home
/dev/hda6: 2 gigs, Mandrake /var/www (personal webserver, etc)
/dev/hda7: whatever's left, Mandrake swap
/dev/hdb1: 12 gigs, Slackware /
/dev/hdb5: 5 gigs, Slackware /home
/dev/hdb6: 2 gigs, Slackware whatever space
/dev/hdb7: whatever's left, Slackware swap
/dev/hda1: 12 gigs, Mandrake / but really only a bootable mp3 partition
/dev/hda2: whatever's left, Windows 2003 Enterprise Server
/dev/hdb: same as before
The problem was never solved while I was playing around with trying to get Slack to boot- it never would. Finally I made an error, ran mke2fs, f*cked /dev/hdb1, swore for awhile, reinstalled Slackware and rebuilt lilo. It was still quite a fight to get everything playing nicely with one another, but at least my system works.
Thegeekster, thanks so much - I'm copying my mbr to a floppy as we speak for safety's sake!
A word of caution on that mbr file.......it is only good for allowing Windows to boot Linux. If you try to copy it back at a later date to the hard drive, you can erase your partitions (although the data will remain untouched)..............It would be better to rerun lilo again to reinstall lilo to the mbr. If you want to save your lilo mbr to a file and be able to copy it back, you will need to change the 'bs=512' parameter to 'bs=496' (I think), as that is the actual size of the mbr. 512 bytes works for Windows, but that's it :)
That's good to know, I'll definitely check into the MBR sizes.
And yeah, I know how that goes...I wiped 20 gigs this summer accidentally during what is now termed "The Great Formatting Disaster." Lesson learned: "look closely, /dev/hda != /dev/hdb" ;)
Go ahead and use the 512 byte mbr for the Windows' bootloader......I don't know if it will work with the smaller size since I've never tried it when I was multi-booting Windows 2K/98SE and Slack......and now I got rid of Windows altogether :p
And I learned the hard way about trying to copy that mbr to the drive.......I lost all my partitions on hda (had Windows and Slack on it).........however, I did figure out how to get them back (my Linux parititons anyways) and that was to redefine the partitions with cfdisk. Just don't reformat 'em with the mkfs command. I remembered the sizes of my partitions so I recreated them with cfdisk and rebooted and they appeared like magic :).........but that was after getting rid of my windows parition and installing Slack again in the empty space on the disk. I was smart enough to leave the rest of the disk alone and try to figure out a way to recover the data. But none of the partition tools I have would work (Partition Magic and Acronis Partition Expert) since I use reiserfs for my Slack partitions (except the /boot which is ext2). But simply recreating the partitions with cfdisk worked out great. So now I make sure I have a copy of my partition info from cfdisk, namely the partition number and size (in MB), just in case ;) I didn't know where this would lead me when I tried this, it was more luck than anything else. Just remember to not make any filesystems and reboot after recreating the partitions. :)
As for losing Windows, I saved that partition with Norton Ghost beforehand (I had both Win 98SE and 2K on the same partition, a neat little trick I figured out), but I had already made up mind about getting rid of Windows when this little mishap happened. All it did was push up the timetable.......LOL
|All times are GMT -5. The time now is 10:40 AM.|