if (data) { /* init_mount() requires a full page as fifth argument */
p = alloc_page(GFP_KERNEL); if (!p) return -ENOMEM;
data_page = page_address(p);
strscpy_pad(data_page, data, PAGE_SIZE);
}
ret = init_mount(name, "/root", fs, flags, data_page); if (ret) goto out;
scnprintf(b, BDEVNAME_SIZE, "unknown-block(%u,%u)",
MAJOR(ROOT_DEV), MINOR(ROOT_DEV)); if (root_fs_names)
num_fs = split_fs_names(fs_names, PAGE_SIZE); else
num_fs = list_bdev_fs_names(fs_names, PAGE_SIZE);
retry: for (i = 0, p = fs_names; i < num_fs; i++, p += strlen(p)+1) { int err;
if (!*p) continue;
err = do_mount_root(name, p, flags, root_mount_data); switch (err) { case0: goto out; case -EACCES: case -EINVAL: #ifdef CONFIG_BLOCK
init_flush_fput(); #endif continue;
} /* *Allowtheusertodistinguishbetweenfailedsys_open *andbadsuperblockonrootdevice. *andgivethemalistoftheavailabledevices
*/
printk("VFS: Cannot open root device \"%s\" or %s: error %d\n",
pretty_name, b, err);
printk("Please append a correct \"root=\" boot option; here are the available partitions:\n");
printk_all_partitions();
if (root_fs_names)
num_fs = list_bdev_fs_names(fs_names, PAGE_SIZE); if (!num_fs)
pr_err("Can't find any bdev filesystem to be used for mount!\n"); else {
pr_err("List of all bdev filesystems:\n"); for (i = 0, p = fs_names; i < num_fs; i++, p += strlen(p)+1)
pr_err(" %s", p);
pr_err("\n");
}
panic("VFS: Unable to mount root fs on %s", b);
} if (!(flags & SB_RDONLY)) {
flags |= SB_RDONLY; goto retry;
}
printk("List of all partitions:\n");
printk_all_partitions();
printk("No filesystem could mount root, tried: "); for (i = 0, p = fs_names; i < num_fs; i++, p += strlen(p)+1)
printk(" %s", p);
printk("\n");
panic("VFS: Unable to mount root fs on \"%s\" or %s", pretty_name, b);
out:
put_page(page);
}
if (nfs_root_data(&root_dev, &root_data)) goto fail;
/* *Theserverornetworkmaynotbeready,sotryseveral *times.Stopafterafewtriesincasetheclientwants *tofallbacktootherbootmethods.
*/
timeout = NFSROOT_TIMEOUT_MIN; for (try = 1; ; try++) { if (!do_mount_root(root_dev, "nfs", root_mountflags, root_data)) return; if (try > NFSROOT_RETRY_MAX) break;
/* Wait, in case the server refused us immediately */
ssleep(timeout);
timeout <<= 1; if (timeout > NFSROOT_TIMEOUT_MAX)
timeout = NFSROOT_TIMEOUT_MAX;
}
fail:
pr_err("VFS: Unable to mount root fs via NFS.\n");
} #else staticinlinevoid mount_nfs_root(void)
{
} #endif/* CONFIG_ROOT_NFS */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.