LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-06-2005, 09:43 AM   #1
Fonk
Member
 
Registered: May 2004
Location: Münster / Germany
Distribution: Debian, Fedora
Posts: 43

Rep: Reputation: 15
/sbin/init problems with initrd-boot SOLVED


Hello,

I have to use an initrd because I've to load the module for my RAID-Controller. So I wrote my own initrd with an ext2 fs, copied the module and necessary Programs and now booting with the following testing /linuxrc:

Code:
#!/bin/sh
/bin/insmod /hpt374.ko
exec /bin/sh
After getting the shell do:

Code:
/bin/mount -o ro /dev/sda3 /new-root
cd new-root
/bin/pivot_root . initrd
exec chroot . /bin/sh
So, my last shell should have PID 1. If I now do
Code:
exec /sbin/init
I get:
Code:
Usage: init 0123456SsQqAaBbCcUu
VFS: Cannot open root device "sda3" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
So what is wrong? My kernel options are "root=/dev/sda3" which is the correct root... I think the problem is that /sbin/init does not execute the initial-steps (Usage: "init 0123456SsQqAaBbCcUu") - I also tried "exec /sbin/init s" (although I don't really know for what s,q,a,b,c oder u stand...) - then it complains that /dev/initctl does not exist...

My grub.conf (menu.lst) is like this:
Code:
default 0
timeout 10

title=Gentoo Linux 2.6.9
root (hd0,2)
kernel (hd0,2)/boot/vmlinuz-2.6.9 root=/dev/sda3
initrd (hd0,2)/boot/initrd-2.6.9
So thanks for any hints - I tried the last 6 hours to get the initrd working!! :-((

Last edited by Fonk; 03-06-2005 at 01:49 PM.
 
Old 03-06-2005, 01:48 PM   #2
Fonk
Member
 
Registered: May 2004
Location: Münster / Germany
Distribution: Debian, Fedora
Posts: 43

Original Poster
Rep: Reputation: 15
So I solved the Problem myself:

Code:
kernel (hd0,2)/boot/vmlinuz-2.6.9 root=/dev/ram0
linuxrc:
Code:
insmod hpt374.ko
mount /dev/sda3 new-root

mount -t proc none proc
echo 0x83 > /proc/sys/kernel/real-root-dev
umount /proc
cd new-root
mkdir initrd 2>/dev/null
pivot_root . initrd
exec /bin/chroot . /sbin/init </dev/console >/dev/console 2>&1
man initrd helps!!
 
  


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
boot failure- sbin/init missing? help whatpot Ubuntu 3 10-28-2009 12:39 AM
INIT: cannot execute /sbin/agetty xrado Slackware 5 08-06-2005 05:44 AM
/sbin/init errors on boot dereko Debian 2 03-17-2005 11:56 AM
How can i overwrite /sbin/init? poboy Linux - Newbie 3 08-28-2004 09:40 AM
/sbin/clock and /sbin/hwclock: out of memory problems victor2000 Linux - General 0 07-29-2003 04:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:44 AM.

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