chroot= as a new kernel parameter
Quoted 11 lines · Christian Kujau
Quoted 2 lines · On Fri, 7 Mar 2008, [email protected] wrote:
Quoted 2 lines · H. Peter Anvin
Quoted 1 line
init=/path/to/any/sbin/chroot /newroot
/sbin/initGreat, I was looking for something like this myself some time ago!
Quoted 1 line
wouldn`t it be useful to add a hint to kernel-parameters.txt ?
How about:
init= [KNL]
Review
Quoted 8 lines
(quoted diff) +5
-2- Format: <full_path> + Format: <full_path> <options> Run specified binary instead of /sbin/init as init - process. + process. init= is able to take more than one option + allowing us to do: + init=/path/to/any/sbin/chroot /newroot /sbin/init + ...and thus booting into /newroot.
Nice try, but this only works on the surface. Try remounting root to see what I mean.
Now, for a patch that actually does what we want, try this:
[PATCH][retry-2] init: Introduce rootdir bootparm to select which dir to sys_chroot
Thanks!
--
Al
Quoted 1 line · Al Boldi
Nice try, but this only works on the surface. Try remounting root to see what I mean.
Are you suggesting that hpa's init= thingy doesn't support remounting root? If so, it'd have to be mentioned in kernel-parameters.txt as well.
Quoted 3 lines
Now, for a patch that actually does what we want, try this:
[PATCH][retry-2] init: Introduce rootdir bootparm to select which dir tosys_chroot
I didn't intend to introduce another bootparam, because of -ENOSKILL. But somewhere in this thread is a patch for the chroot= bootparam, I have not tested it though...
C.
Signature · 3 lines
BOFH excuse #93: Feature not yet implemented
Quoted 6 lines · Christian Kujau
Quoted 2 lines · Al Boldi
Nice try, but this only works on the surface. Try remounting root to see what I mean.
Are you suggesting that hpa's init= thingy doesn't support remounting root?
Exactly.
Quoted 9 lines
If so, it'd have to be mentioned in kernel-parameters.txt as well.
Quoted 3 lines
Now, for a patch that actually does what we want, try this:
[PATCH][retry-2] init: Introduce rootdir bootparm to select which dir tosys_chrootI didn't intend to introduce another bootparam, because of
-ENOSKILL. But somewhere in this thread is a patch for the chroot= bootparam, I have not tested it though...
Sure, your doc effort is much appreciated, but neither the proposed patch nor the init= trick works as advertised, due to some strange /dev/root dependencies.
Now, the rootdir= patch works around this by binding the rootdir before sys_chroot.
Thanks!
--
Al