Subject: [alpine-devel] How Alpine stores OS in RAM?

From: Jan Klod <[email-masked]>
Date: Fri, 7 Nov 2008 14:30:44 +0300

Since I still try building a gentoo-similar OS in RAM, I would appreciate, if 
someone tells me how Alpine is stored in RAM?

Jan

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

---

From: Natanael Copa <[email-masked]>
Date: Fri, 07 Nov 2008 11:50:52 +0100

> someone tells me how Alpine is stored in RAM?

alpine is compiled with gentoo. since gentoo's pacakge manager does not
handles package splitting the packages are splitted and converted to
apk, (which basicly is a tar.gz archive)

The base system (alpine-baselayout, alpine-conf, uclibc, busybox, sfic,
tdb and openssl) are installed in a temp root and compressed as
base.tar.bz2.

During boot, the initramfs script will mount a tmpfs root where the
base.tar.bz2 is extracted and then it just 'switch_root' and 'exec init'

Now we are in a new root, which is an allocated tmpfs. The init scripts
will find an apkovl.tar.gz which contains a list of the applications
user installed last time and the config files. all the wanted
applications will be installed and the services will be started.

Does that explain? The alpine runtime is not really a gentoo system. Its
alot smaller alpien system.

> Jan

-nc

---

---

From: Jan Klod <[email-masked]>
Date: Wed, 19 Nov 2008 21:45:49 +0200

On Friday 07 November 2008 12:50:52 you wrote:
> > Since I still try building a gentoo-similar OS in RAM, I would
> > appreciate, if someone tells me how Alpine is stored in RAM?
>
Please post the root filesystem line of fstab!
I am doing switch_root from initramfs and that is currently the problem.

> alot smaller alpien system.
Yes, could be, I just got an operational gentoo-id of 160MB, which has gcc. 
But that is not a clean work like yours - it has no portage.

---

---

From: Natanael Copa <[email-masked]>
Date: Thu, 20 Nov 2008 09:25:08 +0100

> Please post the root filesystem line of fstab!

looks like i dont have any rootfs line in fstab at all.

> But that is not a clean work like yours - it has no portage.

fwiw, I'm working on a native alpine buildsystem, so you don't need
gentoo at all. So far I got almost all the toolchain there. gcc still
needs some tweaking to get the "hardened" part correct. (currently ssp
and pie is not turned on by default for some reason)

http://dev.alpinelinux.org/cgit/cgit.cgi/aports/

You can use base.tar.bz2 in a chroot (or vserver), install gcc, binutils
and uclibc-dev and then you should basicly have what you need to start
build things.

---