linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* RE: initrd in 2.4.19
@ 2002-05-02 17:13 Brian Kuschak
  2002-05-03  0:14 ` David Gibson
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Kuschak @ 2002-05-02 17:13 UTC (permalink / raw)
  To: 'Brad Parker', Brian Kuschak; +Cc: linuxppc-embedded


> 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/

^ permalink raw reply	[flat|nested] 4+ messages in thread
* initrd in 2.4.19
@ 2002-05-01 17:08 Brian Kuschak
  2002-05-02 11:27 ` Brad Parker
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Kuschak @ 2002-05-01 17:08 UTC (permalink / raw)
  To: linuxppc-embedded


I noticed initrd handling has changed recently in the
kernel (init/do_mounts.c).  This new code is causing
me problems.  Has anyone else run into this?

Using the 'new style' (not terminating linuxrc)
/linuxrc runs the following sequence:
  mount -o ro /dev/hda2 /new-root
  cd /new-root
  mkdir initrd
  pivot_root . initrd
  exec chroot . sbin/init dev/console 2>&1
But /linuxrc seems to be runnnig as PID 10, and
sbin/init doesn't start.

Using the 'old style' (linuxrc terminates and kernel
starts init):
  mount -o ro /dev/hda2 /new-root
  cd /new-root
  mkdir initrd
  echo 0x0302 > /proc/sys/kernel/real-root-dev
  exit 0
The mount fails with EBUSY in mount_block_root()
because the root device is already mounted:

Attempting to find a root file system on hda2...
 hda1 hda2
 hda: hda1 hda2
XFS mounting filesystem ide0(3,2)
Starting XFS recovery on filesystem: ide0(3,2) (dev:
3/2)
Ending XFS recovery on filesystem: ide0(3,2) (dev:
3/2)
VFS: busy inodes on changed media.
err=-16, p=ext2, name=/dev/root  <--
VFS: Cannot open root device "" or 03:02
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 03:02


For the old style to work, I have to not mount the
filesystem at all in my /linuxrc. I'm using
2.4.19-pre7 from bk (1.948)

-Brian


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

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

end of thread, other threads:[~2002-05-03  0:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-02 17:13 initrd in 2.4.19 Brian Kuschak
2002-05-03  0:14 ` David Gibson
  -- strict thread matches above, loose matches on Subject: below --
2002-05-01 17:08 Brian Kuschak
2002-05-02 11:27 ` Brad Parker

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).