Fabio Erculiani
29d5c94dac
initrd.scripts: move LUKS code to 00-crypt.sh, refactor it slightly
12 years ago
Fabio Erculiani
c6af477460
initrd.scripts: move media_find, start_volumes, setup_md_devices to 00-fsdev.sh
12 years ago
Fabio Erculiani
cd20666829
initrd.scripts: move zfs_start_volumes outside of start_volumes
12 years ago
Fabio Erculiani
9d66471c26
initrd.scripts: move zfs_real_root_init outside real_root_init
12 years ago
Fabio Erculiani
6b29188ee3
gen_initramfs: provide /bin/udhcpc
12 years ago
Fabio Erculiani
2af62f0189
gen_initramfs: provide /bin/dmesg as well
12 years ago
Fabio Erculiani
51a54c3388
initrd.scripts: move find_nfs to 00-nfs.sh
12 years ago
Fabio Erculiani
4fad24c756
initrd.d: move is_livecd() back to 00-common.sh to avoid circular deps
12 years ago
Fabio Erculiani
0308b18e1e
initrd.scripts: move keymaps functions to 00-keymaps.sh
12 years ago
Fabio Erculiani
58669a002c
initrd.scripts: move cmdline_hwopts() to 00-modules.sh
12 years ago
Fabio Erculiani
079ee21409
initrd.scripts: move sdelay() to 00-common.sh
12 years ago
Fabio Erculiani
56e9775b53
initrd.d: trivially update code style of quiet_kmsg and verbose_kmsg
12 years ago
Fabio Erculiani
5722d3826e
initrd.scripts: move test_success() to 00-common.sh and fix it
12 years ago
Fabio Erculiani
fae57916b9
initrd.scripts: move prompt_user() to 00-splash.sh
12 years ago
Fabio Erculiani
547b54238a
initrd.scripts: move mount_sysfs to 00-fsdev.sh
12 years ago
Fabio Erculiani
fa87394a19
initrd.scripts: move ask_for_password to 00-splash.sh
12 years ago
Fabio Erculiani
eb6e9ca066
initrd.scripts: move livecd code to 00-livecd.sh
12 years ago
Fabio Erculiani
4c9f7dce50
initrd.scripts: move quiet_kmsg and verbose_kmsg to 00-common.sh
12 years ago
Fabio Erculiani
bb51ba3046
initrd.scripts: refactor devicelist and rename to device_list()
12 years ago
Fabio Erculiani
6b8bde737d
initrd.scripts: refactor findmediamount and rename to media_find()
12 years ago
Fabio Erculiani
90b81e9f4b
initrd.scripts: drop unused function: uppercase()
12 years ago
Fabio Erculiani
bb1e05985c
initrd.scripts: move modules functions to 00-modules.sh
12 years ago
Fabio Erculiani
2dffb2c52f
initrd.scripts: trivial, fix swsusp_resume() code style
12 years ago
Fabio Erculiani
be9870f75a
initrd.scripts: trivial, fix setup_squashfs_aufs code style
12 years ago
Fabio Erculiani
f51db27a39
initrd.scripts: trivial, wrap comments
12 years ago
Fabio Erculiani
2496e36843
initrd.scripts: simplify rootdev_init() further
12 years ago
Fabio Erculiani
5f9050e1a6
initrd.scripts: refactor setup_real_root and rootdev_init functions
...
These two functions were a real mess, and the cure is painful.
${REAL_ROOT} setup code and ${REAL_ROOT} init code are now cleaner
and easier to read. ZFS support should have been preserved but
I may have caused new regressions. These changes should be tested.
12 years ago
Fabio Erculiani
fb3073c7a9
initrd.scripts: improve readability of rootdev_init
12 years ago
Fabio Erculiani
98f264fa20
initrd.scripts: move zfs functions to 00-zfs.sh
12 years ago
Fabio Erculiani
7c2f5828fd
initrd.scripts: move mount_devfs() to 00-devmgr.sh
12 years ago
Fabio Erculiani
e4742ab0b5
initrd.scripts: move more functions to initrd.d/
12 years ago
Fabio Erculiani
90983b4fd2
initrd.scripts: move splash functions to a separate file
...
Start to make the genkernel code a bit modular. Also add initrd.d
support to gen_initramfs.sh
12 years ago
Fabio Erculiani
f0775326eb
initrd.scripts: refactor start_volumes(), improve readability
12 years ago
Fabio Erculiani
382691d467
initrd.scripts: improve code style of mount_devfs
12 years ago
Fabio Erculiani
231ffd477a
initrd.scripts: improve code style of fs_type_in_use
12 years ago
Fabio Erculiani
d518964d6a
initrd.scripts: improve code style of check_loop if test
12 years ago
Fabio Erculiani
8c70f27a93
initrd.scripts: improve code style of check_loop
12 years ago
Fabio Erculiani
9d043ca938
initrd.scripts: rename findnfsmount to find_nfs
12 years ago
Fabio Erculiani
f4b4d6d0d6
initrd.scripts: improve findnfsmount(), simplify code and branches
12 years ago
Fabio Erculiani
7a7e01c47e
initrd.scripts: refactor findnfsmount(), improve readability
12 years ago
Fabio Erculiani
3790c6345a
initrd.scripts: wrap >80 chars lines in devicelist()
12 years ago
Fabio Erculiani
ce1e10241b
genkernel: migrate ALL the code to 4-spaces tabs
...
\t must die!
12 years ago
Fabio Erculiani
ebc7806e16
repo: add `make install` support, bundle busybox, bashcomp and initramfs.mounts
12 years ago
Fabio Erculiani
24e26f1b77
initrd.scripts: add more TODOs
12 years ago
Fabio Erculiani
bda76debee
initrd.scripts: kill tuxonice support with a LOT of fire
...
tuxonice is almost dead. Last update was in 2011 and they're now
trying to resurrect this ugly and non-upstream friendly thing.
Moreover, the tuxonice genkernel code is the ugliest thing I have
ever seen in it. Well no, unionfs was even worse.
So please, let's forget about tuxonice for now and focus on the
good looking code. I am willing to accept patches that restore
tuxonice support if they're good quality ones.
Burn tuxonice init code, burn in hell.
12 years ago
Fabio Erculiani
068e7da618
initrd.scripts: add a couple of TODOs
12 years ago
Fabio Erculiani
556f991201
initrd.scripts: fix wording in fstype_init
12 years ago
Fabio Erculiani
1ac43bf8a6
initrd.scripts: use get_device_fstype to execute fstype specific init code
...
This logic replaces the old and buggy setup_btrfsctl code
12 years ago
Fabio Erculiani
43a4651da2
initrd.scripts: simplify rootdev_init. Break if conditions for better readability
12 years ago
Fabio Erculiani
f5d1084646
initrd.scripts: make rootdev_init use find_real_device
12 years ago
Fabio Erculiani
755eb93994
initrd.scripts: make resume_init use find_real_device
12 years ago
Fabio Erculiani
addfa95e96
initrd.scripts: fix find_real_device output
...
The crazy function should only return to stdout valid devices in
case of UUID= or LABEL=. Other cases are just ignored and not checked
as it was before.
12 years ago
Fabio Erculiani
12af5dfd3a
gen_initramfs, initrd.scripts: migrate to /sbin/btrfs
...
btrfsctl is deprecated.
12 years ago
Fabio Erculiani
c27d3ac25d
initrd.scripts: add get_device_fstype
...
This fuction prints the device file system type to standard output
and will be used in future for executing fstype specific tasks.
12 years ago
Fabio Erculiani
9d8560729f
linuxrc: trivial, improve code style of linuxrc
12 years ago
Fabio Erculiani
a7def21edc
linuxrc: drop another /dev (tty1) pointless check
12 years ago
Fabio Erculiani
35443c24ae
linuxrc: drop useless /dev nodes check
...
The code just moved /dev over, so the checks are pointless
12 years ago
Fabio Erculiani
5e96e6f7dc
linuxrc: move mountpoints move code to move_mounts_to_chroot
12 years ago
Fabio Erculiani
afea330cb1
linuxrc: default REAL_INIT to /sbin/init
12 years ago
Fabio Erculiani
682acf0274
linuxrc: improve code style at the end of the file
12 years ago
Fabio Erculiani
68892f5c65
linuxrc: move devmgr termination code to devmgr_terminate
12 years ago
Fabio Erculiani
8ab82e8b23
linuxrc: unbundle is_livecd() from setup_real_root
12 years ago
Fabio Erculiani
0cac67fa67
linuxrc: move livecd mount code to livecd_mount()
12 years ago
Fabio Erculiani
1b282a7c9f
initrd.scripts: mount livecd / tmpfs with mode=0755 (instead of 0777)
12 years ago
Fabio Erculiani
faf020424d
linuxrc: move root device detection/init code to rootdev_init
12 years ago
Fabio Erculiani
37121be638
initrd.scripts: add is_nfs(), replace ${REAL_ROOT} = /dev/nfs checks
12 years ago
Fabio Erculiani
6f6befff99
linuxrc: call ensure_initramfs_mounts after mounting ${REAL_ROOT}
...
This makes possible to deal with systemd and separate /usr support
as discussed in bug #479730 .
12 years ago
Fabio Erculiani
51a455d49c
linuxrc: use is_livecd() rather than ${CDROOT} value check
12 years ago
Fabio Erculiani
b0418a0272
initrd.scripts: ensure_initramfs_mounts: check if partition is mounted
...
Before trying to mount a filesystem, check if it's already mounted first.
This way we can call ensure_initramfs_mounts multiple times during
the pivot root initialization.
12 years ago
Fabio Erculiani
8fa61e098d
linuxrc: move /etc/initramfs.mounts handling to a separate function
12 years ago
Fabio Erculiani
7f41ae2800
linuxrc: fix zfs call, subshell call was missing
12 years ago
Fabio Erculiani
c0bfc7b123
Revert "linuxrc: do not look for ${REAL_INIT} inside the mounted partition"
...
This reverts commit 3bb6c62bd9
.
12 years ago
Fabio Erculiani
86967ea400
linuxrc: move livecd initialization code to livecd_init()
12 years ago
Fabio Erculiani
3bb6c62bd9
linuxrc: do not look for ${REAL_INIT} inside the mounted partition
...
If ${REAL_INIT} is on a separate partition, the check will erroneously
fail. Don't try to be too smart and fix bug #479730
12 years ago
Fabio Erculiani
af1f319509
linuxrc: move resume initialization code to resume_init()
12 years ago
Fabio Erculiani
3f14137bc0
linuxrc: create is_livecd(), stop doing weird ${CDROOT} comparisons
12 years ago
Fabio Erculiani
3c9f0c6850
linuxrc: break condition for luks and resume apart
12 years ago
Fabio Erculiani
f269237602
linuxrc: trivial, use a more compact syntax
12 years ago
Fabio Erculiani
798c45d3da
linuxrc: simplify iscsi setup code
12 years ago
Fabio Erculiani
138b1f8492
linuxrc: move the devmgr initialization code to devmgr_init()
12 years ago
Fabio Erculiani
613a7047a1
linuxrc: move REAL_ROOT* setup to setup_real_root()
12 years ago
Fabio Erculiani
d8af91e3e8
linuxrc: move modules initialization code to modules_init
12 years ago
Fabio Erculiani
f1f04247f4
linuxrc: move splash initialization to splash_init()
12 years ago
Fabio Erculiani
7048779cbc
linuxrc: remove bogus comments
12 years ago
Fabio Erculiani
bbd4283b07
linuxrc: remove pointless comments
12 years ago
Fabio Erculiani
5908a425f4
linuxrc: remove deprecated dolvm2 boot parameter
12 years ago
Fabio Erculiani
ecdb16659b
linuxrc: move zfs initialization code to zfs_init() in initrd.scripts
12 years ago
Fabio Erculiani
071fff18b1
initrd.scripts: <80 chars
12 years ago
Fabio Erculiani
4559ecca82
defaults: fix code style
12 years ago
Fabio Erculiani
36d21e9a5f
defaults: drop trailing whitespaces
12 years ago
Fabio Erculiani
3ec035cccd
Remove MODULES_PLYMOUTH
...
MODULES_PLYMOUTH is only useful to mdev and doesn't do any good
to udev because it dynamically loads what's needed
12 years ago
Fabio Erculiani
af182ed72a
Move gpg executable to /usr/bin/gpg, bug #476276
...
The gpg executable is not at /sbin/gpg, but rather at /usr/bin/gpg
12 years ago
Richard Yao
755798b933
Workaround busybox modprobe's inability to load ZFS modules
...
Commit 3a054014e8
replaced our modprobe
with busybox's modprobe. Unfortunately, busybox's modprobe appears to be
unable to properly load modules with more than 1 level of dependencies.
The zfs and zpool commands will invoke modprobe if /dev/zvol is missing,
which concealed this problem. However, this caused problems because some
invocations would fail and under certain circumstances, init would be
killed, causing a kernel panic. This issue was made clear by commit
c812c35100771bb527f6b03853fa6d8ef66a48fe, which ensured that the zpool
and zfs commands were not run until the ZFS module was loaded.
busybox modprobe's failure to load module dependencies correctly appears
to occur because busybox modprobe does not wait until until a module is
loaded before loading a module that depends on it, which is a race. It
would be best to correct this race by waiting until the module has
properly loaded, but it is not clear that the race is the only thing
going wrong and developer time is a premium.
We implement a workaround by modifying the busy loop added in the
previous commit to explicit call `modprobe zfs` on each iteration. While
the first few calls fail due to bugs in busybox modprobe, it will
eventually work, after which each call is a noop. This lets us keep
looping until either the loop exit condition that /dev/zvol exist is
reached or the 5 second timeout is reached.
Once the busybox modprobe issue is fixed, this workaround should be safe
to revert.
Signed-off-by: Richard Yao <ryao@gentoo.org>
12 years ago
Richard Yao
9bb2beea5b
Import pool after ZFS module finishes loading
...
There is a race between ZFS module initialization and our attempt to
import pools. We address this by doing a busy wait for the /dev/zfs
device to appear. We wait a maximum of 5 seconds for the device to
appear.
We also slightly alter output messages to be more readable.
Signed-off-by: Richard Yao <ryao@gentoo.org>
Conflicts:
defaults/initrd.scripts
12 years ago
Richard Yao
c188fcedff
Add call_func_timeout helper function
...
call_func_timeout permits us to call a helper function and kill it
should it exceed some timeout. This is derived from example code posted
on Stack Overflow:
http://stackoverflow.com/a/11056286
Signed-off-by: Richard Yao <ryao@gentoo.org>
Conflicts:
defaults/initrd.scripts
12 years ago
Richard Yao
6c0e6f6ee6
Refactor ZFS module load hook
...
Signed-off-by: Richard Yao <ryao@gentoo.org>
12 years ago
Richard Yao
80c1c1669a
Load xhci-plat when available
...
At least one kernel configuration generates an addition module that we
need to load for USB 3.0 support, so lets load it.
Reported-by: Robin Johnson <robbat2@gentoo.org>
Signed-off-by: Richard Yao <ryao@gentoo.org>
12 years ago
Fabio Erculiani
f1dbe547be
busybox: issue a full make menuconfig against busybox 1.21
12 years ago
Fabio Erculiani
d5a0bfe470
busybox: switch away from MODPROBE_SMALL, see bug #472312#c27
12 years ago
Fabio Erculiani
39cb3a0a16
Revert "linuxrc: add depmod call as workaround for missing modules.dep.bb"
...
This reverts commit ece907ea64
.
12 years ago