mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jim Gifford" <maillist@jg555.com>
To: "Linux Kernel" <linux-kernel@vger.kernel.org>
Subject: Initrd Question
Date: Thu, 12 Feb 2004 19:12:48 -0800	[thread overview]
Message-ID: <015501c3f1df$42cd7cf0$d300a8c0@W2RZ8L4S02> (raw)

I wrote the initrd hint for the Linux from Scratch. I have followed the
initrd.txt exactly to the letter. The problem I have noticed is with one of
the commands, and I checked other mkinitrd scripts and they have the
workaround in it.

According to initrd.txt the  echo 0x301 >/proc/sys/kernel/real-root-dev is
for the old change root mechanism, but I have tried to elminate that from my
script and it fails everytime saying it can't find the root, the infamous
Kernel panic: VFS: Unable to mount root fs on xx:xx. Here is my linuxrc
script that is built from my mkinitrd script which can be viewed at
http://cvs.jg555.com/viewcvs.cgi/scripts/system/mkinitrd.

I use busybox for my script so I can keep the size down. My current size is
only 387k.

#!/bin/sh

echo "Initial RAMDISK Loading Starting..."
insmod /lib/megaraid.ko
insmod /lib/aic7xxx.ko
insmod /lib/uhci-hcd.ko
echo "Mounting proc..."
mount -n -t proc none /proc
echo 0x0100 > /proc/sys/kernel/real-root-dev
echo "Mounting real root dev..."
mount -n -o ro /dev/sda2 /new_root
echo "Running pivot_root..."
pivot_root /new_root /new_root/initrd
if [ -c initrd/dev/.devfsd ]
  then
          echo "Mounting devfs..."
          mount -n -t devfs none dev
fi
if [ $$ = 1 ]
  then
          echo "Running init..."
          exec chroot . sbin/init dev/console 2>&1
  else
          echo "Using bug circumvention for busybox..."
          exec chroot . sbin/linuxrc dev/console 2>&1
fi
echo "Initial RAMDISK Loading Completed..."



----
Jim Gifford
maillist@jg555.com


             reply	other threads:[~2004-02-13  3:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-13  3:12 Jim Gifford [this message]
2004-02-13 20:34 ` Chris Lingard
     [not found] <1oMkR-1Zk-21@gated-at.bofh.it>
2004-02-13 15:23 ` der.eremit
2004-02-13 16:42   ` Jim Gifford
2004-02-13 17:12   ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2004-02-13 14:14 "Andrey Borzenkov" 
2004-02-13 14:22 ` Valdis.Kletnieks
2004-02-18  2:05   ` Robert White
     [not found] <1oC26-8eW-9@gated-at.bofh.it>
2004-02-13 13:30 ` der.eremit
2001-06-18  7:20 initrd question Kelledin Tane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='015501c3f1df$42cd7cf0$d300a8c0@W2RZ8L4S02' \
    --to=maillist@jg555.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®