Subject: [alpine-devel] Development environment

From: Jeremy Thomerson <[email-masked]>
Date: Mon, 3 Aug 2009 22:55:36 -0500

I am new to Alpine Linux and would like to experiment with it and possibly
submit patches to improve the ACF modules, or add new ACF modules.  My main
question is: what do you use for your development environment?  Do you have
a physical box that you have Alpine loaded on that you use for development?
Do you use a VM?

I installed Alpine on a VMWare VM tonight, and it runs on it fine.  But on
every reboot, I lose the configuration.  I added a USB controller to the VM,
mounted the USB stick and did an lbu commit, which worked fine.  But it
doesn't seem to auto-mount the USB stick on boot (/dev/sdb1).  I'm not sure
if this is a timing issue - perhaps VMWare doesn't make the USB stick appear
to the VM early enough.  Maybe there's a simple command that once the
machine is booted will let me mount the stick and then load the committed
configuration from it.  Anyway, I'd be interested in seeing if you have any
ideas for this setup and/or finding out what other Alpine devs use for
development.

Thanks for any pointers.

Jeremy Thomerson

---

From: Natanael Copa <[email-masked]>
Date: Tue, 04 Aug 2009 08:59:04 +0200

On Mon, 2009-08-03 at 22:55 -0500, Jeremy Thomerson wrote:
> I am new to Alpine Linux and would like to experiment with it and
> possibly submit patches to improve the ACF modules, or add new ACF
> modules.  My main question is: what do you use for your development
> environment?  Do you have a physical box that you have Alpine loaded
> on that you use for development?  Do you use a VM?

My deskto pis an archlinux box with a vserver kernel. I run my build
environment in a vserver. (vservers are advanced chroots basicly)

Then i create development iso images that I boot in kvm/qemu. I used
vmware before for this.

> I installed Alpine on a VMWare VM tonight, and it runs on it fine.
> But on every reboot, I lose the configuration.  I added a USB
> controller to the VM, mounted the USB stick and did an lbu commit,
> which worked fine.  But it doesn't seem to auto-mount the USB stick on
> boot (/dev/sdb1).  I'm not sure if this is a timing issue - perhaps
> VMWare doesn't make the USB stick appear to the VM early enough. 

there was some issues with USB timings before, specially with USB-1
controllers. This should be fixed in recent alpine alpha releases.

Will the USB show up on the USB bus in the vm? might be they show up on
SCSI or IDE bus in the vm.

>  Maybe there's a simple command that once the machine is booted will
> let me mount the stick and then load the committed configuration from
> it.  Anyway, I'd be interested in seeing if you have any ideas for
> this setup and/or finding out what other Alpine devs use for
> development.

Other options: 
* use virtual floppy. For configs only 2.88 MB might be enough.
* install alpine to a virtual harddisk and boot of the harddisk.

I think I'd recommend the latter, even if its some manual work to get
alpine installed.

> Jeremy Thomerson

-nc

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Nathan Angelacos <[email-masked]>
Date: Mon, 03 Aug 2009 21:24:36 -0700

Welcome, Jeremy,

Jeremy Thomerson wrote:
> environment?  Do you have a physical box that you have Alpine loaded on 
> that you use for development?  Do you use a VM?
> 
ACF developmemt is lua based, so I used a vm with a local web 
server+git.  Of course, there's probably good reasons I'm not involved 
in the web development much these days.

For compiling C code, there's the chroot environment
http://wiki.alpinelinux.org/w/index.php?title=Setting_up_the_build_environment

> I installed Alpine on a VMWare VM tonight, and it runs on it fine.  But 
> on every reboot, I lose the configuration.  I added a USB controller to 
> the VM, mounted the USB stick and did an lbu commit, which worked fine.  
> But it doesn't seem to auto-mount the USB stick on boot (/dev/sdb1).  

Looking at the initrc, it /looks/ like the apkovl has to be on the first 
usb drive, which would normally be /dev/sda; not sdb

Well, actually it has to be on a device that is automounted; the init 
script looks for cdrom, floppy and usb.

If you are booting from a virtual USB device, store your apkovl there. 
Otherwise, try creating a virtual floppy and storing it on floppy.

> I'm not sure if this is a timing issue - perhaps VMWare doesn't make the 
> USB stick appear to the VM early enough.  Maybe there's a simple command 
> that once the machine is booted will let me mount the stick and then 
> load the committed configuration from it.  Anyway, I'd be interested in 
> seeing if you have any ideas for this setup and/or finding out what 
> other Alpine devs use for development.

tdtrask is the main ACF developer - he's in EDT so he'll probably have 
more (correct) info for your tomorrow morning.

---

---

From: Jeremy Thomerson <[email-masked]>
Date: Tue, 4 Aug 2009 00:02:01 -0500

Thanks Nathan,

> Otherwise, try creating a virtual floppy and storing it on floppy.

I did end up changing to a virtual floppy rather than a virtual usb.  This
worked after some obvious configuration.  I was going to add a page to the
wiki to describe how to do it, but didn't see any register links.  If
someone wants to add the following on how to set up Alpine under VMWare
Server, then that might help someone else along the way.

<doc>
# create a virtual machine (linux, other 2.6 32 bit)
## the vm doesn't need a hard drive
## add a cdrom to the vm that points to the alpine iso you downloaded
## add a floppy (choose new floppy image and give it a file name to create a
fake floppy image on your machine)
# boot into the vm
# press f2 on boot to enter the BIOS
## warning: this can be a real timing trick.  I had to disconnect the cd and
floppy and try several times to get into the bios screen before it started
trying to network boot
## change the boot order so that it boots from cd, then hd, then floppy (or
whatever - as long as cd is first)
# boot the machine
# now run the following commands:
## mkfs.vfat /dev/fd0
## mount /dev/fd0 /media/floppy
## setup-alpine
## lbu ci floppy

Now you should be able to reboot and it should retain your settings because
they were saved to your floppy.
</doc>

Thanks again!
Jeremy Thomerson

---

From: Jeremy Thomerson <[email-masked]>
Date: Tue, 4 Aug 2009 00:12:42 -0500

On Tue, Aug 4, 2009 at 12:02 AM, Jeremy Thomerson <
[email-masked]> wrote:

> I was going to add a page to the wiki to describe how to do it, but didn't
> see any register links.
>

It may be bad form to reply to myself, but after rubbing some sleep from my
eyes those links *magically* appeared.  Page added here:

http://wiki.alpinelinux.org/w/index.php?title=Installing_Alpine_on_a_virtual_machine

Jeremy Thomerson

---

From: Natanael Copa <[email-masked]>
Date: Tue, 04 Aug 2009 09:00:50 +0200

On Tue, 2009-08-04 at 00:12 -0500, Jeremy Thomerson wrote:

> 
> It may be bad form to reply to myself, but after rubbing some sleep
> from my eyes those links *magically* appeared.  Page added here:
> 

Nice! thanks!

-nc

---

---

From: Ted Trask <[email-masked]>
Date: Tue, 4 Aug 2009 06:10:01 -0700 (PDT)

Welcome Jeremy, we're always glad to have help. There's some ACF development information on wiki.alplinelinux.org, but it hasn't been updated in a while. For instance, there's information about setting up a dev environment at http://wiki.alpinelinux.org/w/index.php?title=Getting_started_with_ACF_development but I'm not aware of anyone actually using it. :) 

Personally, I use a physical box booting alpine from USB stick with the repository stored on a mounted hard drive. Previously I had used a CD and floppy configuration.  Other options are VM or hard disk install.  It's really just a matter of what you're comfortable with, although I recommend storing the repository on a hard drive rather than in the RAM disk.

One major difference from the documentation is that we now use a git repository (git.alpinelinux.org) instead of SVN. You can browse the repository at http://git.alpinelinux.org/ Also, there is a much easier way to get ACF up and running - the 'setup-webconf' script - as documented at http://wiki.alpinelinux.org/w/index.php?title=Alpine_Configuration_Framework_Design.

Here's my recommendation:
1) Install alpine however you would prefer (physical/VM CD/USB/HD)
2) Run setup-alpine
3) Run setup-webconf
4) Fetch from git the ACF repositories you're interested in
5) Modify files as you would like
6) Run 'make install' to install your changes
7) Test at https://yourhost

Ted Trask

----- Original Message ----
From: Nathan Angelacos <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Sent: Tuesday, August 4, 2009 12:24:36 AM
Subject: Re: [alpine-devel] Development environment

Welcome, Jeremy,

Jeremy Thomerson wrote:
> I am new to Alpine Linux and would like to experiment with it and possibly submit patches to improve the ACF modules, or add new ACF modules.  My main question is: what do you use for your development environment?  Do you have a physical box that you have Alpine loaded on that you use for development?  Do you use a VM?
> 
ACF developmemt is lua based, so I used a vm with a local web server+git.  Of course, there's probably good reasons I'm not involved in the web development much these days.

> I installed Alpine on a VMWare VM tonight, and it runs on it fine.  But on every reboot, I lose the configuration.  I added a USB controller to the VM, mounted the USB stick and did an lbu commit, which worked fine.  But it doesn't seem to auto-mount the USB stick on boot (/dev/sdb1).  

Looking at the initrc, it /looks/ like the apkovl has to be on the first usb drive, which would normally be /dev/sda; not sdb

Well, actually it has to be on a device that is automounted; the init script looks for cdrom, floppy and usb.

If you are booting from a virtual USB device, store your apkovl there. Otherwise, try creating a virtual floppy and storing it on floppy.

> I'm not sure if this is a timing issue - perhaps VMWare doesn't make the USB stick appear to the VM early enough.  Maybe there's a simple command that once the machine is booted will let me mount the stick and then load the committed configuration from it.  Anyway, I'd be interested in seeing if you have any ideas for this setup and/or finding out what other Alpine devs use for development.

tdtrask is the main ACF developer - he's in EDT so he'll probably have more (correct) info for your tomorrow morning.

---

---