Age | Commit message (Collapse) | Author |
|
This function was overly abstracted, as all it did was reorder arguments
to call the mount function. Replaced the one call to this with the mount
call.
Also fixed one if statement syntax.
|
|
Both the clear and cat commands are not technically required, as they
have bash builtin equivelants. This will shave off tens of kilobytes
(very little unfortunately).
This also changes the syntax of the parse_cmdline function to something
more reasonable, also no longer using cat but using a bash builtin.
|
|
This option existed previously to handle luks encrypted root volumes.
However, recent changes allow the init process to detect at runtime
encrypted root volumes that are set with the `root` option, so this
option is no longer needed and effectively does nothing at this point
besides break encrypted device detection when used next to `root`. It is
required to only use `root` now.
|
|
With the `/dev/disk` directory tree now filled out, we no longer need
blkid and cut to determine device paths based on aliases such as
partlabel or uuid. This also simplifies the code, using bash-native
parameter expansion to cut substrings.
|
|
|
|
Previously block device aliases did not load correctly, so the direct
`/dev/nvme*` path for example was required as `/dev/disk/by-*` was not
available at all for mounting by partlabel or uuid.
This adds the udevadm and udevd binaries so the /dev/disk directory tree
can be populated during init, allowing for block device aliases. This
also does some cleanup and organization to improve the over code
quality.
|
|
Previously dm-crypt had to be statically compiled into the kernel, which
is cumbersome, not well documented, and makes the kernel larger.
This supports dm-crypt being an external module, adding rmmod and
modprobe to the initramfs, and copying in the relevant kernel modules
directory, stripping out graphics device support, bluetooth, sound,
virtualization, and networking support modules.
This also updates the copyright year.
|
|
|
|
|
|
The screen_init function was dependent on the value of the QUIET
variable, which previously was set after this function was called.
Moving this down allows for the QUIET variable to be set before it is
needed.
Also removed the 'Parsing command line options' log message.
|
|
Previously all logs were printed, no matter what. Now we read the global
variable QUIET (which is set by the presence of the kernel cmdline
variable 'quiet') to determine if certain messages should be displayed.
If quiet is enabled, info messages are not printed, but anything else
is. If quiet is not enabled, all messages print.
|
|
Previously, we were calling `init 6` to perform a reboot on failed
decryption operations. This caused the init script to call itself. Being
an init script for an initramfs, it ignored runlevels when called, so
this just restarted the boot process.
Now we use the sysrq trigger to perform the reboot.
|
|
|
|
|
|
The cryptsetup utility contains a 'isLuks' command which makes this
function uneeded. Updated call to this function with the cryptsetup
directive.
|
|
The cryptroot directive allows the user to specify a new root that might
appear post-decryption of the main root device. This allows users to
have encrypted devices that contain a partition table with multiple
partitions.
Updated README to reflect these changes. Also updated it to be a bit
more standard, added examples, reformatted directive descriptions, etc.
|
|
Previously, it was assumed that the encrypted device contained a single
filesystem. Now we run a partprobe on decrypt to detect an existing
partition table inside the container. Behavior with devices that just
contain a single filesystem is unaffected.
This adds the partprobe binary to the initramfs.
|
|
There is still some distance to go to make this script almost or
completely posix compliant. However, these changes will make the script
a bit more portable, as this commit removes certain bash-specific
functionalities. Also made a few changes to increase stability in edge
cases.
* Renamed "function name {...}" syntax to "name() {...}"
* Changed all if statements from bash specific [[ ]] to [ ].
* Quoted conditional variables
* Scoped a few function variables that were not previously
|
|
Previously, the device wait was hardcoded, regardless of device
presence. Now we wait 10 seconds, but if the device is present early,
the script can proceed before the threshold is reached. This should
speed up boot time by a few seconds.
|
|
Added a sleep 2 before attempting to access the specified root device to
allow for device settling (usb devices sometimes weren't ready yet and
causes init to fail). This needs to be replaced later by a
'wait_for_dev' function.
Added breakpoint to allow debugging for when the specified root device
does not exist.
Added a breakpoint for an init script not being detected in the
destination root fs.
Added breakpoint for failed switch_root.
Added many more log messages.
|
|
Interactive was spelled wrong. Also, the bash call was relative, not
absolute, which was causing kernel panics when interactive mode was
requested.
|
|
|
|
Now we support uuid specifications and labels through the use of blkid.
|
|
Drops the boot sequence into an interractive bash shell, just prior to
mounting the new root fs (the first step where real issues may occur).
This is mostly useful for debugging to see what the environment looks
like, manually mount partitions, etc.
|
|
Removed unused get_bin_deps function
Added function comments for all functions in mkinitramfs.
Added GPLv3 LICENSE file
Added GPLv3 licence header to mkinitramfs
Miscellaneous other code comments.
Added execute switch to mkinitramfs and init scripts
|
|
Added screen_init to print /etc/msg if it exists
Removed superfluous commented out code
Added mount of /dev type devtmpfs and /run type tmpfs
Added umount of /dev, /run, and /proc
Added switch_root failure contingency code
|
|
Now has logging function that supports initdebug cmdline option.
Renamed get_root_dev to parse_cmdline, since this function is used to
parse cmdline arguments now.
Added initdebug argument support to new parse_cmdline function
Fixed syntax error on writing failure log message
Changed to global variables. Now we have DEBUG and ROOTDEV, in lieu of
local rootdev. This allows the parse_cmdline function to update
variables to be used by other functions without storing all the parsing
code in main.
|
|
Also added checking for a kernel supporting dm-crypt in mkinitramfs.
Warns if module is not statically compmiled in.
|