Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 May 2014 15:23:58 -0600
From:      Dan McGregor <danismostlikely@gmail.com>
To:        Marcel Moolenaar <marcelm@juniper.net>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, Alan Somers <asomers@freebsd.org>
Subject:   Re: Patch to tech mkimg about the TMPDIR variable
Message-ID:  <CACS%2B7ZQi6Bj7ybZhTtYTdGUt6vRw%2B3W56HZPJFjk1x4dpqXtPA@mail.gmail.com>
In-Reply-To: <CFA3AF75.2D2BA%marcelm@juniper.net>
References:  <CACS%2B7ZS8W22Tsnz1BtwT2=2x6Hi9zumpNByF31Vyt%2Bt6QtdkuA@mail.gmail.com> <CFA3AF75.2D2BA%marcelm@juniper.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On 22 May 2014 14:45, Marcel Moolenaar <marcelm@juniper.net> wrote:
> On 5/22/14, 1:33 PM, "Dan McGregor" <danismostlikely@gmail.com> wrote:
>
>>On 22 May 2014 14:27, Marcel Moolenaar <marcelm@juniper.net> wrote:
>>> On 5/22/14, 1:18 PM, "Marcel Moolenaar" <marcelm@juniper.net> wrote:
>>>>>
>>>>>The next itch I want to scratch is a way to set the active partition
>>>>>on an MBR image.
>>>>
>>>>I thought I made the first partition active by default.
>>>>I guess not=E2=80=A6
>>>
>>> Yes, I did!
>>>
>>> The gotcha is that mkimg only does that if you give it
>>> a boot code file. Try that...
>>
>>Also, while I'm thinking about it, the other thing I wanted was a way
>>to specify the origin of a partition. So as an example (units are
>>sectors):
>>
>>0: MBR table
>>2-63: empty
>>64-2047: first partition data
>>2048-$end: second partition data
>>
>>The use case for this is some other boards (Wandboard for me) puts
>>u-boot as raw data 1K into the image.
>
> There are 2 ways to do that already:
> 1. Set the physical sector size. The mkimg will align
>    partitions to physical sector boundaries. A 1K or
>    4K physical sector size is not weird. This works
>    well with GPT, APM, etc.
> 2. Set the number of sectors/track. The MBR scheme
>    will align partitions to track boundaries. This
>    works well with MBR & EBR.
>
> HTH,


Thanks, that works.

It's even documented. I don't know how I missed that. Now all that's
needed is the ability to stuff random non-partition data into an
image, but dd works as well as anything for that ;)

Dan



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACS%2B7ZQi6Bj7ybZhTtYTdGUt6vRw%2B3W56HZPJFjk1x4dpqXtPA>