Gentoo Archives: gentoo-soc

From: Huimin Zhang <thehobn@×××××.com>
To: gentoo-soc@l.g.o
Subject: [gentoo-soc] GSoC 2017: Atom Gentoo
Date: Thu, 30 Mar 2017 09:57:24
Message-Id: CA+sxgwskcgJQrAAEN_d15PFcvFruSGOZsr+KaMzORSucojb5jg@mail.gmail.com
1 Hi,
2
3 I am interested in doing the Atom Gentoo project. I’ve looked through the
4 past versions of the project idea (micro Gentoo, Stateless Minimal Gentoo)
5 as well, and this is how I think things could work:
6
7 Atom Gentoo will have a build script that will generate a disk image,
8 complete with bootloader, to be cloned to disks for deployment. I suspect
9 BIOS is a lot more prevalent than UEFI for servers and virtualization so a
10 BIOS bootloader will be default. The default kernel config should be
11 tailored for virtualization.
12
13 Each installation of Atom Gentoo consists of two separate partitions for
14 the root filesystem. Only one will be in use at a time, and the other will
15 be used for upgrades. If an upgrade fails, the partially upgraded partition
16 should be reset to be a copy of the other partition. If an upgrade
17 succeeds, the unupgraded partition should copy the contents of the upgraded
18 partition. A stateful partition, possibly on an external device, can be
19 overlayed on top.
20
21 The logic for choosing which partition to boot and maintaining the two
22 partitions will be handled in the init of initramfs, and the functionality
23 of generating such an initramfs could be patched into genkernel.
24
25 For updates, Atom Gentoo can rsync from a server that was defined at build
26 time. By using rsync the updates are diff-only instead of fetching the full
27 image each time. This can run automatically in the background as a cronjob,
28 updating the root partition not currently in use.
29
30 I have some questions as well (is there more background on the project?):
31
32
33 Should Atom Gentoo be minimal to the point of excluding portage and not
34 being self-sufficient? Since Atom Gentoo will receive full atomic OS
35 updates, it doesn’t really need to update its own packages, and perhaps
36 package management as a whole can be offloaded? This makes a lot of sense
37 for mass deployment.
38
39 For building Atom Gentoo, should the starting point be one of the Gentoo
40 Stage 3 tarballs or even earlier? I am leaning towards “even earlier”,
41 which will be necessary if portage is cut out of Atom Gentoo.
42
43 Should Atom Gentoo use a specific stdlib? I think uClibc and musl fit this
44 project well, but I haven’t worked with them before.
45
46 Also, since I expect to be writing a lot of Bash, does Gentoo have its own
47 Bash style guide?
48
49
50 Best,
51 Min

Replies

Subject Author
Re: [gentoo-soc] GSoC 2017: Atom Gentoo "Robin H. Johnson" <robbat2@g.o>