[Buildroot] How to login as root without password

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Jul 31 15:17:45 UTC 2013

Dear zhou qiang,

On Wed, 31 Jul 2013 23:03:18 +0800, zhou qiang wrote:

> Of course , if extract rootfs.tar as root , everything works pretty well ,
> busybox login as root .
> But in the server , there is no root permission .
> So the issue is how to login as root without "operation of extract
> rootfs.tar as root".

As Thomas De Schampheleire suggested, you should write a Buildroot
post-build script that copies your application into the root
filesystem, and let Buildroot do the fakeroot game to finally generate
your ready-to-use JFFS2 image.

Another option is to use fakeroot manually outside of Buildroot, but
beware that you have to execute *all* the commands manipulating the
root filesystem under a *single* fakeroot session. Since you apparently
don't fully understand the implications of fakeroot, I'd really suggest
you to use a Buildroot post-build script instead.

Best regards,

Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.

More information about the buildroot mailing list