All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Building bootable usb drive for target board with ext2
@ 2015-06-12 18:20 Patricia Holden
  2015-06-12 19:10 ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Patricia Holden @ 2015-06-12 18:20 UTC (permalink / raw)
  To: buildroot

I'm following examples of how to create a bootable usb for a target board
i'm doing some work for.  I am stuck at setting up grub for booting.  I
can't seem to get buildroot to put the bzImage into /boot directory for
grub to load.  My target ends up hanging.

I'm using latest buildroot via git and just ran "git pull" and rebuilt the
package last night.

Any ideas?

I've attached the .config & boot/grub/menu.lst I'm using.  Perhaps I set
something up incorrectly.

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150612/ea210229/attachment.html>
-------------- next part --------------
default		0
timeout		10

# Used when no splashimage is used
color 		cyan/blue white/blue

# Gets enabled/disabled depending on Grub support for splashimage

# Used when a splashimage is enabled
foreground 	000000
background 	cccccc

title Buildroot
	root (hd0,0)
	kernel /boot/bzImage rw root=/dev/sda1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config
Type: application/octet-stream
Size: 50455 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150612/ea210229/attachment.obj>

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

* [Buildroot] Building bootable usb drive for target board with ext2
  2015-06-12 18:20 [Buildroot] Building bootable usb drive for target board with ext2 Patricia Holden
@ 2015-06-12 19:10 ` Thomas Petazzoni
  2015-06-12 20:04   ` Patricia Holden
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2015-06-12 19:10 UTC (permalink / raw)
  To: buildroot

Dear Patricia Holden,

On Fri, 12 Jun 2015 14:20:59 -0400, Patricia Holden wrote:

> I'm following examples of how to create a bootable usb for a target board
> i'm doing some work for.  I am stuck at setting up grub for booting.  I
> can't seem to get buildroot to put the bzImage into /boot directory for
> grub to load.  My target ends up hanging.

If all you need is to have bzImage installed in /boot, then make sure
to enable BR2_LINUX_KERNEL_INSTALL_TARGET.

However, you have BR2_TARGET_ROOTFS_INITRAMFS=y, which means your
rootfs is inside your kernel image. So it is not possible for your
kernel image to be inside your rootfs!

So if you want to use a rootfs inside the kernel image (using
initramfs), then all you have to do it to build yourself a small
filesystem with just the necessary Grub bits in /boot and the
bzImage.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] Building bootable usb drive for target board with ext2
  2015-06-12 19:10 ` Thomas Petazzoni
@ 2015-06-12 20:04   ` Patricia Holden
  2015-06-12 21:49     ` Patricia Holden
  0 siblings, 1 reply; 9+ messages in thread
From: Patricia Holden @ 2015-06-12 20:04 UTC (permalink / raw)
  To: buildroot

Thanks, I totally forgot I had the BR2_TARGET_ROOTFS_INITRAMFS option in
use.  Guess I'm chasing my tail here.  I just need a very minimal system
that I made a couple linux changes for custom development board, nothing
fancy.  I have no CD to boot from but I do have a 16GB usb drive so I
thought it would be easier for debugging the prototype if the USB is used
to run OS.

On Fri, Jun 12, 2015 at 3:10 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Dear Patricia Holden,
>
> On Fri, 12 Jun 2015 14:20:59 -0400, Patricia Holden wrote:
>
> > I'm following examples of how to create a bootable usb for a target board
> > i'm doing some work for.  I am stuck at setting up grub for booting.  I
> > can't seem to get buildroot to put the bzImage into /boot directory for
> > grub to load.  My target ends up hanging.
>
> If all you need is to have bzImage installed in /boot, then make sure
> to enable BR2_LINUX_KERNEL_INSTALL_TARGET.
>
> However, you have BR2_TARGET_ROOTFS_INITRAMFS=y, which means your
> rootfs is inside your kernel image. So it is not possible for your
> kernel image to be inside your rootfs!
>
> So if you want to use a rootfs inside the kernel image (using
> initramfs), then all you have to do it to build yourself a small
> filesystem with just the necessary Grub bits in /boot and the
> bzImage.
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150612/4fd9421f/attachment.html>

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

* [Buildroot] Building bootable usb drive for target board with ext2
  2015-06-12 20:04   ` Patricia Holden
@ 2015-06-12 21:49     ` Patricia Holden
  2015-06-12 21:51       ` Thomas Petazzoni
  0 siblings, 1 reply; 9+ messages in thread
From: Patricia Holden @ 2015-06-12 21:49 UTC (permalink / raw)
  To: buildroot

Ok, so I'm still not quite out of the woods.  I copied over the boot
directory from output to my usb drive, copied bzImage to usb drive.  It
hangs on target.  Do I need to edit grub files for the usb?  Do I need to
install grub instead of copying?  Sorry for such mundane questions, but I'm
just getting back into the linux world and my mind is a bit foggy.

On Fri, Jun 12, 2015 at 4:04 PM, Patricia Holden <patholdn@gmail.com> wrote:

> Thanks, I totally forgot I had the BR2_TARGET_ROOTFS_INITRAMFS option in
> use.  Guess I'm chasing my tail here.  I just need a very minimal system
> that I made a couple linux changes for custom development board, nothing
> fancy.  I have no CD to boot from but I do have a 16GB usb drive so I
> thought it would be easier for debugging the prototype if the USB is used
> to run OS.
>
> On Fri, Jun 12, 2015 at 3:10 PM, Thomas Petazzoni <
> thomas.petazzoni at free-electrons.com> wrote:
>
>> Dear Patricia Holden,
>>
>> On Fri, 12 Jun 2015 14:20:59 -0400, Patricia Holden wrote:
>>
>> > I'm following examples of how to create a bootable usb for a target
>> board
>> > i'm doing some work for.  I am stuck at setting up grub for booting.  I
>> > can't seem to get buildroot to put the bzImage into /boot directory for
>> > grub to load.  My target ends up hanging.
>>
>> If all you need is to have bzImage installed in /boot, then make sure
>> to enable BR2_LINUX_KERNEL_INSTALL_TARGET.
>>
>> However, you have BR2_TARGET_ROOTFS_INITRAMFS=y, which means your
>> rootfs is inside your kernel image. So it is not possible for your
>> kernel image to be inside your rootfs!
>>
>> So if you want to use a rootfs inside the kernel image (using
>> initramfs), then all you have to do it to build yourself a small
>> filesystem with just the necessary Grub bits in /boot and the
>> bzImage.
>>
>> Best regards,
>>
>> Thomas
>> --
>> Thomas Petazzoni, CTO, Free Electrons
>> Embedded Linux, Kernel and Android engineering
>> http://free-electrons.com
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150612/3f2a203c/attachment.html>

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

* [Buildroot] Building bootable usb drive for target board with ext2
  2015-06-12 21:49     ` Patricia Holden
@ 2015-06-12 21:51       ` Thomas Petazzoni
  2015-06-12 22:00         ` Patricia Holden
  2015-06-12 22:43         ` Patricia Holden
  0 siblings, 2 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2015-06-12 21:51 UTC (permalink / raw)
  To: buildroot

Dear Patricia Holden,

On Fri, 12 Jun 2015 17:49:57 -0400, Patricia Holden wrote:

> Ok, so I'm still not quite out of the woods.  I copied over the boot
> directory from output to my usb drive, copied bzImage to usb drive.  It
> hangs on target.  Do I need to edit grub files for the usb?  Do I need to
> install grub instead of copying?  Sorry for such mundane questions, but I'm
> just getting back into the linux world and my mind is a bit foggy.

You need to install grub on your USB drive. See the instructions in the
grub option help text, also visible at:

  http://git.buildroot.net/buildroot/tree/boot/grub/Config.in#n8

The instructions are done on a disk image, but it can be done directly
on a real drive in a similar way.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] Building bootable usb drive for target board with ext2
  2015-06-12 21:51       ` Thomas Petazzoni
@ 2015-06-12 22:00         ` Patricia Holden
  2015-06-12 22:43         ` Patricia Holden
  1 sibling, 0 replies; 9+ messages in thread
From: Patricia Holden @ 2015-06-12 22:00 UTC (permalink / raw)
  To: buildroot

I did read the help instructions for both grub & grub2 but wasn't sure if
it would translate to the USB.  I'll see what I can do, thank you so much!

On Fri, Jun 12, 2015 at 5:51 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Dear Patricia Holden,
>
> On Fri, 12 Jun 2015 17:49:57 -0400, Patricia Holden wrote:
>
> > Ok, so I'm still not quite out of the woods.  I copied over the boot
> > directory from output to my usb drive, copied bzImage to usb drive.  It
> > hangs on target.  Do I need to edit grub files for the usb?  Do I need to
> > install grub instead of copying?  Sorry for such mundane questions, but
> I'm
> > just getting back into the linux world and my mind is a bit foggy.
>
> You need to install grub on your USB drive. See the instructions in the
> grub option help text, also visible at:
>
>   http://git.buildroot.net/buildroot/tree/boot/grub/Config.in#n8
>
> The instructions are done on a disk image, but it can be done directly
> on a real drive in a similar way.
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150612/22c93240/attachment.html>

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

* [Buildroot] Building bootable usb drive for target board with ext2
  2015-06-12 21:51       ` Thomas Petazzoni
  2015-06-12 22:00         ` Patricia Holden
@ 2015-06-12 22:43         ` Patricia Holden
  2015-06-13  1:26           ` Patricia Holden
  1 sibling, 1 reply; 9+ messages in thread
From: Patricia Holden @ 2015-06-12 22:43 UTC (permalink / raw)
  To: buildroot

I copied the boot directory to the USB after extracting it from rootfs.tar,
copied bzImage to /boot, and  successfully got grub onto the USB device
following the grub help instructions.  Then I moved the USB to my target
and powered it up.  The grub prompt came up (yay, one step further!).  I
tried to boot or reboot but it says my kernel is missing.  Is there
something else I'm missing in my config file for buildroot?  do I need to
give grub special kernel instructions?

On Fri, Jun 12, 2015 at 5:51 PM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Dear Patricia Holden,
>
> On Fri, 12 Jun 2015 17:49:57 -0400, Patricia Holden wrote:
>
> > Ok, so I'm still not quite out of the woods.  I copied over the boot
> > directory from output to my usb drive, copied bzImage to usb drive.  It
> > hangs on target.  Do I need to edit grub files for the usb?  Do I need to
> > install grub instead of copying?  Sorry for such mundane questions, but
> I'm
> > just getting back into the linux world and my mind is a bit foggy.
>
> You need to install grub on your USB drive. See the instructions in the
> grub option help text, also visible at:
>
>   http://git.buildroot.net/buildroot/tree/boot/grub/Config.in#n8
>
> The instructions are done on a disk image, but it can be done directly
> on a real drive in a similar way.
>
> Best regards,
>
> Thomas
> --
> Thomas Petazzoni, CTO, Free Electrons
> Embedded Linux, Kernel and Android engineering
> http://free-electrons.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150612/8d12a5ca/attachment.html>

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

* [Buildroot] Building bootable usb drive for target board with ext2
  2015-06-12 22:43         ` Patricia Holden
@ 2015-06-13  1:26           ` Patricia Holden
  2015-06-13  3:31             ` Patricia Holden
  0 siblings, 1 reply; 9+ messages in thread
From: Patricia Holden @ 2015-06-13  1:26 UTC (permalink / raw)
  To: buildroot

I'm getting nowhere fast.  I try running kernel command once on the target
but bzImage fails with "Error 17: Cannot mount seected partition".  Guess
I'm back to square run trying to get this thing working.

On Fri, Jun 12, 2015 at 6:43 PM, Patricia Holden <patholdn@gmail.com> wrote:

> I copied the boot directory to the USB after extracting it from
> rootfs.tar, copied bzImage to /boot, and  successfully got grub onto the
> USB device following the grub help instructions.  Then I moved the USB to
> my target and powered it up.  The grub prompt came up (yay, one step
> further!).  I tried to boot or reboot but it says my kernel is missing.  Is
> there something else I'm missing in my config file for buildroot?  do I
> need to give grub special kernel instructions?
>
> On Fri, Jun 12, 2015 at 5:51 PM, Thomas Petazzoni <
> thomas.petazzoni at free-electrons.com> wrote:
>
>> Dear Patricia Holden,
>>
>> On Fri, 12 Jun 2015 17:49:57 -0400, Patricia Holden wrote:
>>
>> > Ok, so I'm still not quite out of the woods.  I copied over the boot
>> > directory from output to my usb drive, copied bzImage to usb drive.  It
>> > hangs on target.  Do I need to edit grub files for the usb?  Do I need
>> to
>> > install grub instead of copying?  Sorry for such mundane questions, but
>> I'm
>> > just getting back into the linux world and my mind is a bit foggy.
>>
>> You need to install grub on your USB drive. See the instructions in the
>> grub option help text, also visible at:
>>
>>   http://git.buildroot.net/buildroot/tree/boot/grub/Config.in#n8
>>
>> The instructions are done on a disk image, but it can be done directly
>> on a real drive in a similar way.
>>
>> Best regards,
>>
>> Thomas
>> --
>> Thomas Petazzoni, CTO, Free Electrons
>> Embedded Linux, Kernel and Android engineering
>> http://free-electrons.com
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150612/336293fc/attachment.html>

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

* [Buildroot] Building bootable usb drive for target board with ext2
  2015-06-13  1:26           ` Patricia Holden
@ 2015-06-13  3:31             ` Patricia Holden
  0 siblings, 0 replies; 9+ messages in thread
From: Patricia Holden @ 2015-06-13  3:31 UTC (permalink / raw)
  To: buildroot

Good news!  I got it booting bzImage using extlinux following the recipe in
the following site (if anyone else would like to use this method):

https://agentoss.wordpress.com/2011/02/28/how-to-create-a-bootable-linux-usb-drive-using-extlinux/

I've got to tweak a few things, but looking good finally.

Thanks for pointing me in the right direction!

On Fri, Jun 12, 2015 at 9:26 PM, Patricia Holden <patholdn@gmail.com> wrote:

> I'm getting nowhere fast.  I try running kernel command once on the target
> but bzImage fails with "Error 17: Cannot mount seected partition".  Guess
> I'm back to square run trying to get this thing working.
>
> On Fri, Jun 12, 2015 at 6:43 PM, Patricia Holden <patholdn@gmail.com>
> wrote:
>
>> I copied the boot directory to the USB after extracting it from
>> rootfs.tar, copied bzImage to /boot, and  successfully got grub onto the
>> USB device following the grub help instructions.  Then I moved the USB to
>> my target and powered it up.  The grub prompt came up (yay, one step
>> further!).  I tried to boot or reboot but it says my kernel is missing.  Is
>> there something else I'm missing in my config file for buildroot?  do I
>> need to give grub special kernel instructions?
>>
>> On Fri, Jun 12, 2015 at 5:51 PM, Thomas Petazzoni <
>> thomas.petazzoni at free-electrons.com> wrote:
>>
>>> Dear Patricia Holden,
>>>
>>> On Fri, 12 Jun 2015 17:49:57 -0400, Patricia Holden wrote:
>>>
>>> > Ok, so I'm still not quite out of the woods.  I copied over the boot
>>> > directory from output to my usb drive, copied bzImage to usb drive.  It
>>> > hangs on target.  Do I need to edit grub files for the usb?  Do I need
>>> to
>>> > install grub instead of copying?  Sorry for such mundane questions,
>>> but I'm
>>> > just getting back into the linux world and my mind is a bit foggy.
>>>
>>> You need to install grub on your USB drive. See the instructions in the
>>> grub option help text, also visible at:
>>>
>>>   http://git.buildroot.net/buildroot/tree/boot/grub/Config.in#n8
>>>
>>> The instructions are done on a disk image, but it can be done directly
>>> on a real drive in a similar way.
>>>
>>> Best regards,
>>>
>>> Thomas
>>> --
>>> Thomas Petazzoni, CTO, Free Electrons
>>> Embedded Linux, Kernel and Android engineering
>>> http://free-electrons.com
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20150612/a647cc06/attachment.html>

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

end of thread, other threads:[~2015-06-13  3:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12 18:20 [Buildroot] Building bootable usb drive for target board with ext2 Patricia Holden
2015-06-12 19:10 ` Thomas Petazzoni
2015-06-12 20:04   ` Patricia Holden
2015-06-12 21:49     ` Patricia Holden
2015-06-12 21:51       ` Thomas Petazzoni
2015-06-12 22:00         ` Patricia Holden
2015-06-12 22:43         ` Patricia Holden
2015-06-13  1:26           ` Patricia Holden
2015-06-13  3:31             ` Patricia Holden

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.