LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   kernel 2.6 syslogd freeze (https://www.linuxquestions.org/questions/debian-26/kernel-2-6-syslogd-freeze-473972/)

verbose 08-15-2006 03:25 AM

kernel 2.6 syslogd freeze
 
I've had no end of trouble getting kernel 2.6 to work on my old hardware. I've tried compiling from source dozens of times and my drive never mounted successfully. However, I recently installed both kernel 2.6.15 and 2.6.16 via apt-get and my drive seems to mount without error. It's all looking pretty encouraging until... the boot process freezes on syslogd. I've searched Google and LQ and turned up nothing of any consequence.

Thanks

verbose 08-18-2006 07:52 AM

Any ideas, anyone?

nx5000 08-18-2006 08:37 AM

Its not because syslogd is launched that it means that it is syslogd that makes the freeze. It could be something in the background.
Try to boot into single user:
add an S at the end of the boot line if using grub.
for lilo I think you have to add "single"
See if you reach the shell..

verbose 08-18-2006 10:02 AM

I've tried adding 'init=/bin/bash' to the list of boot parameters but I don't know what to do once I've reached the prompt, right after the root partition is mounted ro. I'm using grub btw.

nx5000 08-21-2006 07:30 AM

Yes that is another solution and its a good result if it doesn't hang.
But then it could be a bit tricky to run the real init again, which is the real way linux boots (init the the process 0, father of all other processes)

Have you tried adding an S at the end as I said?

You would run the real init (init=/bin/init) and you would fall in runlevel 1.
There, your partitions would be mounted as read only, same as you have with init=/bin/bash.
If you manage to get there, you can go back to normal init level 2 by launching
the command telinit 2. You will then end up as if you boot normaly.
Background info: When going from runlevel 1 to 2, all the K(ill) scripts from runlevel 1 will be executed and then the S(tart) scripts from runlevel 2 will be executed. <-- one of these seems to freeze. So this should freeze.

Then you boot again in runlevel 1 (S) and from there you remount the / partition as rw:
mount / -o remount,rw
You can then use for example init level 3 (by default the same as init level 2) and remove some S scripts from /etc/rc3.d/ until you find the guilty.
Then remount as read only and go in level 3:
mount / -o remount,ro ; followed by telinit 3.

I would begin by removing udev... depending on if you are in sarge/testing/unstable

In the end, you will find the guilty process and you can debug a bit more.

You can also have a look in the Linux Documentation directory, kernel-parameters.txt where you will get a list of all parameters you can pass to grub.

Hope I was more or less clear :D


Good luck!

kriton12 08-21-2006 10:08 AM

Are you getting an error message upon booting? If so, what is it?

When you built the kernel did you use the debian tools to do it? (make-kpkg) I'm used to doing it the old way and just switched to debian. Trying out the automagic build tools I found I need to add an initrd option to get it to boot properly. Essentially:

make menuconfig
make-kpkg clean
make-kpkg --initrd kernel-image

this will build the debian kernel installation package (linux-image-2.#.# etc.)
then install the package with the dpkg -i packagename command as usual. If you're getting a kernel panic error this may be the cause, also make sure the filesystem that root is found on is compiled into the kernel and not as a module. Without more info to go on, this is the best I can do, sorry.

verbose 08-22-2006 01:11 AM

nx5000: You were plenty clear, thank you very much. That's a lot to take in but I think I've got it. My default runlevel is 2 and I commented out 3-5 in /etc/inittab awhile ago since I don't use them. I will have to try what you've suggested. udev is a replacement for hotplug for kernel >2.6.15, right? I have an installation of both 2.6.15 and .16. I've tried both. It is a dependency of the apt-get kernel-image and I think it has broken my sound (have to do 'alsactl restore' everytime) and printer. I know I had to replace it with hotplug in the past in order to get my printer working. I don't want to remove it though, since I've never been able to get kernel source to work.

kriton12: I haven't done much with make-kpkg. Since you've mentioned it, though, I'm building the kernel image right now. As I said in my first post, I've tried the kernel source many times with no success, so I gave up and used apt-get.

verbose 08-22-2006 04:34 AM

I cannot believe it. I successfully booted into kernel 2.6, finally! I wouldn't say I actually fixed the problem but that I found a workaround. I disabled syslogkd from starting in /etc/rc2.d and it boots fine.

As for appending an 'S' and doing 'mount / -o remount,rw'. Well, that didn't work too well because that was before I had replaced hde* with sda* in fstab. Therefore, the mount just complained about no entry in fstab and I couldn't see my partitions until I realized I had to edit fstab, which I did via kernel 2.4. Adding an S in grub didn't bring up a prompt as init=/bin/bash does, unless I just didn't wait long enough. I expected it to do so right after mounting the root partition... I was able to just enter my root password for maintenance to get to a shell and replace 'ro' with 'rw' in grub, but it's not as if it mattered since I edited things in kernel 2.4.

Anyway, the point is, I finally have kernel 2.6 up and running and it's feeling much faster.


Thanks


All times are GMT -5. The time now is 12:34 PM.