LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 07-31-2004, 12:41 AM   #1
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 14.1
Posts: 1,141

Rep: Reputation: 55
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
 
Old 07-31-2004, 01:50 AM   #2
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 14.1
Posts: 1,141

Original Poster
Rep: Reputation: 55
Anyone????
 
Old 07-31-2004, 01:58 AM   #3
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

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

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.
 
Old 07-31-2004, 02:03 AM   #4
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

Rep: Reputation: 47
Quote:
STEP 8:

This is very important. Make sure you're .config has the
following in it CONFIG_EXT3_FS=y You'll run into the following
error if you leave this =m instead of =y:

pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed

This is because Redhat 9.0 and 8.0 use the ext3 filesystem
for /boot ...
Looks like this might be part of the problem right here. Did you remember to set this option correctly?

Edit: Of course, if you can't mount the filesystem you can't find init on it.

Last edited by frob23; 07-31-2004 at 02:04 AM.
 
Old 07-31-2004, 04:38 PM   #5
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 14.1
Posts: 1,141

Original Poster
Rep: Reputation: 55
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????
 
Old 07-31-2004, 05:09 PM   #6
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 14.1
Posts: 1,141

Original Poster
Rep: Reputation: 55
Anyone knows about this????
 
Old 07-31-2004, 09:35 PM   #7
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 14.1
Posts: 1,141

Original Poster
Rep: Reputation: 55
Does anyone knows this???? Please post if you know the reply.
 
Old 07-31-2004, 10:08 PM   #8
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
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.
 
Old 07-31-2004, 11:53 PM   #9
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

Rep: Reputation: 47
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:
Anyone knows about this????
repeatedly in the same thread especially in such a short amount of time.

Relevant information:
http://www.linuxquestions.org/rules.php

Quote:
We do insist that you abide by the rules and policies detailed below.
* While almost every question does get an answer, we cannot guarantee a response. Please do not bump your post until 24 hours has past.

Last edited by frob23; 07-31-2004 at 11:57 PM.
 
Old 08-01-2004, 09:50 AM   #10
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 14.1
Posts: 1,141

Original Poster
Rep: Reputation: 55
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
 
Old 08-03-2004, 11:57 AM   #11
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 14.1
Posts: 1,141

Original Poster
Rep: Reputation: 55
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:
get rid of initrd
Can you elaborate on it???

Tux
 
Old 08-06-2004, 10:56 PM   #12
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 14.1
Posts: 1,141

Original Poster
Rep: Reputation: 55
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
 
Old 08-07-2004, 10:04 AM   #13
tuxrules
Senior Member
 
Registered: Jun 2004
Location: Chicago
Distribution: Slackware64 14.1
Posts: 1,141

Original Poster
Rep: Reputation: 55
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??
 
Old 08-07-2004, 10:37 AM   #14
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

Rep: Reputation: 47
Can you cut and paste the lines dealing with ext3 from .config ?

Give the whole block... starting with ext2 as well.
 
Old 08-07-2004, 10:46 AM   #15
Demonbane
Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

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

Last edited by Demonbane; 08-07-2004 at 10:47 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Booting into Single User on MDK 9 asks for root password instead of booting into root acadcworks Linux - General 6 01-10-2006 06:51 AM
configuring kernel, booting to root partition warinthepocket Linux - General 2 02-06-2005 12:43 AM
Loging as root and an error booting. Kensai Mandriva 8 02-22-2004 11:38 PM
booting error: Kernel Panic: vfs: unable to mount root fs on 01:01 eam Linux - General 2 01-26-2004 08:48 PM
Kernel Panic with pivot root error ramu_ak Linux - General 0 02-07-2003 02:41 AM


All times are GMT -5. The time now is 03:16 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration