mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ralph Jones <ralph.jones@altavista.com>
To: linux-kernel@vger.kernel.org
Subject: pivot_root from non-interactive script
Date: 18 Jun 2001 06:03:02 -0700	[thread overview]
Message-ID: <20010618130302.15892.cpmta@c012.sfo.cp.net> (raw)

Greetings,

I have followed the instructions given in Documentation/initrd.txt with regard to pivot_root, but am unable to unmount the filesystem, when everything is called from a non-interactive script. 

ie. When I set a link from linuxrc to /bin/ash and then manually go through the commands in the shell script, I am able to unmount the old initrd filesystem.  However, when linuxrc is a shell script containing the same commands, I am unable to umount the old initrd fs.  I get instead: "Device or resource busy".

The contents of my linuxrc script are as follows:
--------------------
#!/bin/ash
export PATH=/bin:/sbin:/usr/bin:/usr/sbin
 
cd /
mkdir /new
mount -t shm /dev/shm /new
cp -pdR * new
 
cd new
pivot_root . initrd
 
cd /
exec chroot . /bin/ash <dev/console > dev/console 2>&1
-------------
ash is a static binary.  chroot, mount and pivot_root are from busybox.  

- Ralph Jones

Find the best deals on the web at AltaVista Shopping!
http://www.shopping.altavista.com

             reply	other threads:[~2001-06-18 13:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-18 13:03 Ralph Jones [this message]
2001-06-18 13:54 ` Andreas Schwab
2001-06-19  9:58 Ralph Jones
2001-06-19 12:10 ` Andreas Schwab
2001-06-20 12:32 Ralph Jones

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=20010618130302.15892.cpmta@c012.sfo.cp.net \
    --to=ralph.jones@altavista.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®