Re: Kernel setup() and initrd problems

From: H. Peter Anvin (hpa@zytor.com)
Date: Fri Mar 14 2003 - 14:12:06 EST


Followup to: <Pine.LNX.4.44.0303131051160.7342-100000@chaos.physics.uiowa.edu>
By author: Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
In newsgroup: linux.dev.kernel
>
> I think whoever came up with that just got the idea of pivot_root wrong.
> The idea was to get rid of the initrd special case. It should be possible
> to do the following, though I didn't work out the details:
>
> Tell the kernel that our root dev is /dev/ram and give it an initrd which
> isn't really a classical initrd (with /linuxrc on it), but instead has a
> /sbin/init which is similar to the linuxrc above.
>

It *is* possible, but you need to pass "root=/dev/ram0" to the kernel,
for backwards compatibility reasons. That will incidentally make it
run /sbin/init, not /linuxrc, unless you pass init=/linuxrc as well.

See SuperRescue for an example of working use of pivot_root.

        -hpa

-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Mar 15 2003 - 22:00:41 EST