pivot root error while booting kernel 2.6.7
I just finished compiling kernel 2.6.7 on my RH 9. I followed the instructions given in this article
posted on LQ. Well everything went smooth and I have the new kernel and initrd.img files copied to my /boot. When I boot using the new kernel I get the following error message. mounting root filesystem mount: error 19 mounting ext3 pivot root: pivot_root (/sysroot, /sysroot/initrd) failed: 2 umount /initrd/proc failed: 2 Mounting devfs on /dev Freeing unused kernel memory: 184k freed Kernel panic: No init found. Try passing init= option to kernel. Anyone knows whats wrong. I'll appreciate if someone can give me exact pointers as its my first kernel compile. Thanks, Tux |
Anyone????
|
Well, I know, and I don't know. This is one of those things where a geek wants 20 minutes, a couple of repair floppies, and a private room alone with the computer. :cool:
From the messages I would say that init either got wasted or the new kernel doesn't look in the right place (usually /sbin/init in my experience). Let me read through the steps and ponder how they would have changed init. |
Quote:
Edit: Of course, if you can't mount the filesystem you can't find init on it. ;) |
Well, tried to compile again (from start) and also edited the following line in .config file (copied my old config and make oldconfig)
from CONFIG_EXT3_FS=m to CONFIG_EXT3_FS=y. then i gave, make bzImage make modules && make modules_install && make install I got this error (I think during the make install process): if [ -r System.map ]; then /sbin/depmod -ae -F System.map 2.6.7; fi make[1]: `arch/i386/kernel/asm-offsets.s' is up to date. CHK include/linux/compile.h Kernel: arch/i386/boot/bzImage is ready sh /usr/src/linux-2.6.7/arch/i386/boot/install.sh 2.6.7 arch/i386/boot/bzImage System.map "" All of your loopback devices are in use. mkinitrd failed make[1]: *** [install] Error 1 make: *** [install] Error 2 Can anyone point out why so???? |
Anyone knows about this????
|
Does anyone knows this???? Please post if you know the reply.
|
get rid of initrd, make sure you have the filesystem and ide chipset support compiled into the kernel, and change reference of "=LABEL=/" in /etc/fstab and kernel parameters to the actual device(eg /dev/hda1).
Or try using the latest version of mkinitrd from here Or install the precompiled RPMs from the same link. |
tuxrules, please follow the guidelines of the forum and do NOT bump your message till it has gone unanswered for at least 24 hours. People do take time to respond and they do check more than the first page for questions they can help on. You have bumped this thread almost as much as people have responded.
It is one thing to post new or more information it is another to see this Quote:
Relevant information: http://www.linuxquestions.org/rules.php Quote:
|
Hi frob23,
Sorry for bumping the threads. This is the first time i've bumped a thread and I promise not to do it again. I was a little frustrated by repeated compiling and got a little impatient to get answers. Anyway thanks for your replies. Let me try the options given by demonbane. Thanks again for replies. Tux |
well, I am doing this kernel compile since many days now. I know I can install the kernel rpm but i want to compile it (just for the heck of it).
demonbane, I dont get what you mean by Quote:
Tux |
well,
I recompiled the kernel again for RH9 (old kernel-2.4.20-8) and this time I didnt choose ramdisk support (initrd) because of the problem i had during the previous compiles (read my earlier posts). I also opted for inbuilt support for ext3 filesystem. I compiled the kernel alright and copied bzImage and system.map to boot partition (hdb1). RH9 is on hdb3. hdb2 is swap. Here's the part of original fstab LABEL=/ / ext3 defaults 1 1 LABEL=/boot /boot ext3 defaults 1 2 and here's the part of original grub.conf title Red Hat Linux 9 (2.6.7) root (hd1,0) kernel /bzImage-2.6.7 ro root=LABEL=/ hdc=ide-scsi hdd=ide-scsi title Red Hat Linux 9 (2.4.20-8) root (hd1,0) kernel /vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi hdd=ide-scsi initrd /initrd-2.4.20-8.img Here's the part of modified fstab (after kernel-2.6.7 compile) /dev/hdb3 / ext3 defaults 1 1 /dev/hdb1 /boot ext3 defaults 1 2 Here's the part of modified grub.conf after compile title Red Hat Linux 9 (2.6.7) root (hd1,0) kernel /vmlinuz-2.6.7 ro root=/dev/hdb3 title Red Hat Linux 9 (2.4.20-8) root (hd1,0) kernel /vmlinuz-2.4.20-8 ro root=/dev/hdb3 hdc=ide-scsi hdd=ide-scsi initrd /initrd-2.4.20-8.img If i try to boot using the original fstab and grub.conf, I get the following error: VFS: cannot open root device "LABEL=/" or unknown-block(0,0) please append a correct "root=" boot option kernel panic: VFS: Unable to mount root fs on unknown-block(0,0) If i try to boot using modified fstab and grub.conf I get a superblock error, and it asks me to repair the file system. Says something like superblock error. Can you tell me whats going on??? I'm a little lost. Should I include the ram disk support and recompile. Just an odd thought, I've tried several times to compile this kernel on RH9. Is it really necessary to have make initrd in RH9. I compiled the kernel for slackware 10 and I didnt do that. Thanks, Tux |
Okay more problems, looks like RH 9 is very stubborn.
Here's what I did with modified fstab /dev/hdb3 / ext3 defaults 1 1 /dev/hdb1 /boot ext3 defaults 1 2 Here's the part of modified grub.conf after compile title Red Hat Linux 9 (2.6.7) root (hd1,0) kernel /vmlinuz-2.6.7 ro root=/dev/hdb3 title Red Hat Linux 9 (2.4.20-8) root (hd1,0) kernel /vmlinuz-2.4.20-8 ro root=/dev/hdb3 hdc=ide-scsi hdd=ide-scsi initrd /initrd-2.4.20-8.img Now i get error like this; Checking root filesystem fsck.ext3/dev/hdb3: The superblock couldnot be read or does not describe a correct ext2 filesystem. If the device is valid & it really contains an ext2 fs (and not swap or nfs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock. e2fsck -b 8193 <device> :No such file or directory while trying to open /dev/hdb3 I dont understand whats going on??? can anyone help me figure out?? |
Can you cut and paste the lines dealing with ext3 from .config ?
Give the whole block... starting with ext2 as well. |
Double check that ide chipset and ext2/3 filesystem support is compiled into the kernel. Also do not edit .config file directly unless you know what you're doing, use menuconfig/xconfig etc since these frontends sorts out dependencies(though not always perfect)
My suggestion is that do a make mrproper, and configure everything from scratch, making sure everything you need is compiled in. Lastly see if this link is any help. |
All times are GMT -5. The time now is 02:28 PM. |