Bug 51770
Summary: | when kernel loads just created initrdfile, it panics | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Retired] Red Hat Public Beta | Reporter: | lethalwp | ||||||||||
Component: | mkinitrd | Assignee: | Matt Wilson <msw> | ||||||||||
Status: | CLOSED NOTABUG | QA Contact: | David Lawrence <dkl> | ||||||||||
Severity: | medium | Docs Contact: | |||||||||||
Priority: | medium | ||||||||||||
Version: | roswell | ||||||||||||
Target Milestone: | --- | ||||||||||||
Target Release: | --- | ||||||||||||
Hardware: | i386 | ||||||||||||
OS: | Linux | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
Doc Text: | Story Points: | --- | |||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2001-08-24 16:26:33 UTC | Type: | --- | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Attachments: |
|
Description
lethalwp
2001-08-14 21:59:45 UTC
there should be more errors (from the mount command, perhaps) further up the log. Created attachment 29355 [details]
initrd done with mkinitrd initrdttt.img 2.4.8
I have attached the initrdfile created, it panics just after loading the scsi module, but there are no traces in the logs (which is normal, because the root drive isn't mounted yet), anyway here are the messages: ---Afterscsimoduledetectionblablablayadayada Mounting /proc filesystem Mounting root filesystem pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed:2 Freeing unused kernel mem: 232k freed Kernel panic: No init found. Try passing init option to kernel. here is the version used of mkinitrd: Creating root device[lethalwp@little RPMS]$ rpm -qa |grep initrd mkinitrd-3.1.5-1 I'm also putting as attachment a rpm -qa >rpmlist.txt I have to admit i haven't used the install of the roswell cds when upgrading from my 7.1, i did the update all manually using rpm -F (which was way 'longer' to do than wolverine -> 7.1 :/, a lot of new packages needed...) Again, for me, it is calling some devfile or so that does not exist? Kernel used if 2.4.8 homecompiled (using the latest rpm of redhat .config, with a make oldconfig or so, changing some little stuff) Created attachment 29356 [details]
my rpm -qa |sort >rpmlist.txt
Are you sure? It should have said: Mounting /proc filesystem Creating root device Mounting root filesystem Yup sorry, copy/paste that went wrong it did say: ---Afterscsimoduledetectionblablablayadayada Mounting /proc filesystem Creating root device Mounting root filesystem pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed:2 Freeing unused kernel mem: 232k freed Kernel panic: No init found. Try passing init option to kernel. does your root filesystem have an ext3 journal file on it? Nope, it is "good old" ext2 but what i don't understand is the following: [lethalwp@little lethalwp]$ locate mkrootdev [lethalwp@little lethalwp]$ I have no mkrootdev file (same kind of result with find of course) How can it make the 'rootdev' if the program it is calling is not present? no, these are special nash commands. They are built in to nash. The initrd is way too small to have a full runtime environment for a shell and commands. What device is your root filesystem on? What bootloader are you using? Can you upload your bootloader config file? I have done a little more digging, but can be wrong: and remarked this: actually: [root@little kernel]# cat real-root-dev 2066 which is 0x812 (hrm, but root is on brw-rw---- 1 root disk 8, 18 Jul 18 17:58 /dev/sdb2 so i was expecting 0x818 or so?) Anyway, in the linuxrc file i can read: mkrootdev /dev/root echo 0x0100 > /proc/sys/kernel/real-root-dev I presume: 0x0100 is brw-rw---- 1 root disk 1, 0 Jul 18 17:58 /dev/ram0) which is not the real needed root? And, to end, i've read this little info in the /usr/src/linux/Documentation/initrd.txt: "Obsolete root change mechanism ------------------------------ The following mechanism was used before the introduction of pivot_root. Current kernels still support it, but you should _not_ rely on its continued availability. ... ... ..." Which explain the use of echo something>real-root-dev I'm lost on this, why trying to implement the use of real-root-dev? What is the need of pivot_root? I thought that once the linuxrc was ended, initrd was cleaned up,and kernel mounted the root by its own (using rdev or lilo setup) And actually, it's this last method i am using to get it working Adding lilo.conf & fstab scripts in a tiffy ;) Created attachment 29375 [details]
my fstab
Created attachment 29376 [details]
my lilo.conf
18 decimal == 0x12. you'll notice we're using pivot_root now. What we're doing is tricking the kernel into thinking that the real-root-device is the ramdisk (which is really the initrd). This means that the kernel won't be doing anything at all when linuxrc ends except for exec'ing /sbin/init. you've told me initrd was to little to put a bash in it, but that gave me the idea of doing it... giving it 8MB of ram, bash, ls, cat, + libs anyway, i have found the explanation, which is quite ridiculous, and was so evident :( after the: pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed:2 in the bash, i've seen my rootdev was correctly mounted in /sysroot and then checking /sysroot/initrd: no such directory, so i've made one, and the system was able to boot. I really do not understand the need of using that 'tempdir', which, if deleted, will stop the whole bootsequence? But, if i may ask one little last question: kernel said: real-root-dev: 2066 which is in hex=818 and you' telling me to take those number appart?, and convert 8->hex and 18->hex? (A Yes/No question ;) ) Thank you for helping, well-done ;) Greetz, lethalwp run "rpm -y mkinitrd" - it required a new RPM of filesystem which made the directory, it seems you don't have that installed... |