~alpine/devel

7 5

[alpine-devel] Notes on Alpine 2.4.2 in Amazon EC2

Nathan Angelacos <nangel@alpinelinux.org>
Details
Message ID
<4FC24FAF.6090904@alpinelinux.org>
Sender timestamp
1338134447
DKIM signature
missing
Download raw message
Just some notes on trying to get Alpine Linux running on an EC2 instance.

As of 27 May 2012, The Amazon Linux AMI includes pv-grub, so trying an 
alternate kernel is fairly simple:

* Start the instance (its some variant of redhat)
* wget the alpine iso and copy the /boot and /apk directories to the EC2 
  instance /
* create a apkovl.tar.gz that includes the ssh public keys, starts 
openssh, etc.; place the apkovl in /


The /boot/grub/grub.conf looks like this:

default=0
fallback=1
timeout=3
hiddenmenu

title Alpine Linux
root (hd0)
kernel /boot/grsec alpine_dev=xvda1:ext4 
modules=loop,squashfs,sd-mod,ext4 console=hvc0
initrd /boot/grsec.gz


title Amazon Linux AMI (PV)
root (hd0)
kernel /boot/vmlinuz-3.2.12-3.2.4.amzn1.i686 root=LABEL=/ console=hvc0
initrd /boot/initramfs-3.2.12-3.2.4.amzn1.i686.img


----

What doesn't work:


* Booting the 32bit kernel reports:
   ERROR: Invalid kernel: 'elf_xen_note_check: ERROR: Will only load 
images built for the generic loader or Linux images
   xc_dom_oparse_image returned -I


http://wiki.alpinelinux.org/wiki/Talk:Create_Alpine_Linux_PV_DomU says 
that's because the kernel uses PVOps and its running on 64 bit hardware.



* Booting the 64bit kernel reports:
   can only boot x86 32 PAE kernels, not xen-3.0-x86_64
   Error 13: Invalid or unsupported executable format










---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20120529170956.56f19dcb@ncopa-desktop.nor.wtbts.net>
In-Reply-To
<4FC24FAF.6090904@alpinelinux.org> (view parent)
Sender timestamp
1338304196
DKIM signature
missing
Download raw message
On Sun, 27 May 2012 09:00:47 -0700
Nathan Angelacos <nangel@alpinelinux.org> wrote:
 
> * Booting the 64bit kernel reports:
>    can only boot x86 32 PAE kernels, not xen-3.0-x86_64
>    Error 13: Invalid or unsupported executable format
>

I built a kernel dedicated for virtual guests. One of the goals is to
make it as small as possible. I have no idea if it even boots at this
point but feedback is welcome.

I'd like it to include drivers for qemu/kvm, xen, vmware, virtualbox
and hyper-v guests.

It is in edge/testing and is named linux-virt-grsec.

Thanks!

-nc


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20120530214537.243a095a@alpinelinux.org>
In-Reply-To
<201205302325.53353.vkrishn4@gmail.com> (view parent)
Sender timestamp
1338407137
DKIM signature
missing
Download raw message
On Wed, 30 May 2012 23:25:53 +0530
"V.Krishn" <vkrishn4@gmail.com> wrote:

> On Tuesday, May 29, 2012 08:39:56 PM Natanael Copa wrote:
> > On Sun, 27 May 2012 09:00:47 -0700
> > 
> > Nathan Angelacos <nangel@alpinelinux.org> wrote:
> > > * Booting the 64bit kernel reports:
> > >    can only boot x86 32 PAE kernels, not xen-3.0-x86_64
> > >    Error 13: Invalid or unsupported executable format
> > 
> > I built a kernel dedicated for virtual guests. One of the goals is
> > to make it as small as possible. I have no idea if it even boots at
> > this point but feedback is welcome.
> > 
> > I'd like it to include drivers for qemu/kvm, xen, vmware, virtualbox
> > and hyper-v guests.
> > 
> > It is in edge/testing and is named linux-virt-grsec.
> > 
> 
> Can we see a bootable iso in edge/releases or a wiki help page on how
> to create one. It would be great to have a lighter iso suited for
> virtual guests. I could test using kvm and install/test pmreader on
> it. (http://insteps.net/pr/a/pmwiki/Apps/PmReader-help-v1-1)

I built one for testing
http://dev.alpinelinux.org/~ncopa/alpine/alpine-virt/

> 
> Thanks.

I think kernel config might needs some tweaking still.

-nc


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<201205302325.53353.vkrishn4@gmail.com>
In-Reply-To
<20120529170956.56f19dcb@ncopa-desktop.nor.wtbts.net> (view parent)
Sender timestamp
1338400553
DKIM signature
missing
Download raw message
On Tuesday, May 29, 2012 08:39:56 PM Natanael Copa wrote:
> On Sun, 27 May 2012 09:00:47 -0700
> 
> Nathan Angelacos <nangel@alpinelinux.org> wrote:
> > * Booting the 64bit kernel reports:
> >    can only boot x86 32 PAE kernels, not xen-3.0-x86_64
> >    Error 13: Invalid or unsupported executable format
> 
> I built a kernel dedicated for virtual guests. One of the goals is to
> make it as small as possible. I have no idea if it even boots at this
> point but feedback is welcome.
> 
> I'd like it to include drivers for qemu/kvm, xen, vmware, virtualbox
> and hyper-v guests.
> 
> It is in edge/testing and is named linux-virt-grsec.
> 

Can we see a bootable iso in edge/releases or a wiki help page on how to 
create one. It would be great to have a lighter iso suited for virtual guests. 
I could test using kvm and install/test pmreader on it.
(http://insteps.net/pr/a/pmwiki/Apps/PmReader-help-v1-1)

Thanks.
-- 
Regards.
V.Krishn

> Thanks!
> 
> -nc
> 
> 
> ---
> Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
> Help:         alpine-devel+help@lists.alpinelinux.org
> ---




---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Nathan Angelacos <nangel@alpinelinux.org>
Details
Message ID
<4FC8214D.8050404@alpinelinux.org>
In-Reply-To
<4FC24FAF.6090904@alpinelinux.org> (view parent)
Sender timestamp
1338515789
DKIM signature
missing
Download raw message
Thanks to all for the help - Alpine Linux is now live in the  Amazon EC2 
cloud.  The following isn't pretty (no prepackaged AMI or anything) - 
more like duct-tape and fishing line - but its a start.

Pre setup:
   * Set up a local box so that it does
     * dhcp on eth0
     * starts sshd
     * put your public key in /root/.ssh/authorized_keys
     * set the root password
     * lbu include root/.ssh
     * You may wish to delete the /etc/ssh/*key* files, so that they are 
created  on the new box
   * lbu package amazon.apkovl.tar.gz
     * IMPORTANT:  If you are building this on a 32bit box, delete 
etc/apk/arch from the apkovl.tar.gz file

* Create an instance, use Amazon Linux, *64bit* version
* Copy the amazon.apkovl.tar.gz to the instance
* Log in, sudo
* Move the apkovl.tar.gz to /
* wget the latest alpinelinux *x86_64* iso. 32bit won't work
* Copy alpinelinux to the EBS harddrive
   * mkdir x;
   * mount alpine*.iso x -o loop
   * cd x
   * cp -av apks /
   * cp boot/* /boot
   * cd
* Edit the /boot/grub/grub.conf so that it looks something like this:

> default=0
> fallback=1
> timeout=3
> hiddenmenu
>
> title Alpine Linux
> root (hd0)
> kernel /boot/grsec alpine_dev=xvda1:ext4 modules=loop,squashfs,sd-mod,ext4 console=hvc0 pax_nouderef BOOT_IMAGE=/boot/grsec
> initrd /boot/grsec.gz
>
>
> title Amazon Linux AMI (PV)
> root (hd0)
> kernel /boot/vmlinuz-3.2.12-3.2.4.amzn1.i686 root=LABEL=/ console=hvc0
> initrd /boot/initramfs-3.2.12-3.2.4.amzn1.i686.img

    * syslinux automatically adds the BOOT_IMAGE to the kernel command 
line; grub does not.

* Reboot





---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Nathan Angelacos <nangel@nothome.org>
Details
Message ID
<4FC8E0C0.8080209@nothome.org>
In-Reply-To
<20120601135019.GL30542@vaio.jimpryor.net> (view parent)
Sender timestamp
1338564800
DKIM signature
missing
Download raw message
On 06/01/2012 06:50 AM, Dubiousjim wrote:
>
> I added some of the messages in this thread to the wiki. They need to be
> cleaned up, but at least the information is there to start from.
>
> http://wiki.alpinelinux.org/wiki/Running_Alpine_Linux_in_Amazon_EC2
>
> If you think it's not ready to be aired there yet, apologies and go
> ahead and delete it.
>

That was "The Right Thing To Do(tm)"  Thanks!

(Ugly is good - might encourage me to clean it up :) once we have an AMI)




---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<20120601135019.GL30542@vaio.jimpryor.net>
In-Reply-To
<4FC8214D.8050404@alpinelinux.org> (view parent)
Sender timestamp
1338558619
DKIM signature
missing
Download raw message
On Thu, May 31, 2012 at 06:56:29PM -0700, Nathan Angelacos wrote:
> Thanks to all for the help - Alpine Linux is now live in the  Amazon EC2 
> cloud.  The following isn't pretty (no prepackaged AMI or anything) - 
> more like duct-tape and fishing line - but its a start.

I added some of the messages in this thread to the wiki. They need to be
cleaned up, but at least the information is there to start from.

http://wiki.alpinelinux.org/wiki/Running_Alpine_Linux_in_Amazon_EC2

If you think it's not ready to be aired there yet, apologies and go
ahead and delete it.

-- 
Dubiousjim
dubiousjim@gmail.com


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<201206011617.19264.vkrishn4@gmail.com>
In-Reply-To
<20120530214537.243a095a@alpinelinux.org> (view parent)
Sender timestamp
1338547639
DKIM signature
missing
Download raw message
On Thursday, May 31, 2012 01:15:37 AM you wrote:
> On Wed, 30 May 2012 23:25:53 +0530
> 
> "V.Krishn" <vkrishn4@gmail.com> wrote:
> > On Tuesday, May 29, 2012 08:39:56 PM Natanael Copa wrote:
> > > On Sun, 27 May 2012 09:00:47 -0700
> > > 
> > > Nathan Angelacos <nangel@alpinelinux.org> wrote:
> > > > * Booting the 64bit kernel reports:
> > > >    can only boot x86 32 PAE kernels, not xen-3.0-x86_64
> > > >    Error 13: Invalid or unsupported executable format
> > > 
> > > I built a kernel dedicated for virtual guests. One of the goals is
> > > to make it as small as possible. I have no idea if it even boots at
> > > this point but feedback is welcome.
> > > 
> > > I'd like it to include drivers for qemu/kvm, xen, vmware, virtualbox
> > > and hyper-v guests.
> > > 
> > > It is in edge/testing and is named linux-virt-grsec.
> > 
> > Can we see a bootable iso in edge/releases or a wiki help page on how
> > to create one. It would be great to have a lighter iso suited for
> > virtual guests. I could test using kvm and install/test pmreader on
> > it. (http://insteps.net/pr/a/pmwiki/Apps/PmReader-help-v1-1)
> 
> I built one for testing
> http://dev.alpinelinux.org/~ncopa/alpine/alpine-virt/
> 
> > Thanks.
> 
> I think kernel config might needs some tweaking still.
> 
> -nc

Tested installing http://insteps.net/pr/a/pmwiki/Apps/PmReader-help-v1-1
on alpine-virt-120531-x86.iso .
Kvm/qemu command:
kvm -cdrom alpine-virt-120531-x86.iso -net nic,model=virtio -net user -redir 
tcp:5558::80

Things look great.

packages  tested from v2.4/edge repo:
php-apache2, php-xml, avfs, unionfs-fuse

Is it possible for someone to provide a testing account at Amazon EC2/AWS. 
(Looks like even signing a development account requires a credit card)

-- 
Regards.
V.Krishn


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)