From ceba1fad4cd795ad46772efa201fbe2c549e5203 Mon Sep 17 00:00:00 2001 From: Asias He Date: Sun, 9 Jan 2011 16:48:40 +0800 Subject: [PATCH] kvm: Add rw to default kernel command line parameters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As reported by Asias He, guest kernels mount filesystems as readonly under our hypervisor: without rw: [    0.909000] EXT3-fs: mounted filesystem with writeback data mode. [    0.909000] VFS: Mounted root (ext3 filesystem) readonly on device 253:1. /dev/root on / type ext3 (ro,relatime,errors=continue,data=writeback) by passing the "rw" kernel parameter, guest kernels are able to mount as read-write: [    0.891000] EXT3 FS on vda1, internal journal [    0.891000] EXT3-fs: recovery complete. [    0.892000] EXT3-fs: mounted filesystem with writeback data mode. [    0.892000] VFS: Mounted root (ext3 filesystem) on device 253:1. /dev/root on / type ext3 (rw,relatime,errors=continue,data=writeback) There's some real problem hiding here but as we've done with other parts of the kernel (PCI, SMP), just bypass the problem for now. Signed-off-by: Asias He Signed-off-by: Pekka Enberg --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index 69977b3..5331928 100644 --- a/main.c +++ b/main.c @@ -110,7 +110,7 @@ int main(int argc, char *argv[]) kvm__setup_cpuid(kvm); - strcpy(real_cmdline, "notsc nolapic nosmp noacpi pci=conf1 earlyprintk=ttyS0,keep root=fc00 "); + strcpy(real_cmdline, "notsc nolapic nosmp noacpi pci=conf1 earlyprintk=ttyS0,keep root=fc00 rw "); if (kernel_cmdline) { strlcat(real_cmdline, kernel_cmdline, sizeof(real_cmdline)); real_cmdline[sizeof(real_cmdline)-1] = '\0';