• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

yet another linux install ? Fixed and running

Bleep

Diamond Member
I installed mandrake 9.1 on a hard drive using the hd as master as a stand alone HD. When I switch the HD over to be a slave to my other hard drive I get a kernel panic and it wont boot. I booted from the install CD and it wants to put mandrake on my C drive, any way to repair the install? I also tried to boot mandrake into failsafe but still will not boot. Any advice will be appriciated.

Bleep
 
It sounds like your bootloader is having a problem finding the installation. What bootloader are you using? If you are using lilo it should be as simple as, well still complicated.
a) boot up with a boot disk
b) mount linux partitions
c) edit your lilo.conf file to reflect the new locations of your boot partition
d) re-run lilo
e) reboot


Linux uses a different way then windows to recognize hardrives. When you had the drive as master the boot partition was most likely /dev/hda1 . After switching it to slave it would then be /dev/hdb1 . That is assuming this is on your primary IDE channel. If it is your secondary channel then then hda would be hdc and hdb would be hdd.
 
Is there some reason you didn't leave the hard drive as a slave during the install? It's generally best to let Linux installers do their thing with boot loaders and not mess with the process manually - they're smart installers, trust them.

Anyway, MCrusty's process is right on.
 
Doesn't Mandrake use GRUB?

In the case your conf file will be in /boot/grub/grub.conf (or possibly menu.lst, that's old style).

If you can get the GRUB boot menu, there's an easier way to boot than messing with a CD.
Press 'e' when you have the proper entry marked, you'll be able to change the boot parameters, including root partition from there.
You'll likely have to change three lines, root, kernel, and initrd, to reflect your new drive position.
 
I can get to the boot prompt and I will try the "e" thing and then just change the a to b in the root- kernel etc.
Thanks guys. The reason that I installed it with it being the master is I dont understand it very well and did not want to fudge up my other OS.
edit: Well I could not get anywhere by hitting the e key at the boot prompt . If I make a bootdisk and then at the prompt boot from the bootdisk can I edit the partitions from there? I might not be using the right terms with my question, I have a motherboard that allows me to boot from any drive by hitting f9 right after post and selecting the drive to boot from, so I dont need a bootloader on my primary drive.

Bleep
 
If you can boot with a floppy/cd, you should be able to mount the partition with the bootloader conf.

The command, depending on your partition setup should be something like:
mount /dev/hdb1 /mnt/root
Then go to /mnt/root/boot/grub (assuming MDK does use GRUB)
There you should have the config file, either "grub.conf" or "menu.lst"

Edit this file to point to the right drive/partitions, in GRUB talk, hd0,0 would be the first partition on the first drive, hd1,0 the first partition on the second drive, etc.
 
The kernel is panicing probably because it isn't finding the correct root. When you switch the drive relationships around it also changes the /dev/hda1 and /dev/hdb3 type stuff.

/dev/hda = primary master
/dev/hdb = primary slave
/dev/hdc = secondary master
/dev/hdd = secondary slave

then partitions for each drive is just a number added on the back of the harddrive name
/dev/hdb1 = first partition on the primary slave IDE device.

You just need to edit the /etc/lilo.conf file or your grub config (you can boot manually from any partition or kernel by using the grub command line at boot up time instead of using the pre-sets you put in it's configuration file) to reflect the change.

Then all you have to do next is manually edit the "/etc/fstab" file.

That is how the OS knows which partition is for what and to know which device is root/swap/cdrom/windows part./zip drive.

Then that will fix it and your OS should then operate 100% back up to snuff.

You may have to update your symbolic links (like shortcuts) to stuff like the /dev/cdrom file which points to your /dev/hd* device that represents the correct cdrom drive.

All in all it pretty simple once you know what to do. The only real problem is getting to the root partition to edit the configuration files and re-run your boot loader...

Most install CDs have a command line or rescue mode that you can access. The CD themselves are usually mini linux distros. Try ctl-alt-F2 to switch to a command line.

IF you can't figure out the install CD, you can create a mini linux distro on a floppy or CDROM like Gentoo/SuSE's live eval CDs or Knoppix CD. Also a usefull thing is Toms rescue disk

So you boot it up.
Figure out which /dev/hd* is the root partition.
Then make a mount directory and mount it.

mkdir /mnt/rootd
mount /dev/hdb1 /mnt/rootd

Then mount the proc (not always nessicary)

mount -t proc proc /mnt/rootd/proc

CD to the drive and use the chroot command.

cd /mnt/rootd/
chmod /mnt/rootd/

That will get you into your Mandrake Distro. You will still be running the kernel from the rescue disk, but effectively you will be running your "real" install now. You can run commands set up servers and even run X from that chroot enviroment now, but all we want to do is fix the /etc/lilo.conf or grub config, the /etc/fstab file, and rerun the boot loader install command.

Pretty simple stuff after you do it a couple times (or like me pretty often because I screw up a lot of stuff a lot of the time)
 
Remember that GRUB-talk is different from the "hdXX" names used in Linux.
hda1 would be hd0,0 to GRUB, hdb3 would be hd1,2 and so on.
 
A lot of info here!
I will work at it and the stuff that you have told me is really good info, I had no idea that switching the drive to another ide port or from slave to master or master to slave would be such a pain. I had been using RH and it would not work either and so switched to Mandrake thinking that it was a quirk with RH. My little grey cells do not work very good any more, it is a tough learn for me. I appriciate the time and effort that you guys have taken to help me out with my problem.
edit: Well I got it going. what I did was I disconnected the primary hard drive, booted from the install CD and repaired the files. Thanks guys for all the advice and help. I will be back with some more questions if I cannot figure it out myself.

Bleep
 
Back
Top