Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Making a Bootable USB Image for x86_64
@ 2016-08-23  3:11 Jimmy
  2016-08-24 14:41 ` Baruch Siach
  2016-08-24 15:35 ` Jérôme Pouiller
  0 siblings, 2 replies; 4+ messages in thread
From: Jimmy @ 2016-08-23  3:11 UTC (permalink / raw)
  To: buildroot

Greetings all,

I know this has been asked a lot, but I have been sifting through the 
archives and Google in order to find the best way to make a bootable USB 
image of my buildroot installation for an x86 based machine. I have done 
the following:

1. Generated a tar image of the root filesystem via the configuration menu
2. Selected grub2 from bootloaders with the i386-pc platform
3. Created a 1Gb EXT2FS partition with 1mb of space preceding on the USB 
device itself
4. Extracted the rootfs tar to the USB device on the ext2 partition
5. Ran the following from the main buildroot directory (as root):
./output/host/usr/sbin/grub-bios-setup -b 
./output/host/usr/lib/grub/i386-pc/boot.img -c ./output/images/grub.img 
-d . /dev/sdb

The command immediately exits with a "segmentation fault (Core dumped)".
I can assert the following:
a. grub-bios-setup exists in the directory specified.
b. boot.img exists in the directory specified
c. grub.img exists in the directory specified
d. /dev/sdb exists and is the USB device

Has anyone else ran into this? I'm trying to read up all I can on the 
issue but I'm running out of options, and I have a feeling its something 
really simple.

Thank you so much!
-- 
-- Jimmy

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

* [Buildroot] Making a Bootable USB Image for x86_64
  2016-08-23  3:11 [Buildroot] Making a Bootable USB Image for x86_64 Jimmy
@ 2016-08-24 14:41 ` Baruch Siach
  2016-08-24 15:35 ` Jérôme Pouiller
  1 sibling, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2016-08-24 14:41 UTC (permalink / raw)
  To: buildroot

Hi Jimmy,

On Mon, Aug 22, 2016 at 10:11:51PM -0500, Jimmy wrote:
> I know this has been asked a lot, but I have been sifting through the
> archives and Google in order to find the best way to make a bootable USB
> image of my buildroot installation for an x86 based machine. 

I have no experience with grub installation on a USB device. I use extlinux 
(http://www.syslinux.org/wiki/index.php?title=EXTLINUX) for that. You may use 
a minimal extlinux.conf file like

DEFAULT linux
LABEL linux
KERNEL /bzImage
APPEND root=/dev/sdb2

You need to know your rootfs device node in advanced for this to work. 
Otherwise you may use "root=UUID=98f012537-7a7c-2213-819e-a69ddf9abc2b" 
instead, where the UUID comes from the 'blkid' command output.

Hope this helps,
baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

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

* [Buildroot] Making a Bootable USB Image for x86_64
  2016-08-23  3:11 [Buildroot] Making a Bootable USB Image for x86_64 Jimmy
  2016-08-24 14:41 ` Baruch Siach
@ 2016-08-24 15:35 ` Jérôme Pouiller
  2016-08-25 12:25   ` Jimmy at 86Pixels
  1 sibling, 1 reply; 4+ messages in thread
From: Jérôme Pouiller @ 2016-08-24 15:35 UTC (permalink / raw)
  To: buildroot

Hello Jimmy,

On Monday 22 August 2016 22:11:51 Jimmy wrote:
> Greetings all,
> 
> I know this has been asked a lot, but I have been sifting through the
> archives and Google in order to find the best way to make a bootable
> USB image of my buildroot installation for an x86 based machine. I
> have done the following:
> 
> 1. Generated a tar image of the root filesystem via the configuration
> menu 2. Selected grub2 from bootloaders with the i386-pc platform 3.
> Created a 1Gb EXT2FS partition with 1mb of space preceding on the USB
> device itself
> 4. Extracted the rootfs tar to the USB device on the ext2 partition
> 5. Ran the following from the main buildroot directory (as root):
> ./output/host/usr/sbin/grub-bios-setup -b
> ./output/host/usr/lib/grub/i386-pc/boot.img -c
> ./output/images/grub.img -d . /dev/sdb
> 
> The command immediately exits with a "segmentation fault (Core
> dumped)".
hmm... it looks like a snaky x86/x86_64 cross-compilation problem.

Help of grub2 (boot/grub2/Config.in) package provide an alternative way 
to create bootable disk images with grub2. It use genimage instead of 
grub-bios-setup. Let me know if it help.

BR,

-- 
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr

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

* [Buildroot] Making a Bootable USB Image for x86_64
  2016-08-24 15:35 ` Jérôme Pouiller
@ 2016-08-25 12:25   ` Jimmy at 86Pixels
  0 siblings, 0 replies; 4+ messages in thread
From: Jimmy at 86Pixels @ 2016-08-25 12:25 UTC (permalink / raw)
  To: buildroot

On Wed, Aug 24, 2016, at 08:35 AM, J?r?me Pouiller wrote:
> Hello Jimmy,
> 
> On Monday 22 August 2016 22:11:51 Jimmy wrote:
> > Greetings all,
> > 
> > I know this has been asked a lot, but I have been sifting through the
> > archives and Google in order to find the best way to make a bootable
> > USB image of my buildroot installation for an x86 based machine. I
> > have done the following:
> > 
> > 1. Generated a tar image of the root filesystem via the configuration
> > menu 2. Selected grub2 from bootloaders with the i386-pc platform 3.
> > Created a 1Gb EXT2FS partition with 1mb of space preceding on the USB
> > device itself
> > 4. Extracted the rootfs tar to the USB device on the ext2 partition
> > 5. Ran the following from the main buildroot directory (as root):
> > ./output/host/usr/sbin/grub-bios-setup -b
> > ./output/host/usr/lib/grub/i386-pc/boot.img -c
> > ./output/images/grub.img -d . /dev/sdb
> > 
> > The command immediately exits with a "segmentation fault (Core
> > dumped)".
> hmm... it looks like a snaky x86/x86_64 cross-compilation problem.
> 
> Help of grub2 (boot/grub2/Config.in) package provide an alternative way 
> to create bootable disk images with grub2. It use genimage instead of 
> grub-bios-setup. Let me know if it help.
> 
> BR,
> 
> -- 
> J?r?me Pouiller, Sysmic
> Embedded Linux specialist
> http://www.sysmic.fr
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

Thank you both for the advice! I eventually solved this problem by
pulling the latest master branch to include Erico Nunes' kernel EFI
patch which solved the issue!

Thank you all so much again.
Jimmy

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

end of thread, other threads:[~2016-08-25 12:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-23  3:11 [Buildroot] Making a Bootable USB Image for x86_64 Jimmy
2016-08-24 14:41 ` Baruch Siach
2016-08-24 15:35 ` Jérôme Pouiller
2016-08-25 12:25   ` Jimmy at 86Pixels

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox