7 # if an nbd device is not somewhere in the chain of devices root is
8 # mounted on, fail the hostonly check.
9 [[ $hostonly ]] ||
[[ $mount_needs ]] && {
10 is_nbd
() { [[ -b /dev
/block
/$1 && $1 == 43:* ]] ;}
12 _rootdev
=$
(find_root_block_device
)
13 [[ -b /dev
/block
/$_rootdev ]] ||
return 1
14 check_block_and_slaves is_nbd
"$_rootdev" ||
return 255
16 require_binaries nbd-client ||
return 1
23 # We depend on network modules being loaded
24 echo network rootfs-block
35 inst_hook cmdline
90 "$moddir/parse-nbdroot.sh"
36 inst_script
"$moddir/nbdroot.sh" "/sbin/nbdroot"