Comment 21 for bug 1755863

Revision history for this message
thh (thh01217) wrote :

Based on in-depth analysis, I found the cause of the error:

“Apr 03 12:59:15 ubuntu systemd[1]: Failed to set up mount unit: Device or resource busy”

call tree on systemd mount.c & unit.c:
 mount_dispatch_io
  -> mount_load_proc_self_mountinfo
     -> mount_setup_unit
         -> mount_setup_existing_unit
             -> mount_add_extras
                 -> unit_set_default_slice:
                      -> unit_set_slice:
                         if (unit_active_state(u) != UNIT_INACTIVE)
                              return -EBUSY;

"unit_set_slice" return EBUSY always, because of nfsroot always active state in netbooting,

"mount_dispatch_io" give up updating mount state when "mount_load_proc_self_mountinfo" return the error.

finally, all systemd mount service failed and then goto emergency shell.