RE: initrd in 2.4.19

2 messages, 2 authors, 2002-05-03 · open the first message on its own page

RE: initrd in 2.4.19

From: Brian Kuschak <hidden>
Date: 2002-05-02 17:13:30

I want to use pivot_root, so I don't use the special /linuxrc running
code.  Instead I use "init=/linuxrc" as part of the command line.  If
you do this your first script should work fine (pivot follwed by
chroot).  But to be honest, I don't chroot.  I don't think it's
necessary.
Using init=/linuxrc allows my first script to work.

However, it's a bit restrictive:  if I want to override the usual boot
sequence and get the kernel to mount the real root and drop into a shell I
can't use this method.  With the 'old-style' script, I can set
"init=/bin/bash".  These get applied AFTER /linuxrc terminates.  If I use
your method, I can't do that.

I realized yesterday that my second script works if I unmount /dev/hda2
before exiting /linuxrc.

Thanks,
Brian

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

Re: initrd in 2.4.19

From: David Gibson <hidden>
Date: 2002-05-03 00:14:13

On Thu, May 02, 2002 at 10:13:30AM -0700, Brian Kuschak wrote:
quoted
I want to use pivot_root, so I don't use the special /linuxrc running
code.  Instead I use "init=/linuxrc" as part of the command line.  If
you do this your first script should work fine (pivot follwed by
chroot).  But to be honest, I don't chroot.  I don't think it's
necessary.
Using init=/linuxrc allows my first script to work.

However, it's a bit restrictive:  if I want to override the usual boot
sequence and get the kernel to mount the real root and drop into a shell I
can't use this method.  With the 'old-style' script, I can set
"init=/bin/bash".  These get applied AFTER /linuxrc terminates.  If I use
your method, I can't do that.
Remember that any kernel command line options that the kernel doesn't
recognize get passed to init - as environment variables if they
contain a "=" and as command line arguments otherwise.  So it's fairly
easy to invent a new parameter to control the "real" init and have
your linuxrc interpret it and act accordingly.

--
David Gibson			| For every complex problem there is a
david@gibson.dropbear.id.au	| solution which is simple, neat and
				| wrong.  -- H.L. Mencken
http://www.ozlabs.org/people/dgibson

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help