linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
[parent not found: <1oMkR-1Zk-21@gated-at.bofh.it>]
* Re: Initrd Question
@ 2004-02-13 14:14 "Andrey Borzenkov" 
  2004-02-13 14:22 ` Valdis.Kletnieks
  0 siblings, 1 reply; 10+ messages in thread
From: "Andrey Borzenkov"  @ 2004-02-13 14:14 UTC (permalink / raw)
  To: der.eremit; +Cc: linux-kernel


>> echo 0x0100 > /proc/sys/kernel/real-root-dev
>
> This makes no sense as you're using pivot_root. 

this makes all sort of sense. Please check sources. It is required so that kernel will not attempt to mount root passed to it by loader. You are welcome to clean up the code :)

>> mount -n -o ro /dev/sda2 /new_root
>
> This doesn't even match with the 0x0100 above, now does it?

so what? kernel happily ignores real-root-dev, it is possible that some user-level tools may be confused but I have not seen any so far.

>> pivot_root /new_root /new_root/initrd
>
> You should cd into /new_root before running pivot_root,

Huh? Why?

SYNOPSIS
       pivot_root new_root put_old

>> if [ -c initrd/dev/.devfsd ]
>>   then
>>           echo "Mounting devfs..."
>>           mount -n -t devfs none dev
>> fi
>
> Should you check for /dev/.devfsd on the real root here? I thought .devfsd
> is created by the devfsd process, 

you are wrong here, sorry. .devfsd is created by devfs.

-andrey



^ permalink raw reply	[flat|nested] 10+ messages in thread
* Initrd Question
@ 2004-02-13  3:12 Jim Gifford
  2004-02-13 20:34 ` Chris Lingard
  0 siblings, 1 reply; 10+ messages in thread
From: Jim Gifford @ 2004-02-13  3:12 UTC (permalink / raw)
  To: Linux Kernel

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


^ permalink raw reply	[flat|nested] 10+ messages in thread
* initrd question
@ 2001-06-18  7:20 Kelledin Tane
  0 siblings, 0 replies; 10+ messages in thread
From: Kelledin Tane @ 2001-06-18  7:20 UTC (permalink / raw)
  To: linux-kernel

Concerning the new way initrd works in 2.4...

I'm trying to get the system to the point where I can free the memory
used by the initrd.  I'm quite well aware of how to do this in a bash
script, but I want to know how to do the same from a C program.
Currently, something's keeping /dev/ram0 busy, so I know I'm doing
something wrong.

Kelledin


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-02-18  2:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1oC26-8eW-9@gated-at.bofh.it>
2004-02-13 13:30 ` Initrd Question der.eremit
     [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
2004-02-13 14:14 "Andrey Borzenkov" 
2004-02-13 14:22 ` Valdis.Kletnieks
2004-02-18  2:05   ` Robert White
  -- strict thread matches above, loose matches on Subject: below --
2004-02-13  3:12 Jim Gifford
2004-02-13 20:34 ` Chris Lingard
2001-06-18  7:20 initrd question Kelledin Tane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).