kernel panic when changing boot location from hdb to hdd
Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
You are getting the kernel panic because it cannot find the root partition. There are several changes that will need to be made. I'll list everything to check out that I can think of.
1) The kernel image needs to know what the root device is. The command rdev will let you look at that.
Usage is like rdev <kernel image> it should spit up what it thinks the root partition is. You can change that by issuing a command like rdev <kernel image> <new root device> for example rdev vmlinuz /dev/hdd1
2) Look at the entries in your /etc/fstab. Make sure all those seem accurate. This is the table which lists the filesystems to mount and where. You would be looking for entires that say something like /dev/hdb?, you would need to change them to /dev/hdd? the ? is the partition and it should stay the same. /dev/hdb1 would be /dev/hdd1 etc...
3) You would also need to change your boot loader also. If you use lilo, the config is in /etc/lilo.conf, if you use grub its probably under /boot/grub/<cant remember name> sorry. Also, if you use lilo and had to make a change using rdev, or to the lilo.conf file, dont forget to reissue the lilo command to update the boot loader.
Down to you next question, I dont think there is a way for linux to just "autodetect" and work. There is more to the booting process than that.
No, you probably wont get a commandline prompt after the panic. However, those steps can be performed using a rescue cd. if you use lilo, you might even be able to add a couple of options at boot time. However, im not sure these still work. You could type in the parameters after keying in the boot name.
If your lilo label for your system is linux, type typing linux single root=/dev/hdd, that might get you to a prompt, you could get a bunch of errors, but it might get you to a command line.
The root line tells you what the root partition is, in this case, it is the 1st partition on the 2nd IDE device.
hd0=primary/master, hd1=primary/slave, hd2=secondary/master, hd3=secondary/slave the partitions are numbered starting at 0.
You will need to change the appropriate line in your configuration. If it hasn't already been done for you. Also look at the "kernel" line where it says root=/dev/hd??. Make sure it is changed to the right drive.
Once done, then you would need to reload the boot-loader, for em that would be
If this doesn't help, get the exact panic message and post it. I am assuming is says something like "Panic.. cannot mount root"
Ok... this is making more sense now. You are not having problems booting, but rather kde is freezing during startup. If this is the case, I suspect that your X configuration has somehow gotten messed up.
The changes you are making at the boot loader don't really affect your X desktop configuration.
We need to find out whether your machine is really freezing or whether X is just hanging during the load. So, boot your system, at the point when kde freezes, or appears to, press the ctrl+alt+f1. There are virtual terminals configured on virtually every linux distro. There are generally 6 of them. If you booted into a text mode, as opposed to X, you could switch terminals by using alt-f1, alt-f2, etc... X typically uses the first available terminal, which is usually 7. But since you are in the X environment, you need to use the ctrl also to switch to a "console" session. If kde is just hanging, then it should bring you to a login prompt (text mode). From there you can re-configure X, or fix your kde environment. Another test might be to use ctrl-alt-backspace. That typically us used to kill X. It would restart X, not the computer, but it would tell you whether or not the computer is completely frozen or kde is just hanging.
If however, your computer is locking up because of this, then we would need to change the configuration and not boot straight into kdm (the kde display manager). This change can be done using a text editor. There are other text editors besides vi. You can try typing joe, or jed, or nano. The file we would need to change is called /etc/inittab. There is a line in there labels initdefault. In previous RH releases runlevel 5 meant full multiuser mode with X, 3 meant full multiuser mode in text mode (non-X).
In order to get there, if you machine is freezing, you would need to append the "single" to you boot loader line. This should boot you into single user mode i.e no X so you can make this change. If that doesnt work, then you can use a rescue cd to make that change.