On Thu, Jun 4, 2009 at 4:43 PM, Nickolay Chokoev<[email protected]> wrote:
> Hi,
>
> 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?
# grep -Fr '"/init' .
./Documentation/early-userspace/README: initrd format, an cpio
archive. It must be called "/init". This binary
./init/initramfs.c: fd = sys_open("/initrd.image",
O_WRONLY|O_CREAT, 0700);
./init/main.c: ramdisk_execute_command = "/init";
...
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox