aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>2003-02-15 20:28:37 +0000
committeriap10@labyrinth.cl.cam.ac.uk <iap10@labyrinth.cl.cam.ac.uk>2003-02-15 20:28:37 +0000
commit9dece74cc989dd91181e905d2fad2a2f63c35fe0 (patch)
treea8c79d377f622784a144c43fa5bc2ef8bdb79f8d
parent6cf19e1c58dc6366a683e8e132278daa87e03ee2 (diff)
downloadxen-9dece74cc989dd91181e905d2fad2a2f63c35fe0.tar.gz
xen-9dece74cc989dd91181e905d2fad2a2f63c35fe0.tar.bz2
xen-9dece74cc989dd91181e905d2fad2a2f63c35fe0.zip
bitkeeper revision 1.46.1.1 (3e4ea2f52nebi38hIZkpYvqaZogL3g)
Allow root to be other than nfs - remove the nfsroot component of the xen command line, and add "ro root=/dev/xhdaN" to the *module* command line. E.g. kernel (nd)/usr/groups/srgboot/moonraider/image.gz ipbase=128.232.35.190 gateway=128.232.32.1 netmask=255.255.240.0 dom0_mem=262144 module (nd)/usr/groups/srgboot/moonraider/xenolinux.gz ro root=/dev/xhda7
-rw-r--r--xen-2.4.16/common/domain.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/xen-2.4.16/common/domain.c b/xen-2.4.16/common/domain.c
index cb24e0cdce..2f6f1890a0 100644
--- a/xen-2.4.16/common/domain.c
+++ b/xen-2.4.16/common/domain.c
@@ -578,19 +578,16 @@ int setup_guestos(struct task_struct *p, dom0_newdomain_t *params)
}
}
*dst = '\0';
+//printk("opt_nfsroot=%d,%s XX cmd =: %s\n",opt_nfsroot,opt_nfsroot,virt_startinfo_address->cmd_line);
- if ( opt_nfsroot )
- {
+ if ( strcmp("",opt_nfsroot) )
+ { // if nfsroot has been set to something
unsigned char boot[150];
unsigned char ipbase[20], nfsserv[20], gateway[20], netmask[20];
unsigned char nfsroot[70];
snprintf(nfsroot, 70, opt_nfsroot, dom);
snprintf(boot, 200,
-#if 1
" root=/dev/nfs ip=%s:%s:%s:%s::eth0:off nfsroot=%s",
-#else
- " ro root=/dev/xhda7 ip=%s:%s:%s:%s::eth0:off arfle=%s",
-#endif
quad_to_str(opt_ipbase + dom, ipbase),
quad_to_str(opt_nfsserv, nfsserv),
quad_to_str(opt_gateway, gateway),
@@ -598,6 +595,18 @@ int setup_guestos(struct task_struct *p, dom0_newdomain_t *params)
nfsroot);
strcpy(dst, boot);
}
+ else
+ {
+ unsigned char boot[150];
+ unsigned char ipbase[20], nfsserv[20], gateway[20], netmask[20];
+ snprintf(boot, 200,
+ " ip=%s::%s:%s::eth0:off",
+ quad_to_str(opt_ipbase + dom, ipbase),
+ quad_to_str(opt_gateway, gateway),
+ quad_to_str(opt_netmask, netmask));
+ strcpy(dst, boot);
+ }
+
/* Reinstate the caller's page tables. */
__write_cr3_counted(pagetable_val(current->mm.pagetable));