mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Oliver Tennert <tennert@science-computing.de>
To: marcelo@conectiva.com.br
Cc: linux-kernel@vger.kernel.org
Subject: Kernel setup()
Date: Wed, 12 Mar 2003 09:26:23 +0100 (MET)	[thread overview]
Message-ID: <Pine.GHP.4.53.0303120915340.16277@alderaan.science-computing.de> (raw)

Hi Marcelo,

I am lacking some understanding concerning the setup() routine of Linux
>=2.4.19.

If I understand it right, then with kernel version 2.4.19, some novelties
concerning the handling of initrd and rootdevs has entered the kernel.

The same "linuxrc" program, e.g., can work with a 2.4.18, but not with a
2.4.19/20.

I have thought (and the initrd documentation in the Documentation/
directory states it, too) that the pivot_root mechanism is the "new one",
whereas the change_root machanism which automatically takes place if the
linuxrc programs exits for some reason, is the "old one".

Now have a look a the following example linuxrc sniplet, taken from
SuSE-7.3/8.0.


--- mk_initrd   Tue Mar  4 14:13:43 2003
+++ mk_initrd   Tue Mar  4 14:14:43 2003
...

 mount -n -t proc proc /proc
+echo 0x0100 > /proc/sys/kernel/real-root-dev
 mount -n -t $rootfstype $rootdev /mnt
 rm -f /mnt/.initrd 2>/dev/null
 mkdir -p /mnt/.initrd
..

The point is that without the "echo ..." line, the mounting of the
__real__ root device (harddisk partition) won't work for kernels >=2.4.19.

On the other hand, this should actually not be necessary if using a
pivot_root call.

Recent distributions now handle the problem by just having linuxrc loading
the necessary modules and exiting all of a sudden, and everything works.

My question is: is pivot_root deprecated by now? I just am quite dazzled
and want to know how to __cleanly__ handle the mounting of a new root
device.

Best regards

Oliver


		   Dr. Oliver Tennert

  		   +49 -7071 -9457-598

 		   e-mail: O.Tennert@science-computing.de
  		   science + computing AG
  		   Hagellocher Weg 71
   		   D-72070 Tuebingen



             reply	other threads:[~2003-03-12  8:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-12  8:26 Oliver Tennert [this message]
2003-03-12 16:24 ` H. Peter Anvin

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=Pine.GHP.4.53.0303120915340.16277@alderaan.science-computing.de \
    --to=tennert@science-computing.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /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®