| Server IP : 85.143.209.190 / Your IP : 216.73.217.12 Web Server : Apache/2.4.63 (Ubuntu) System : Linux 49083.simplecloud.ru 5.4.0-205-generic #225-Ubuntu SMP Fri Jan 10 22:23:35 UTC 2025 x86_64 User : vozdvizhenka37 ( 1083) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /snap/core/current/usr/share/initramfs-tools/scripts/ |
Upload File : |
# -*- shell-script -*-
pre_mountroot()
{
local script_dir="/scripts/local-top"
[ "$quiet" != "y" ] && log_begin_msg "Running $script_dir"
run_scripts "$script_dir"
[ "$quiet" != "y" ] && log_end_msg
}
# Determine full path to disk partition given a filesystem label.
get_partition_from_label()
{
local label="$1"
[ -n "$label" ] || panic "need FS label"
# Make sure the device has been created by udev before looking for it
# Don't need to panic, since the output will be validated outside this function
wait-for-root "LABEL=$label" "${ROOTDELAY:-180}" >/dev/null || true
local part=$(find /dev -name "$label"|tail -1)
[ -z "$part" ] && return
local path=$(readlink -f "$part")
[ -n "$path" ] && echo "$path"
}
# setup $writable_mnt
do_root_mounting()
{
root="LABEL=$writable_label"
# Make sure the device has been created by udev before we try to mount
wait-for-root "$root" "${ROOTDELAY:-180}" || panic "unable to find root partition '$root'"
# FIXME: This is never false since we set $root above
[ -n "$root" ] || panic "no root partition specified"
if echo "$root" | grep -q ^/; then
path="$root"
else
# convert UUID/LABEL to a device name
path=$(findfs "$root" 2>/dev/null || :)
fi
[ -e "$path" ] || panic "root device $path does not exist"
# try loading squashfs, but don't fail if its e.g. in the kernel
# already
modprobe squashfs || true
if ! grep -q squashfs /proc/filesystems; then
panic "no squashfs support found in your system, aborting"
fi
# mount writable rw
path=$(get_partition_from_label "$writable_label")
mount "$path" "$writable_mnt"
}