All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Unable to boot via initrd
@ 2012-07-10 21:24 Bart J. Smit
  2012-07-10 22:30 ` Arnout Vandecappelle
  0 siblings, 1 reply; 11+ messages in thread
From: Bart J. Smit @ 2012-07-10 21:24 UTC (permalink / raw)
  To: buildroot

Another buildroot newbie looking at this. I'm looking to create a PXE boot for generic x86.

I've created the initial ramdisk with:
 mount -o loop rootfs.ext2 ../initrd
 cd ../initrd
 find . | cpio -o -H newc | gzip > ../initrd.img

When I PXE boot the client, it gets to:
  VFS Cannot open root device, please append a correct root= boot option; here are the available partitions
  Kernel panic - not syncing: VFS; Unable to mount root fs on unknown-block(2,0)

From what I can google, this seems to be a popular use for small builds such as buildroot. Do any of the gurus on this list have a recipe to achieve a PXE boot image?

Thanks,

Bart...
  

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Unable to boot via initrd
  2012-07-10 21:24 [Buildroot] Unable to boot via initrd Bart J. Smit
@ 2012-07-10 22:30 ` Arnout Vandecappelle
  2012-07-11 13:54   ` Bart J. Smit
  0 siblings, 1 reply; 11+ messages in thread
From: Arnout Vandecappelle @ 2012-07-10 22:30 UTC (permalink / raw)
  To: buildroot

On 07/10/12 23:24, Bart J. Smit wrote:
> Another buildroot newbie looking at this. I'm looking to create a PXE boot for generic x86.
>
> I've created the initial ramdisk with:
>   mount -o loop rootfs.ext2 ../initrd
>   cd ../initrd
>   find . | cpio -o -H newc | gzip>  ../initrd.img

  An easier way to create the initrd is to choose the CPIO image from the
buildroot menuconfig.

> When I PXE boot the client, it gets to:
>    VFS Cannot open root device, please append a correct root= boot option; here are the available partitions
>    Kernel panic - not syncing: VFS; Unable to mount root fs on unknown-block(2,0)

  Does the kernel have support for gzipped initramfs?  Do you give a root= option
on the kernel command line?  (Shouldn't be necessary, since your initramfs is the
final root filesystem.)


  Regards,
  Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Unable to boot via initrd
  2012-07-10 22:30 ` Arnout Vandecappelle
@ 2012-07-11 13:54   ` Bart J. Smit
  0 siblings, 0 replies; 11+ messages in thread
From: Bart J. Smit @ 2012-07-11 13:54 UTC (permalink / raw)
  To: buildroot

Hi Arnout,

That fixed it and it no longer needs the external compression of the root filesystem. These steps did the trick:

make menuconfig
Filesystem images --->
Only select 'initramfs for initial ramdisk of linux kernel'

This sets it to gzipped cpio automagically.

Bedankt!

Bart...

-----Original Message-----
From: Arnout Vandecappelle [mailto:arnout at mind.be] 
Sent: 10 July 2012 23:30
To: Bart J. Smit
Cc: 'buildroot at busybox.net'
Subject: Re: [Buildroot] Unable to boot via initrd

On 07/10/12 23:24, Bart J. Smit wrote:
> Another buildroot newbie looking at this. I'm looking to create a PXE boot for generic x86.
>
> I've created the initial ramdisk with:
>   mount -o loop rootfs.ext2 ../initrd
>   cd ../initrd
>   find . | cpio -o -H newc | gzip>  ../initrd.img

  An easier way to create the initrd is to choose the CPIO image from the buildroot menuconfig.

> When I PXE boot the client, it gets to:
>    VFS Cannot open root device, please append a correct root= boot option; here are the available partitions
>    Kernel panic - not syncing: VFS; Unable to mount root fs on 
> unknown-block(2,0)

  Does the kernel have support for gzipped initramfs?  Do you give a root= option on the kernel command line?  (Shouldn't be necessary, since your initramfs is the final root filesystem.)


  Regards,
  Arnout

-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Unable to boot via initrd
  2013-09-04 11:38       ` Matthieu
@ 2013-09-04 11:53         ` Matthieu
  0 siblings, 0 replies; 11+ messages in thread
From: Matthieu @ 2013-09-04 11:53 UTC (permalink / raw)
  To: buildroot

I am sorry, I have just test the solution 2) and it works now. Maybe I was
not clean enough by doing not a systematic rebuild ("make clean").

All is fine.

Thanks

regards

Matthieu



--
View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/Unable-to-boot-via-initrd-tp50517p50677.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Unable to boot via initrd
  2013-09-04  7:50     ` Thomas Petazzoni
@ 2013-09-04 11:38       ` Matthieu
  2013-09-04 11:53         ` Matthieu
  0 siblings, 1 reply; 11+ messages in thread
From: Matthieu @ 2013-09-04 11:38 UTC (permalink / raw)
  To: buildroot

Dear Thomas and  Arnout,

first I want to thank you for your understanding. I come back to the linux
world after 10 years and I feel rusted.

So:

1) in the root of the filesystem there is a symlink to /sbin/init.

2) I noticed the solution 2 of my first post do not work:
BR2_TARGET_ROOTFS_CPIO=y and BR2_TARGET_ROOTFS_INITRAMFS disabled. When I
run:

kvm -kernel output/images/bzImage -initrd output/images/rootfs.cpio.bz2

I obtain:  VFS: Cannot open root device "(null)" .... error -6 ... 

is there a solution?

regards

Matthieu



--
View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/Unable-to-boot-via-initrd-tp50517p50675.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Unable to boot via initrd
  2013-09-03 22:41   ` Matthieu
@ 2013-09-04  7:50     ` Thomas Petazzoni
  2013-09-04 11:38       ` Matthieu
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2013-09-04  7:50 UTC (permalink / raw)
  To: buildroot

Dear Matthieu,

On Tue, 3 Sep 2013 15:41:50 -0700 (PDT), Matthieu wrote:

> I have checked also if the /root directory contains an init file. I
> do not find the init file.

I know it might have been confusing, but Arnout said the "root
directory", not the "/root directory". The root directory is the root
of the filesystem, i.e what becomes "/" on the target system, or what
is output/target/ in the Buildroot output directory.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Unable to boot via initrd
  2013-09-03 16:11 ` Arnout Vandecappelle
@ 2013-09-03 22:41   ` Matthieu
  2013-09-04  7:50     ` Thomas Petazzoni
  0 siblings, 1 reply; 11+ messages in thread
From: Matthieu @ 2013-09-03 22:41 UTC (permalink / raw)
  To: buildroot

Dear Arnout,

I have just tried the command:
kvm -kernel output/images/bzImage
 
without the -initrd option and it works fine.

Thanks a lot!

I have checked also if the /root directory contains an init file. I do not
find the init file.
 I checked  in the /output/images/rootfs.cpio.bz2 archive. And I found the
only three following files:
- .bash_history
-.bash_logout
-.bash_profile

with best regards

Matthieu




--
View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/Unable-to-boot-via-initrd-tp50517p50638.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Unable to boot via initrd
  2013-09-02 19:06 Matthieu
@ 2013-09-03 16:11 ` Arnout Vandecappelle
  2013-09-03 22:41   ` Matthieu
  0 siblings, 1 reply; 11+ messages in thread
From: Arnout Vandecappelle @ 2013-09-03 16:11 UTC (permalink / raw)
  To: buildroot

On 09/02/13 21:06, Matthieu wrote:
> Hello,
>
>
> I have just installed the 2013-08 version of buildroot and I do not succed
> to boot via initrd.
> I tried two solutions (described in the previous post "Creating initrd")
> through the gui menuconfig. And neither solution seems succeed.
>
> When I run:
>
> 1) for the solultion 1 (BR2_TARGET_ROOTFS_INITRAMFS=y)
> kvm -kernel output/images/bzImage -initrd output/images/rootfs.cpio.bz2 -m
> 128

  With the initramfs option, the -initrd parameter shouldn't be needed. 
On the other hand, it shouldn't hurt either...

>
> 2) for the solution 2: (BR2_TARGET_ROOTFS_CPIO=y)
> kvm -kernel output/images/bzImage -initrd output/images/rootfs.cpio.bz2
> -initrd output/images/rootfs.cpio.bz2 -m 128

  Specifying the same initrd twice will not help much :-)

>
> I always obtain:
> VFS: Cannot open root device "(null)" .... error -6 ...
> Please append a coorect "root)" boot option; here are the available
> partitions: Kernel panic ....VFS: Unable to mount root fs on
> unknown-block(0,0)

  That's weird... With either initrd, you should never get to mounting of 
rootfs. Can you check that the rootfs contains a script called "init" in 
the root directory, that is either a symlink to /sbin/init or is a script 
that does "exec /sbin/init" at the end?


  Regards,
  Arnout

>
>
> Please can you help me?
>
> regards
>
> Matthieu
>
>
>
> --
> View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/Unable-to-boot-via-initrd-tp50517.html
> Sent from the Buildroot (busybox) mailing list archive at Nabble.com.
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Unable to boot via initrd
@ 2013-09-02 19:06 Matthieu
  2013-09-03 16:11 ` Arnout Vandecappelle
  0 siblings, 1 reply; 11+ messages in thread
From: Matthieu @ 2013-09-02 19:06 UTC (permalink / raw)
  To: buildroot

Hello,


I have just installed the 2013-08 version of buildroot and I do not succed
to boot via initrd.
I tried two solutions (described in the previous post "Creating initrd")
through the gui menuconfig. And neither solution seems succeed.

When I run:

1) for the solultion 1 (BR2_TARGET_ROOTFS_INITRAMFS=y)
kvm -kernel output/images/bzImage -initrd output/images/rootfs.cpio.bz2 -m
128

2) for the solution 2: (BR2_TARGET_ROOTFS_CPIO=y)
kvm -kernel output/images/bzImage -initrd output/images/rootfs.cpio.bz2
-initrd output/images/rootfs.cpio.bz2 -m 128

I always obtain:
VFS: Cannot open root device "(null)" .... error -6 ...
Please append a coorect "root)" boot option; here are the available
partitions: Kernel panic ....VFS: Unable to mount root fs on
unknown-block(0,0)


Please can you help me?

regards

Matthieu



--
View this message in context: http://buildroot-busybox.2317881.n4.nabble.com/Unable-to-boot-via-initrd-tp50517.html
Sent from the Buildroot (busybox) mailing list archive at Nabble.com.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Unable to boot via initrd
  2012-01-11  9:02 Paul Kuntke
@ 2012-01-11 14:04 ` Michael S. Zick
  0 siblings, 0 replies; 11+ messages in thread
From: Michael S. Zick @ 2012-01-11 14:04 UTC (permalink / raw)
  To: buildroot

On Wed January 11 2012, Paul Kuntke wrote:
> Hi to all,
> I'm very new to buildroot and building Initrds and I would like to set up a
> minimalistic environment for booting PCs (i386) over PXE. 
> 
> For this I would like to set up a Kernel and an initrd as System-Filesystem.
> After everything was build fine I wanted to test the environment. But every
> tries ended in a Kernel-Panic moaning about no /init to find. I've also tried
> to set the "init" kernel-parameter to /bin/busybox. But even then it is not
> able to start /bin/busybox. 
> 
> As testing environment I tried qemu as well as some real PCs with syslinux
> over PXE. 
> 
> Kernel-Parameters I've tried: "root=/dev/ram init=/init" 
>

Try: rdinit=/bin/sh (or rdinit=/bin/bash) -
One or the other should be there, either in person or by a sym-link to BB.

That should give you an interactive shell, after early user-space is loaded,
but before anything of its scripting is executed.

You probably will not get far until you mount /proc and /sys ;-)

If your Busybox isn't optioned as a standalone shell and the application
links do not pre-exit, use the direct access:
'/bin/busybox ap-name options' form (such as for 'mount' command).

With /proc and /sys mounted...

If BB isn't configured as a stand-alone shell, and the application links
do not pre-exist, the links can be populated with:
/bin/busybox --install
(You may need to make /sbin, /usr/bin, /usr/sbin - depending on your image.)

If the image and kernel wasn't optioned to populate /dev @ devtmpfs, and you
have mdev available (and /sys mounted), you can populate that with:
mdev -s

At which point you should have a fairly functional, ram resident, shell
and tool environment with which to discover what is going wrong.

Mike
> As Initrd I tried to use the bzImage with the build in initrd-image as well as
> the rootfs.cpio.bz2 or rootfs.cpio.
> 
> Do I have to set some special Kernel-Params or do I have to set some special
> options in the buildroot config?
> 
> Thanks,
>  Paul
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Buildroot] Unable to boot via initrd
@ 2012-01-11  9:02 Paul Kuntke
  2012-01-11 14:04 ` Michael S. Zick
  0 siblings, 1 reply; 11+ messages in thread
From: Paul Kuntke @ 2012-01-11  9:02 UTC (permalink / raw)
  To: buildroot

Hi to all,
I'm very new to buildroot and building Initrds and I would like to set up a
minimalistic environment for booting PCs (i386) over PXE. 

For this I would like to set up a Kernel and an initrd as System-Filesystem.
After everything was build fine I wanted to test the environment. But every
tries ended in a Kernel-Panic moaning about no /init to find. I've also tried
to set the "init" kernel-parameter to /bin/busybox. But even then it is not
able to start /bin/busybox. 

As testing environment I tried qemu as well as some real PCs with syslinux
over PXE. 

Kernel-Parameters I've tried: "root=/dev/ram init=/init" 
As Initrd I tried to use the bzImage with the build in initrd-image as well as
the rootfs.cpio.bz2 or rootfs.cpio.

Do I have to set some special Kernel-Params or do I have to set some special
options in the buildroot config?

Thanks,
 Paul

-- 
Paul Kuntke <paul@42degreesoffreedom.com>

Jabber-ID: paul at 42degreesoffreedom.com

This Mail is signed via gpg. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120111/d6931a46/attachment.asc>

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-09-04 11:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-10 21:24 [Buildroot] Unable to boot via initrd Bart J. Smit
2012-07-10 22:30 ` Arnout Vandecappelle
2012-07-11 13:54   ` Bart J. Smit
  -- strict thread matches above, loose matches on Subject: below --
2013-09-02 19:06 Matthieu
2013-09-03 16:11 ` Arnout Vandecappelle
2013-09-03 22:41   ` Matthieu
2013-09-04  7:50     ` Thomas Petazzoni
2013-09-04 11:38       ` Matthieu
2013-09-04 11:53         ` Matthieu
2012-01-11  9:02 Paul Kuntke
2012-01-11 14:04 ` Michael S. Zick

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.