When a kernel module fails to load, produce a warning instead of
an error and skip that module instead of halting the system.
Currently uses progress() for the warning, we may need a better
alternative.
Signed-off-by: Alain Kalker <a.c.kalker@gmail.com>
Add support for iSCSI mounts.
Based on the work by Yann Cézard <eesprit@free.fr> , adapted to the new syntax.
Example usage:
Example 1: Autoconfigure network based on iBFT, autologin to iSCSI target
based on iBFT, mount partition with label 'Storage':
disk=ISCSI=auto,LABEL=Storage
Example 2: Specify any needed iSCSI options, mount partition 1 on /dev/sdb:
disk=ISCSI=param1=val1,param2=val2,...,/dev/sdb1
Note: the parameter after the very last comma _must_ be a valid LABEL=, UUID=
or device path.
Signed-off-by: Alain Kalker <a.c.kalker@gmail.com>
This adds the possibility of specifying extra mount options for NFS mounts.
Example usage: disk=NFS=192.168.1.1:/export,proto=udp
Feature request and patch submitted by: Björn Ketelaars <bjorn.ketelaars@hydroxide.nl>
Signed-off-by: Alain Kalker <a.c.kalker@gmail.com>
Use consistent whitespace for all `progress "..."` lines.
Don't mount $disk if it is not set (e.g. in the installer).
Don't check for /storage/$OVERLAY_DIR, just create it.
Move the overlay functionality into an if statement.
Don't move /storage if $disk is not set (e.g. in the installer).
Signed-off-by: Alain Kalker <a.c.kalker@gmail.com>
This fixes overlay mount so it doesn't add $OVERLAY_DIR at the end of the
parameter list.
Kernel commandline parameter 'overlay' should now work for both NFS and
CIFS/SMB mounts, but alas, busybox CIFS mount doesn't (yet) support subdir
mounts (regular mount does). Leaving this in for posterity.
Signed-off-by: Alain Kalker <a.c.kalker@gmail.com>
When debugging, any information about the problem is valuable, so don't
suppress output.
Add a variable: SILENT_OUT whose value is the file descriptor to use for
commands that should normally be silent.
Idea taken from buildsystem's config/path , and slightly shortened.
Signed-off-by: Alain Kalker <a.c.kalker@gmail.com>
Example usage:
disk=CIFS=//192.168.1.1/share,user=name,password=secret
disk=SMB=//192.168.1.1/public,user=guest
Note: comma's ',' are not allowed in
CIFS options (for example in usernames or passwords) because they are used
to separate options.
Note: SMB is an alias for CIFS, for people who are more used to that name.
Signed-off-by: Alain Kalker <a.c.kalker@gmail.com>
Adds a new kernel commandline parameter: overlay , which enables multiple
clients to use a single configuration file while keeping their storage mounts
separate. For the given example, the storage mounts will be under
/var/lib/overlay/<mac-address>
This will only work with mount types which support subdirectory mounts.
Example usage: disk=NFS=192.168.1.1:/var/lib/overlay overlay
Signed-off-by: Alain Kalker <a.c.kalker@gmail.com>
Changes to kernel commandline parameters:
Remove legacy parameters, to be added back later if desired.
Add a new parameter: break=<all|step,step,...> which will cause a debugging
shell to be started after each or the specified boot steps.
Functions:
mount_part, mount_disk, mount_nbd: reorganize to use mount type handlers, which
will support specifying kernel parameters like boot=TYPE=target and
disk=TYPE=target. This initial commit only has mount_default, which supports
LABEL=label and UUID=uuid, as well as block devices /dev/* and image files.
error: show more meaningful error messages, containing the boot step and action
which caused the error.
If not debugging, halt the system. This prevents the error from causing more
damage further on in the boot sequence. If debugging, start a debugging shell.
update: make sure the file to update already exists at the destination, to
prevent clobbering a rootfs mounted on /flash, which can be the case when
mounting a mtd or NBD device.
load_modules: enable loading of kernel modules in early boot, e.g. xhci-hcd
to enable mount of USB3 devices on boot.
Add a simple boot step sequencer, which allows for starting a debugging shell
after each step.
Signed-off-by: Alain Kalker <a.c.kalker@gmail.com>