| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/693006
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In commit 271c330 we stopped determining mountpoint already when we were
testing for $CHROOT value. However, $CHROOT is the mountpoint we are looking
for when no additional volumes were mounted.
This sanity check should only get triggered when we reached "/" while looping
through path for logfile.
Fixes 271c330 ("initrd.scripts: preserve_log(): Add support for additional mountpoints")
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
| |
It'll eliminate need of doing dozfs=cache.
Link: https://github.com/zfsonlinux/zfs/pull/9109
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
This commit will add support for copying init.log to $NEWROOT/var/log/genkernel-boot.log
for example even when $NEWROOT/var/log is an own partition.
To make this work, you must tell genkernel via /etc/initramfs.mounts
to mount the additional mount point.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
| |
Call to verbose_kmsg() was moved in commit 5842219. No need to keep this
any longer.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
- We no longer use $GK_SHELL_LOCKFILE which was removed in
in previous commit ("initrd.scripts: run_shell(): Use LOCK file").
- We now try to kill all $SH processes allowing to use resume-boot
in remote and local rescue shell.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit will bring back read timeout which was removed in
Commit a280829. Read timeout is still disabled by default but
can now be controlled via gk.prompt.timeout kernel command-line
argument.
When gk.prompt.timeout is != 0, the current prompt will be written
to $GK_PROMPT_FILE. This will allow remote user to notice that
there's a prompt.
In addition, on timeout, $GK_PROMPT_FILE will be read allowing
remote user to answer prompt and hopefully to fix the problem
and resume booting.
To make this work, gk.prompt.timeout will be set to 30 seconds
by default when SSH usage is enabled.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
| |
This code shouldn't work (anymore) because $CHROOT is read-only at
this stage.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
raidautorun applet is upstream's replacement for mdstart.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default, any {bad,good,warn}_msg output and external command calls
will now be logged to /tmp/init.log in initramfs. This can be turned
off via gk.log.disabled={1,yes} kernel command-line argument.
This is especially helpful when working with remote servers when you
can access initramfs system through SSH.
In addition, initramfs' log file can be preserved, i.e. copied to
real system just before switch_root call. This can be controlled
via gk.log.keep kernel command-line argument: When just enabled,
initramfs will copy log to $NEWROOT/genkernel-boot.log. Keep in my
that the file path must be accessible for initramfs and by default,
initramfs will only mount / as $NEWROOT and no additional mountpoints.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Make sure we set console after processing CMDLINE so that we will
use last set console which matches kernel documentation.
- Strip any set option from console= value.
- Regain control after spawning a shell.
Bug: https://bugs.gentoo.org/473128
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
| |
We cannot write PID because we use exec and don't return
before the shell we just spawned was closed.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
When using SIGTERM, running terminal would require a "reset"
because cryptsetup cannot restore fds.
Using SIGINT will end cryptsetup prompt gracefully allowing
cryptsetup to restore fds and keep terminal working.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit will introduce $GK_DEBUGMODE_STATEFILE and a new
function is_debug() to check if debug mode is enabled or not.
Using a state file instead of a variable will allow us to
enable/disable debug mode from outside:
I.e. when you have booted in debug mode and are working remotely,
you can now remove the state file, which will disable debug mode.
This will allow you to resume booting without dropping in
another local debug shell.
It works the other way, too: When you did NOT boot in debug
mode but experiencing a problem and want to drop in another
debug shell after next step, you can now enable debug mode by
creating the state file.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Hide busybox version
- Show genkernel version
- Show running kernel version
- Use emphasis (bold format) in text
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
- Enable FEATURE_FAST_TOP by default
- Unset SVOK by default
- Enable WALL by default
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
| |
/dev/tty1 is used by local debug shell for example.
Fixes: cf85138 ("initramfs: Don't call mknod when --busybox is used")
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
real_root=/dev/nfs
At this stage we already have mounted root over network so we
should not bring down the network interface.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When kernel was built with CONFIG_IP_PNP_DHCP=y option for example and
ip=dhcp was specified on kernel command-line, interface maybe already
up and running (configured). In this case it doesn't make any sense to
fire up udhcpc which would only get the same network configuration.
However, when interface is already up but manual IP configuration was
specified, we must restart interface to get back into a known state and
apply our own configuration like told by the user because we support
more complex configurations.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit will change default kernel and initramfs filename:
kernel-genkernel-%%ARCH%%-%%KV%% -> vmlinuz-%%KV%%
System.map-genkernel--%%ARCH%%-%%KV%% -> System.map-%%KV%%
initramfs-genkernel-%%ARCH%%-%%KV%% -> initramfs-%%KV%%.img
The new naming will be consistent with kernel's "make install" and
will allow to match files in /lib/modules with actual kernel.
In addition, $ARCH value was moved to kernel's LOCALVERSION. This will
ensure that this information is still present and when you do
cross-compilation, that /lib/modules content don't get mixed.
Bug: https://bugs.gentoo.org/390407
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New options like --initramfs-filename or --kernel-filename will
allow user to customize filenames used when installing initramfs
or kernel into $BOOTDIR. Therefore --kernelname (KNAME) option
was removed.
Filename can contain placeholders like '%%ARCH%%' which will get
replaced at runtime. Man page contains more information.
Bug: https://bugs.gentoo.org/395095
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/442102
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
This will basically allow us to run genkernel as user.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
To avoid problems related to drivers requiring special firmware which
might be not available when loading the module because the user don't really
need that module but it was added based on genkernel's module_load file,
we will no longer load network modules on boot.
Instead we will only load network modules when needed, for example
when dosshd is set or NFS is used.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
missing
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
| |
is missing
In addition, try to detect when udhcpc failed.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
| |
root device
Bug: https://bugs.gentoo.org/520018
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/520018
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this change we converted $ROOTDELAY into microseconds and
decremented that value on each loop iteration. Once that value was
<=0 we threw a timeout.
Because we substracted a fixed value we didn't take into account that
a command from loop could already have taken some time. During testing,
in worst case, running with ROOTDELAY=10 and invalid root=UUID= parameter,
it was seen that it took up to ~35s instead of 10s before linuxrc
prompted for new root value.
With this change, we now set a timeout based on current time in seconds
+ ROOTDELAY. Loop will end if current time is >= timeout.
In addition, ROOTDELAY default value was changed from 1 to 5.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
It really makes no sense to timeout while reading user input: We
only prompt when we are unable to continue. It's very unlikely
that we are able to continue after some time without any changes.
Instead, given that it can take some time to enter requested information,
a timeout will likely result in bad user experience when user run
into timeout while typing an UUID for example.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
already present
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
| |
The idea of that loop is to respect ROOTDELAY and allow for slow
devices to come up. But if we will prompt already on first failure,
this doesn't work.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
| |
Normal findfs is already 'busybox findfs'.
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
| |
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
If the root device specified by the user is invalid then all
we are going to lose is the possibility to ask for a new root
device in a nice way. So no need to be smart here.
Closes: https://bugs.gentoo.org/479730
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
|