switch_root...

Mike Frysinger vapier at gentoo.org
Fri Jun 5 20:56:53 UTC 2009


On Friday 05 June 2009 14:54:00 Denys Vlasenko wrote:
> On Thu, Jun 4, 2009 at 4:43 PM, Nickolay Chokoev<nickich at abv.bg> wrote:
> > When I use switch_root I have an error "not rootfs", which comes from the
> > condition !S_ISREG(st1.st_mode). When I remove this condition, all seems
> > to work fine (or at least I think so).
> >
> > What is this check for?
>
> It checks that /init is a file (not a link, not a directory, etc).
>
> > Can it be removed safely?
>
> Depends on how you define "safely".
>
> > What's wrong with my system to break here?
>
> Obviously, you have /init but it's not a file.
>
> To be honest, I myself do not know for sure
> why switch_root thinks it should be on every
> init ramdisk and such. Maybe because of this
> in kernel sources?

but the kernel doesnt care if /init is a symlink ... it works just fine if it 
is since it simply does an exec on it
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20090605/90d5df0e/attachment.pgp>


More information about the busybox mailing list