On 6 January 2014 21:54, Jimmy Kaplowitz <[email protected]> wrote:

> Anders - While I don't know anything about EC2 booting, if HVM images boot
> as if they were a "standard" local disk and you're open to using GRUB, you
> might want to look at the GCE booting code. It was tricky to get GRUB
> bootstrapped in the right way, but I think what I ended up with works
> properly, including with the debian integration (i.e. update-grub and
> /etc/grub.d/* and /etc/default/grub ) going forward. This is one of the
> trickiest bits I've heard for other people getting from-scratch images to
> boot on GCE, but it's in no way specific to our cloud.
>
> Specific links:
> https://github.com/andsens/build-debian-cloud/blob/master/tasks/gce/30-grub
>
> https://github.com/andsens/build-debian-cloud/blob/master/tasks/gce/32-install-kernel
>
> https://github.com/andsens/build-debian-cloud/blob/master/tasks/gce/70-finalize-grub
>
> Note: Our images use a single partition for the OS at a 1 MB offset,
> before which GRUB presumably installs its embedded blocks. We install GRUB
> into the MBR. If you're using a markedly different arrangement, adjust
> accordingly.
>
> A more minor note: lines 18-19 of 30-grub are broken, but it only affects
> the grub-level serial console and the obvious fix broke other stuff at a
> time when we were in "crunch mode" leading up to the Google Compute Engine
> general availability launch last month. I'm sure the correct fix is only
> slightly more work, but in any case you're on the Python side of things now
> so this is just inspiration.
>
> - Jimmy
>
>
> On Mon, Jan 6, 2014 at 12:16 PM, Anders Ingemann <[email protected]>wrote:
>
>> On 6 January 2014 19:18, Tomasz Rybak <[email protected]> wrote:
>>
>>> Hello.
>>> I'm rather inactive member of Debian Cloud Team. Trying to increase
>>> my involvement, I started from atypical way and created descriptions
>>> of build-debian-cloud scripts:
>>> ​http://tomaszrybak.wordpress.com/2014/01/06/debian-cloud-images/
>>> and projects rebuilding Debian packages:
>>> http://tomaszrybak.wordpress.com/2013/12/28/using-cloud-to-rebuild-debian
>>>
>>> I've put those on my blog - do you think it would be better to put them
>>> on Debian wiki, or team page on Alioth?
>>>
>>> I have another question, related to build-debian-cloud.
>>> How is situation with HVM, and can build-debian-cloud be used to
>>> create images for unstable? I want to try to test my packages
>>> (PyCUDA and PyOpenCL) on AWS EC2 GPU instances, but I would like
>>> to do it on recent drivers - not on stable.
>>>
>>> Best regards.
>>>
>>> --
>>> Tomasz Rybak  GPG/PGP key ID: 2AD5 9860
>>> Fingerprint A481 824E 7DD3 9C0E C40A  488E C654 FB33 2AD5 9860
>>> http://member.acm.org/~tomaszrybak
>>>
>>>
>> Whoa! That's quite a bit of work there, nice job :-)
>> Don't ask me where to put it, but I'll soon be writing my own
>> documentation at http://andsens.github.io/build-debian-cloud/, your docs
>> will be a good starting point.
>> About the HVM images. James and I have made some progress, but right now
>> I am having trouble getting the image to boot (in the WIP branch).
>> You are welcome to give it a try, the manifest is there and the resulting
>> image registers properly with AWS.
>> Maybe the extlinux config is wrong (or maybe the image is registered with
>> the wrong root_device/device mapping, I am not sure, I get no feedback from
>> the AWS console).
>> SR-IOV drivers are also in the works, the code is there but hasn't been
>> tested and is currently not added to the tasklist.
>> About unstable: I... I actually haven't tried, hehe. Give it a spin,
>> maybe we're lucky and stuff just works :-) (though I'm pretty sure HVM
>> images still won't work)
>>
>
>
Hey Jimmy

> It was tricky to get GRUB bootstrapped in the right way
Agreed, it feels like I age a few years everytime I try to get something
running with grub. I just recently figured out that grub 1.99 in wheezy
does not support GPT, guess how much time I previously wasted on that
little tidbit, heh...
> I think what I ended up with works properly, including with the debian
integration
OK, how the hell did you manage to install grub without having to do the
dmsetup <http://ebroder.net/2009/08/04/installing-grub-onto-a-disk-image/>
dance<https://github.com/andsens/build-debian-cloud/blob/python/common/fs/loopbackvolume.py#L33>?
...oh I 
see<https://github.com/andsens/build-debian-cloud/blob/master/tasks/gce/11-create-loopback#L13>,
smart :-). Well, once you switch to the python version I got you
covered<https://github.com/andsens/build-debian-cloud/blob/python/common/tasks/boot.py#L45>
.

> Note: Our images use a single partition for the OS at a 1 MB offset
Ah yes. The post MBR
gap<https://github.com/andsens/build-debian-cloud/blob/python/base/fs/partitions/mbr.py#L9>.
It's not working with unpartitioned volumes yet, should be quite easy to
fix though.

I can't remember the specific reason for me giving up on GRUB + HVM, I
think I'll give it another try though, there is quite a bit of new
information to work with. Your mail served it's purpose, consider me
inspired :-)

Reply via email to