LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-30-2003, 09:57 PM   #1
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Rep: Reputation: 30
Unhappy I deleted partitions on one hdd and now get "kernel panic..." on other. Any ideas?


Hi all,
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)
boot=/dev/hda
map=/boot/map
vga=normal
default=Slackware
keytable=/boot/us.klt
prompt
nowarn
timeout=100
message=/boot/message
menu-scheme=wb:bw:wb:bw
image=/boot/vmlinuz
label=Mandrake
root=/dev/hda1
initrd=/boot/initrd.img
append="quiet devfs=mount hdd=ide-scsi"
vga=788
read-only
image=/boot/vmlinuz
label=linux-nonfb
root=/dev/hda1
initrd=/boot/initrd.img
append="devfs=mount hdd=ide-scsi"
read-only
image=/boot/vmlinuz
label=failsafe
root=/dev/hda1
initrd=/boot/initrd.img
append="failsafe devfs=nomount hdd=ide-scsi"
read-only
image=/boot/vmlinuz
label=Slackware
root=/dev/hdb1
initrd=/boot/initrd.img
append="quiet devfs=mount hdd=ide-scsi"
vga=788
read-only
other=/dev/hda2
label=windows
table=/dev/hda

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.
Thank you,
Laura
 
Old 12-31-2003, 12:02 AM   #2
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 34
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):

C:\SLACK.MBR="Slackware"

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
 
Old 12-31-2003, 03:12 PM   #3
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
I'll try it, thanks so much!
 
Old 12-31-2003, 04:57 PM   #4
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
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?
 
Old 12-31-2003, 05:33 PM   #5
TheOneAndOnlySM
Member
 
Registered: Jul 2003
Location: Dallas, TX
Distribution: Ubuntu 10.04 LTS
Posts: 987

Rep: Reputation: 30
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....
 
Old 12-31-2003, 06:38 PM   #6
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 34
Quote:
Originally posted by rose_bud4201
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?
When editing the lilo.conf and fstab in Slack, remove all reference to MDK since you said you want to get rid of it anyway and just mount the partition containing the mp3s to Slack.

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.....
 
Old 12-31-2003, 06:45 PM   #7
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.

Last edited by jschiwal; 12-31-2003 at 06:55 PM.
 
Old 12-31-2003, 06:56 PM   #8
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 34
Here's his image section for Slack:
Code:
image=/boot/vmlinuz
 label=Slackware
 root=/dev/hdb1
 initrd=/boot/initrd.img
 append="quiet devfs=mount hdd=ide-scsi"
 vga=788
 read-only
Although it would be easier to read by either separating the different sections or adding some sort of divider between the different sections
 
Old 12-31-2003, 07:04 PM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.
 
Old 12-31-2003, 07:07 PM   #10
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 34
To make it easier on eveyone, here's his whole lilo.conf from the first post, with each section separated:
Code:
#---Begin global section------------
 boot=/dev/hda
 map=/boot/map
 vga=normal
 default=Slackware
 keytable=/boot/us.klt
 prompt
 nowarn
 timeout=100
 message=/boot/message
 menu-scheme=wb:bw:wb:bw
#---End global section--------------
#
#---Begin image section-------------
image=/boot/vmlinuz
 label=Mandrake
 root=/dev/hda1
 initrd=/boot/initrd.img
 append="quiet devfs=mount hdd=ide-scsi"
 vga=788
 read-only
#
image=/boot/vmlinuz
 label=linux-nonfb
 root=/dev/hda1
 initrd=/boot/initrd.img
 append="devfs=mount hdd=ide-scsi"
 read-only
#
image=/boot/vmlinuz
 label=failsafe
 root=/dev/hda1
 initrd=/boot/initrd.img
 append="failsafe devfs=nomount hdd=ide-scsi"
 read-only
#
image=/boot/vmlinuz
 label=Slackware
 root=/dev/hdb1
 initrd=/boot/initrd.img
 append="quiet devfs=mount hdd=ide-scsi"
 vga=788
 read-only
#
other=/dev/hda2
 label=windows
 table=/dev/hda
#---End image section---------------

Last edited by thegeekster; 12-31-2003 at 07:09 PM.
 
Old 12-31-2003, 07:29 PM   #11
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
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.

Last edited by jschiwal; 12-31-2003 at 07:34 PM.
 
Old 12-31-2003, 07:40 PM   #12
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
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/hda2:
/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/hdb2:
/dev/hdb5: 5 gigs, Slackware /home
/dev/hdb6: 2 gigs, Slackware whatever space
/dev/hdb7: whatever's left, Slackware swap
------------------------------------------------------------------------------------
Post windozing:
/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!

Laura

Last edited by rose_bud4201; 12-31-2003 at 07:52 PM.
 
Old 12-31-2003, 08:16 PM   #13
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 34
Quote:
Originally posted by rose_bud4201
Ok, I got it working...not exactly the orthodox solution perhaps, but...
LOL.....Great. At least you got it working.........As for those little errors......been there, done that (I've been known to wipe out at least 40GB of stuff and more than once, but don't tell anyone ), so you're not alone...............And one silver lining in this dark cloud is that you were forced to"clean up" the lilo.conf mess, although at the expense of having to reinstall Slack....

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
 
Old 12-31-2003, 10:22 PM   #14
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
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"
 
Old 12-31-2003, 11:49 PM   #15
thegeekster
Member
 
Registered: Dec 2003
Location: USA (Pacific coast)
Distribution: Vector 5.8-SOHO, FreeBSD 6.2
Posts: 513

Rep: Reputation: 34
Quote:
Originally posted by rose_bud4201
...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"
LOL.....

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

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
 
  


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
Explained: "kernel panic - not syncing - attempted to kill init" sundialsvcs Linux - Software 36 04-24-2010 08:58 AM
Kernel Panic - Missing "initrd.img-2.6.8-2-686" in /boot MKSrivastava Debian 2 12-02-2005 03:09 PM
Kernel panic under 2.6.7 "VFS cannot load /dev/hda1 fs" Nichole_knc Slackware 5 10-24-2004 05:38 PM
Kernel Panic:VFS: Cannot open root device "hda3" or 00:10 shivendnrab Linux - General 1 07-01-2004 03:08 AM
error:"kernel panic: VFS: Unable to mount root fs":-( shyguy Linux - Newbie 1 07-23-2001 04:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:54 PM.

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