All of lore.kernel.org
 help / color / mirror / Atom feed
From: Asias He <asias.hejun@gmail.com>
To: Sasha Levin <levinsasha928@gmail.com>
Cc: penberg@kernel.org, kvm@vger.kernel.org,
	aneesh.kumar@linux.vnet.ibm.com, mingo@elte.hu,
	gorcunov@gmail.com
Subject: Re: [PATCH v2 2/2] kvm tools: Add '--rootfs' and '--binsh'
Date: Thu, 04 Aug 2011 00:18:55 +0800	[thread overview]
Message-ID: <4E3974EF.10308@gmail.com> (raw)
In-Reply-To: <1312310789-22817-2-git-send-email-levinsasha928@gmail.com>

On 08/03/2011 02:46 AM, Sasha Levin wrote:
> This patch adds 2 new flags:
> 
>  --rootfs [path] - Specifies a path to use as rootfs. The path will be mounted
> using virtio-9p and booted from.
> Easiest way to test it is to mount the sample image we recommend with kvm tool
> (http://wiki.qemu.org/download/linux-0.2.img.bz2) and mounting it somewhere.
> *PLEASE DO NOT TRY BOOTING FROM YOUR REAL ROOT AKA '/', EVEN WITH READ ONLY
> SET* - Lets make sure the code is bulletproof before we delete your rootfs :)
> 
>  --binsh - This flag will boot into simple /bin/sh shell instead of going
> through /sbin/init. This is usefull for more complex distribution rootfs
> where we have to deal with /etc/fstab and such.
> 
> Signed-off-by: Sasha Levin <levinsasha928@gmail.com>

This is damn impressive!

All I needed is:

./kvm run -k /home/asias/qemu-stuff/bzImage --rootfs /mnt/


I found that if I boot with

./kvm run -k /home/asias/qemu-stuff/bzImage --rootfs /mnt/

I will get:

sh-2.05b# echo a > /root/a
sh: /root/a: No such file or directory

If I boot with

sudo ./kvm run -k /home/asias/qemu-stuff/bzImage --rootfs /mnt/

sh-2.05b# echo a > /root/a

works.

It seems that it is a permission related problem, however, the warning
message is "/root/a: No such file or directory", any ideas?

-- 
Best Regards,
Asias He

  parent reply	other threads:[~2011-08-03 16:19 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02 18:46 [PATCH v2 1/2] kvm tools: Add support for 9p2000.u Sasha Levin
2011-08-02 18:46 ` [PATCH v2 2/2] kvm tools: Add '--rootfs' and '--binsh' Sasha Levin
2011-08-03  2:52   ` Aneesh Kumar K.V
2011-08-03 13:14     ` Pekka Enberg
2011-08-03 16:18   ` Asias He [this message]
2011-08-03  2:51 ` [PATCH v2 1/2] kvm tools: Add support for 9p2000.u Aneesh Kumar K.V

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=4E3974EF.10308@gmail.com \
    --to=asias.hejun@gmail.com \
    --cc=aneesh.kumar@linux.vnet.ibm.com \
    --cc=gorcunov@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=levinsasha928@gmail.com \
    --cc=mingo@elte.hu \
    --cc=penberg@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.