* Multiple partitions in drive image
@ 2012-10-12 21:42 Jonathan Haws
2012-10-12 22:13 ` Rudolf Streif
2012-10-15 6:59 ` Joshua Immanuel
0 siblings, 2 replies; 8+ messages in thread
From: Jonathan Haws @ 2012-10-12 21:42 UTC (permalink / raw)
To: yocto@yoctoproject.org
What I am trying to do is have Poky build me an image that I can just 'dd' to a SSD and hook up to the system to boot. Since that image will also only be only ~250MB or so, I would like to have Poky generate an image containing multiple partitions - a small one containing the boot files, then the rest of the image dedicated to storage. Is that possible?
Is there a better way to go about this? Once I have my images built (hddimg, ext3, cpio.gz, iso) how are those typically put onto a disk drive for use on hardware? Most BSPs I have looked at use 'dd', but I am guessing there is a better way...
Thanks!
Jonathan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Multiple partitions in drive image
2012-10-12 21:42 Multiple partitions in drive image Jonathan Haws
@ 2012-10-12 22:13 ` Rudolf Streif
2012-10-12 22:18 ` Jonathan Haws
2012-10-15 6:59 ` Joshua Immanuel
1 sibling, 1 reply; 8+ messages in thread
From: Rudolf Streif @ 2012-10-12 22:13 UTC (permalink / raw)
To: Jonathan Haws; +Cc: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 300 bytes --]
Jonathan,
For what hardware are you building? It depends on the hardware how you need
to layout the file system on the boot device. YP provides you with a kernel
image and a root file system image and eventually, dependent on the
hardware, with bootloaders in ${TMPDIR}/deploy/images.
Rudi
[-- Attachment #2: Type: text/html, Size: 343 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Multiple partitions in drive image
2012-10-12 22:13 ` Rudolf Streif
@ 2012-10-12 22:18 ` Jonathan Haws
0 siblings, 0 replies; 8+ messages in thread
From: Jonathan Haws @ 2012-10-12 22:18 UTC (permalink / raw)
To: Rudolf Streif; +Cc: yocto@yoctoproject.org
This is for an ADLGS45 board from Advanced Digital Logic. It has a Core2 Duo with an Intel GS45 chipset. I have the kernel and everything booting just find using the hddimg file generated (and found in tmp/deploy/images), however that is wasting a lot of space on that drive, since the image is only 250MB (and the drive is 120GB).
If I can avoid going through the hassle of installing GRUB and copying over the root FS (i.e. wrap it into a single 'dd' command) that would be ideal because eventually this will be turned over to a tech who knows nothing about GRUB or anything else and just (somewhat) follows a manual.
Thanks,
Jonathan
________________________________
From: rstreif@linuxfoundation.org [rstreif@linuxfoundation.org] on behalf of Rudolf Streif [rudolf.streif@linux.com]
Sent: Friday, October 12, 2012 16:13
To: Jonathan Haws
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] Multiple partitions in drive image
Jonathan,
For what hardware are you building? It depends on the hardware how you need to layout the file system on the boot device. YP provides you with a kernel image and a root file system image and eventually, dependent on the hardware, with bootloaders in ${TMPDIR}/deploy/images.
Rudi
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Multiple partitions in drive image
2012-10-12 21:42 Multiple partitions in drive image Jonathan Haws
2012-10-12 22:13 ` Rudolf Streif
@ 2012-10-15 6:59 ` Joshua Immanuel
2012-10-15 14:56 ` Jonathan Haws
2012-10-15 19:19 ` Mark Hatle
1 sibling, 2 replies; 8+ messages in thread
From: Joshua Immanuel @ 2012-10-15 6:59 UTC (permalink / raw)
To: Jonathan Haws; +Cc: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 1316 bytes --]
Hello Jonathan,
On Fri, 2012-10-12 at 21:42 +0000, Jonathan Haws wrote:
> What I am trying to do is have Poky build me an image that I can just
> 'dd' to a SSD and hook up to the system to boot. Since that image
> will also only be only ~250MB or so, I would like to have Poky
> generate an image containing multiple partitions - a small one
> containing the boot files, then the rest of the image dedicated to
> storage. Is that possible?
Yes. It is possible. I have done the following in order to generate
image with multiple partitions.
1. I wrote a custom image_types.bbclass in order to generate
multiple partition images (say /, /var etc)
2. Wrote a bbappend for base-files recipe to generate custom fstab
file with required partition's mount options
3. Extended grub-native recipe to generate core.img and boot.img
using grub-mkimage for target platform
4. Wrote a python task to join all these generated images (boot,
core and filesystem images) and embedded the partition table
structure into it.
5. Added this task to my image recipe after the 'do_rootfs' task
This way we can generate a custom image with the required partitions.
--
Joshua Immanuel
HiPro IT Solutions Private Limited
http://hipro.co.in
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Multiple partitions in drive image
2012-10-15 6:59 ` Joshua Immanuel
@ 2012-10-15 14:56 ` Jonathan Haws
2012-10-15 19:19 ` Mark Hatle
1 sibling, 0 replies; 8+ messages in thread
From: Jonathan Haws @ 2012-10-15 14:56 UTC (permalink / raw)
To: Joshua Immanuel; +Cc: yocto@yoctoproject.org
On Fri, 2012-10-12 at 21:42 +0000, Jonathan Haws wrote:
> What I am trying to do is have Poky build me an image that I can just
> 'dd' to a SSD and hook up to the system to boot. Since that image
> will also only be only ~250MB or so, I would like to have Poky
> generate an image containing multiple partitions - a small one
> containing the boot files, then the rest of the image dedicated to
> storage. Is that possible?
Yes. It is possible. I have done the following in order to generate
image with multiple partitions.
1. I wrote a custom image_types.bbclass in order to generate
multiple partition images (say /, /var etc)
2. Wrote a bbappend for base-files recipe to generate custom fstab
file with required partition's mount options
3. Extended grub-native recipe to generate core.img and boot.img
using grub-mkimage for target platform
4. Wrote a python task to join all these generated images (boot,
core and filesystem images) and embedded the partition table
structure into it.
5. Added this task to my image recipe after the 'do_rootfs' task
This way we can generate a custom image with the required partitions.
-------------------------------------------------------
Awesome, I will take a look at this.
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: Multiple partitions in drive image
2012-10-15 6:59 ` Joshua Immanuel
2012-10-15 14:56 ` Jonathan Haws
@ 2012-10-15 19:19 ` Mark Hatle
2012-10-15 19:31 ` Gary Thomas
2012-10-16 6:48 ` Joshua Immanuel
1 sibling, 2 replies; 8+ messages in thread
From: Mark Hatle @ 2012-10-15 19:19 UTC (permalink / raw)
To: yocto
On 10/15/12 1:59 AM, Joshua Immanuel wrote:
> Hello Jonathan,
>
> On Fri, 2012-10-12 at 21:42 +0000, Jonathan Haws wrote:
>> What I am trying to do is have Poky build me an image that I can just
>> 'dd' to a SSD and hook up to the system to boot. Since that image
>> will also only be only ~250MB or so, I would like to have Poky
>> generate an image containing multiple partitions - a small one
>> containing the boot files, then the rest of the image dedicated to
>> storage. Is that possible?
>
> Yes. It is possible. I have done the following in order to generate
> image with multiple partitions.
>
> 1. I wrote a custom image_types.bbclass in order to generate
> multiple partition images (say /, /var etc)
> 2. Wrote a bbappend for base-files recipe to generate custom fstab
> file with required partition's mount options
> 3. Extended grub-native recipe to generate core.img and boot.img
> using grub-mkimage for target platform
> 4. Wrote a python task to join all these generated images (boot,
> core and filesystem images) and embedded the partition table
> structure into it.
> 5. Added this task to my image recipe after the 'do_rootfs' task
>
> This way we can generate a custom image with the required partitions.
>
Recently a we've been talking about how we could do this. Specifically how to
construct a disk image that can just be DD'ed including bootloader, partitioning
and multiple partitions.
Is the code you used for the dynamic fstab, partition map, and bootloader setup
and image creation available anywhere?
I expect it isn't too difficult to create, but if there is something to start
with it would be useful.
--Mark
>
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Multiple partitions in drive image
2012-10-15 19:19 ` Mark Hatle
@ 2012-10-15 19:31 ` Gary Thomas
2012-10-16 6:48 ` Joshua Immanuel
1 sibling, 0 replies; 8+ messages in thread
From: Gary Thomas @ 2012-10-15 19:31 UTC (permalink / raw)
To: yocto
On 2012-10-15 13:19, Mark Hatle wrote:
> On 10/15/12 1:59 AM, Joshua Immanuel wrote:
>> Hello Jonathan,
>>
>> On Fri, 2012-10-12 at 21:42 +0000, Jonathan Haws wrote:
>>> What I am trying to do is have Poky build me an image that I can just
>>> 'dd' to a SSD and hook up to the system to boot. Since that image
>>> will also only be only ~250MB or so, I would like to have Poky
>>> generate an image containing multiple partitions - a small one
>>> containing the boot files, then the rest of the image dedicated to
>>> storage. Is that possible?
>>
>> Yes. It is possible. I have done the following in order to generate
>> image with multiple partitions.
>>
>> 1. I wrote a custom image_types.bbclass in order to generate
>> multiple partition images (say /, /var etc)
>> 2. Wrote a bbappend for base-files recipe to generate custom fstab
>> file with required partition's mount options
>> 3. Extended grub-native recipe to generate core.img and boot.img
>> using grub-mkimage for target platform
>> 4. Wrote a python task to join all these generated images (boot,
>> core and filesystem images) and embedded the partition table
>> structure into it.
>> 5. Added this task to my image recipe after the 'do_rootfs' task
>>
>> This way we can generate a custom image with the required partitions.
>>
>
> Recently a we've been talking about how we could do this. Specifically how to construct a disk image that can just be DD'ed including bootloader, partitioning and multiple
> partitions.
>
> Is the code you used for the dynamic fstab, partition map, and bootloader setup and image creation available anywhere?
>
> I expect it isn't too difficult to create, but if there is something to start with it would be useful.
There are a lot of examples for this - try looking at meta-fsl-arm
it supports a 'sdcard' image type which is what you are looking for.
git:://github.com/Freescale/meta-fsl-arm.git
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Multiple partitions in drive image
2012-10-15 19:19 ` Mark Hatle
2012-10-15 19:31 ` Gary Thomas
@ 2012-10-16 6:48 ` Joshua Immanuel
1 sibling, 0 replies; 8+ messages in thread
From: Joshua Immanuel @ 2012-10-16 6:48 UTC (permalink / raw)
To: Mark Hatle; +Cc: yocto
[-- Attachment #1: Type: text/plain, Size: 548 bytes --]
Hello Mark,
On Mon, 2012-10-15 at 14:19 -0500, Mark Hatle wrote:
> Is the code you used for the dynamic fstab, partition map, and
> bootloader setup and image creation available anywhere?
>
> I expect it isn't too difficult to create, but if there is something
> to start with it would be useful.
My layer contains parts which I cannot put on the Internet. Give me a
few days I'll split out those parts, make an usable example and put them
up somewhere.
--
Joshua Immanuel
HiPro IT Solutions Private Limited
http://hipro.co.in
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 205 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-10-16 6:48 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-12 21:42 Multiple partitions in drive image Jonathan Haws
2012-10-12 22:13 ` Rudolf Streif
2012-10-12 22:18 ` Jonathan Haws
2012-10-15 6:59 ` Joshua Immanuel
2012-10-15 14:56 ` Jonathan Haws
2012-10-15 19:19 ` Mark Hatle
2012-10-15 19:31 ` Gary Thomas
2012-10-16 6:48 ` Joshua Immanuel
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.