Commit Graph

35 Commits

Author SHA1 Message Date
Evgeny Sinelnikov
00a828bc85 stage1: fix CIFS installation method 2018-10-15 22:45:19 +03:00
Michael Shigorin
26cf322550 stage1, stage2: move af_packet to 50-stage2-net
af_packet rather belongs to networking stack
than to common module library indeed.

Suggested-by: Alexey Gladkov <legion@altlinux.org>
2018-05-23 09:44:35 +03:00
Michael Shigorin
04a12ef053 stage2: cosmetic fixup for aufs/overlayfs check
This has been made a bit messy with commit
9f72780d17,
just split the "involved" and straightforward
checks into two.
2018-05-21 22:49:50 +03:00
Michael Shigorin
63b96a0750 Revert "stage2: force grub-compatible ext4 options"
This reverts commit 4a4da37d06
as Sisyphus has got GRUB 2.02 in the mean time:
http://git.altlinux.org/tasks/archive/done/_179/183896/
2017-06-16 18:26:41 +03:00
Michael Shigorin
4a4da37d06 stage2: force grub-compatible ext4 options
We use grub2 2.00, it's not compatible with new mke2fs
options (namely "64bit" one); disable it for now.

See-also: https://bugzilla.altlinux.org/show_bug.cgi?id=33489#c6
2017-05-31 22:47:55 +03:00
Michael Shigorin
f1dffda8d5 stage2: added virtio_console
Reported-by: Sergey Bolshakov <sbolshakov@altlinux.org>
2016-07-28 15:57:40 +03:00
Michael Shigorin
a732c4aa58 stage2: more eMMC-related modules
eMMC installation support has a few bugs:

https://bugzilla.altlinux.org/30239
https://bugzilla.altlinux.org/30269
https://bugzilla.altlinux.org/32171

Handle the latest one.
2016-06-03 16:52:52 +03:00
Konstantin A. Lepikhov
9f72780d17 Experimental overlayfs support
If aufs not available/broken we could try to use overlayfs.
NB: changes below doesn't work without modified make-initrd-propagator!
2016-05-23 17:30:14 +03:00
Michael Shigorin
79b92db55d stage2: mv use/stage2/cifs{-install,}
This has no users in master but out-of-tree branches might need
a trivial update.

The rationale is that it's actually for *any* stage2 and not related
to specifically "install" at all (otherwise it should have been moved
to install2 feature altogether).

Note that there's no reason to add nfs-utils similarly as make-initrd
requires kinit-utils which includes its own nfsmount.
2015-11-16 15:48:33 +03:00
Michael Shigorin
111ec1d044 stage2: make use of finer-grained module lists
This is sort of laying the ground for the future dismantling
of 10-stage2 (which was sub.in/stage1/modules just recently);
things look like tagged lists might become due some day, e.g.
"net+usb" or "scsi+raid" -- time will tell.
2015-04-20 13:35:31 +03:00
Michael Shigorin
e139a5e091 stage2: added broken-down module lists
These were produced off the single sub.in/stage1/modules
file using this scriptlet to prefix/annotate the names:

  grep '\.ko$' modules \
  | grep -v / \
  | while read m; do \
  	echo "$(find /lib/modules/$(uname -r)/kernel/{drivers,fs} \
		-name "$m" -printf %P $m $(modinfo -d "${m%.ko}" 2>&1)"; \
    done

...with subsequent sorting and manual separation.

This is meant to be the second stage in monolithic modules
file split, so the lists themselves are largely unmolested
otherwise.  The plan is to further split those into prefix-
and module-specific ones.

Add a note clarifying 10-stage2's status, by the way.
2015-04-20 13:35:28 +03:00
Michael Shigorin
1ee01498d5 stage1, stage2: moved propagator modules file
What was a static sub.in/stage1/modules (and the only one)
is now features.in/stage2/stage1/modules.d/10-stage2
(basically a compatibility file that might go some day).

It will be auto-picked as its name corresponds to the
NN-SUFFIX pattern specified in stage1 subprofile now
with $(FEATURES) going into default STAGE1_MODLISTS.
2015-04-20 13:35:27 +03:00
Michael Shigorin
a36d0236a4 stage1, stage2: initial modlists support
stage1's got prepare-modules target collecting
modules file snippets all over stage1/modules.d/
subdirectories within individual features.

stage2 now adds names of all the features going into
a particular image as snippet file suffix list so that
individual features don't have to register themselves
twice (as a feature and as a propagator modules.d
snippet carrier).

This is going to allow both "uncommon" modules getting
included with no problem (sin@ has wanted cifs ones
for quite some time, for example, and some want e.g.
infiniband modules) *and* to reduce the actual list
below the common mark as well (which is the case with
live-privacy image, for one).

And stage1 memory consumption does matter in some cases
as it's highly critical with no chance to use swap yet.
2015-04-20 13:35:24 +03:00
Michael Shigorin
8faf140777 kernel, stage2: rearranged initrd hooks
stage2 has been thinking it's synonymous with propagator
and used to usurp kernel's belongings either; carefully
tear scripts apart so that kernel feature makes sure
initrd gets generated, and stage2 (which is still all
about propagator) cares for its bits.
2014-09-19 20:53:24 +04:00
Michael Shigorin
e3571f276a stage2, efi: added kernel config test collector
The newly-introduced STAGE1_KCONFIG variable serves
to keep those kernel configuration options that are
required to be present in the kernel to boot.
2014-05-12 18:27:08 +04:00
Michael Shigorin
9d495f26cb stage2: preload ahci before udev/propagator
This change tries to force loading the storage driver
for cases when SecureBoot is "helping" the chainloader
to fail, see #29705 for details collected so far.

Of course ahci.ko only does AHCI but that's every storage
controller I've seen on UEFI/SecureBoot systems so far.
2014-01-27 23:56:07 +04:00
Evgeny Sinelnikov
d385a7864c stage1: add CIFS installation method 2014-01-11 22:51:19 +04:00
Michael Shigorin
32cc9a67dd live, stage2: net-eth moved
It would be better to put it into stage2 in the first place
but this somehow went over my head; rescue made a reminder.
2013-03-06 01:21:03 +02:00
Michael Shigorin
6139571a8b stage2: fix 10-initrd-base for current make-initrd
It was removing autodetection setting completely
thus implicitly setting it to the default "all"
with make-initrd-0.8.1+; just set it to be empty.

Thanks legion@ and boyarsh@; see also #28578.
2013-02-19 20:51:15 +04:00
Michael Shigorin
e9f60f007c 03-test-kernel: silliest mistake II
The previous part was fixed and discussed in commit
c30490e2e884f8655a2704fa6a84e60b13876874;
so much for a deduplication effort...

This would result in almost immediate

  make[1]: *** [profile/populate] Error 2

as well.
2012-12-03 17:18:27 +02:00
Michael Shigorin
bd427df77a stage2: updated 80-make-initfs
propagator-20121109-alt1 obsoleted initfs (and dropped
mkinitfs script altogether); that was taken into account
in both make-initrd-propagator and mkimage-profiles-desktop
but not in mkimage proper, see also discussion in #27976.
2012-11-19 23:26:51 +02:00
Michael Shigorin
c30490e2e8 80-make-initfs: fix the silliest mistake ever
*Of course* the "weird" [ ... ] || ... construct meant to avoid
the non-zero exit status of the whole thing wasn't employed
where it actually does make the difference!

Thanks ildar@ for hitting and reporting this, as in

  + verbose '/usr/lib64/propagator exists'
  + '[' -n '' ']'
  mki-scripts: .../stage1/scripts.d/80-make-initfs: unable to run script.
  make[3]: *** [run-scripts] Error 1
2012-11-10 17:59:30 +04:00
Michael Shigorin
aaddfb740c stage2: cope with current make-initrd-propagator
The issue that appeared pretty hard to diagnose occured
to be the enhancement made in make-initrd-propagator=0.8.1-alt1.2
(that didn't hit Sisyphus until merged into 0.10-alt1) which
drops propagator dependency.

And that was optimized out in m-p, of course.
2012-10-16 12:16:39 +03:00
Michael Shigorin
90b8fd49f4 80-make-initfs: fixed silly thinko
The added pdir check was a hillarious(tm) overlooked bug indeed:
I tried to put .../initfs/initfs instead of .../initfs as the result.

Duly spotted by torabora@, thanks a lot.

Still the kmod+propagator+kernel-image combo needed some tweaking too,
see #27640
2012-10-15 17:04:18 +03:00
Michael Shigorin
944e0341c5 stage2: brevity fix
A tiny bit less cut-n-paste. :)
2012-10-15 16:03:58 +03:00
Michael Shigorin
12a2fc983c 80-make-initfs: fix for current make-initrd*
Thanks mithraen@ for spotting, boyarsh@ for explaining,
and legion@ for hearty support :)

The problem would manifest itself like this:

  /.host/script.sh: line 20: /usr/lib64/propagator/initfs: \
  No such file or directory
  mki-scripts: .../stage1/scripts.d/80-make-initfs: unable to run script.
2012-09-24 21:20:49 +04:00
Michael Shigorin
8989fc2771 added plymouth feature
An initial draft of it was done half a year ago but several tricky
thingies had kept the code from showing up as it was rather brittle
and incomplete.

This implementation involves quite a few changes all over the place
but finally works good enough for live and installer images.

Please pay attention to the versions of these packages:
- installer-feature-setup-plymouth (0.3.2-alt1+)
- branding-altlinux-sisyphus (20110706-alt2+ if used)
- plymouth (0.8.3-alt20.git20110406+)

See also:
- http://www.altlinux.org/Branding
- http://www.altlinux.org/Plymouth
2012-06-14 17:15:24 +03:00
Michael Shigorin
74e5734eae 80-make-initfs: optimize for newer make-initrd
legion@ implemented skipping depmod call, and that's several more
seconds for most of the images; let's shave these off if possible.
2012-05-25 16:55:54 +03:00
Michael Shigorin
8d16069882 stage2: squashfs blocksize tweaks
Looks like the 128k default block size is pretty well chosen:
it saves ~6% of image size compared to 64k, and subsequent
differences are ~3% per doubling the block size up to 1M
(thanks led@ for carrying out the tests).

So we'll stick with 256k for "normal" xz compression (inodes
uncompressed) and get 512k back for "tight" one (compressed).
The runtime performance issues are to be examined yet when
bootchart or the like is deployed, nothing drastic though.

With "fast" (gzip/lzo) squash compression inodes go unmolested.

For the record, tight live-webkiosk builds as 95M image in 3:40,
and tight live-flightgear.iso builds as 669M image in 6:34.  Nice.

There's no much sense going for 1M block size: e.g. live-webkiosk
would drop to 93M (3:46) but its load time would increase up to
2:07 as compared to 1:48 for -b 524288 and 1:42 for -b 262144 -noI
on a Duron 500/512M system given the very same DVD+RW media.
2012-04-09 22:03:29 +03:00
Michael Shigorin
fe58c46ead stage2: tunable squashfs compression
The existing implementation would handle kernel differences
just fine but a bit too automatically: if it sees xz support,
that's what will end up being used (and if there's -Xbcj binary
compression filter available for the target platform, it will
be applied unequivocally either).

It's perfectly suitabe for getting fine-tuned release images
but is also a bit too resource-consuming while developing the
image configuration which has no business with its compression.

The one and only knob is SQUASHFS (see doc/variables.txt);
to give an idea of the differences, here are some numbers
for a mostly-binary (43% as per 99-elf-stats) webkiosk livecd
and a rather less so (18%) flightgear one on a dual quad-core
X5570 node (each mksquashfs run used up all the cores):

SQUASHFS | live-webkiosk.iso | live-flightgear.iso
---------+-------------------+---------------------
fast     | 3:30 / 130M       | 5:11 / 852M
normal * | 3:37 / 100M       | 5:35 / 688M
tight    | 3:50 / 98M        | 6:47 / 683M

Thus if the knob isn't fiddled with, the defaults will allow
for a reasonably fast build of a pretty slim image; if one is
building a release or if a particular image is very sensitive
being close to the media capacity then just add SQUASHFS=tight
and see it a percent or two down on size.

Please note that lzo/gzip-compressed images are also quicker
to uncompress thus further helping with test iterations.

Thanks to led@ and glebfm@ for helpful hints and questions.
2012-04-09 22:03:29 +03:00
Michael Shigorin
94b2052bfb stage1: halve squashfs block size
gns@ has 512k, led@ suggests that it's too much a bit;
let's try 256k.
2012-04-07 15:46:03 +03:00
Michael Shigorin
178a700e6e 03-test-kernel: tweak squashfs compression
A larger block size was recommended by led@;
gns@ seems to concur as the 512k value was borrowed
from liveflash.eeepc profile (along with -noI).

The other issue is with binary specific compressors:
x86 was clearly assumed while the data for an educated
guess are pretty handy.  Please note that using filters
incurs additional compression attempts for the utility
to choose the best result.
2012-01-18 23:33:29 +02:00
Michael Shigorin
96e89d0062 s/subst/sed -i/g
Initial openSUSE package base taming effort has shown that
relatively few things should be fixed; subst has been generalized
as -i option to sed(1) since its introduction, so let's just fix it.
2011-12-26 18:21:22 +02:00
Michael Shigorin
9cedefdba9 introduced add_feature function
The features might get copy-pasted (or even copied-and-pruned)
when initialized; there's an unneccessary duplication of the
function name in the line adding it to FEATURES list, thus
prone to being forgotten and causing some havoc later on.

It was wrong in the first place but tackling this with some
double-colon rules ran into terminality issues, and further
tortures were considered unneccessary.

The current solution isn't perfect (no completely transparent
function name registration upon corresponding target being called)
but at least it is an improvement...
2011-11-19 11:47:29 +02:00
Michael Shigorin
f5a8b89381 stage2 based live subprofiles, updated docs
- introduced generic stage2 subprofile (non-standalone)
- ported installer and rescue over to stage2/{install2,rescue}
- initial stage2/live (needs more work for sure)
- use make-initrd-propagator
- updated and somewhat extended doc/

NB: mind #26133, #26134
2011-11-04 16:15:30 +02:00