Running as a VM under Parallels on MacOS. Used to boot fine - circa 10secs - now it's taking over 2 minutes and it's all in kernel (systems-analyze time):
Startup finished in 2min 2.911s (kernel) + 5.163s (userspace) = 2min 8.075s
graphical.target reached after 5.138s in userspace
This can be seen in dmesg, a portion copied below:
...[snip]...
[ 2.673238] fb0: switching to prldrmfb from VESA VGA
[ 2.673270] usb usb4: Manufacturer: Linux 5.11.0-34-generic xhci-hcd
[ 2.673658] scsi host4: ahci
[ 2.674010] usb usb4: SerialNumber: 0000:00:1d.6
[ 2.674971] Console: switching to colour dummy device 80x25
[ 2.676406] scsi host5: ahci
[ 2.679839] scsi host6: ahci
[ 2.680667] input: Parallels Virtual Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.0/0003:203A:FFFC.0001/input/input5
[ 2.680864] hid-generic 0003:203A:FFFC.0001: input,hidraw0: USB HID v1.10 Mouse [Parallels Virtual Mouse] on usb-0000:00:1d.0-1/input0
[ 2.683355] input: Parallels Virtual Mouse as /devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1:1.1/0003:203A:FFFC.0002/input/input6
[ 2.683414] hid-generic 0003:203A:FFFC.0002: input,hidraw1: USB HID v1.10 Mouse [Parallels Virtual Mouse] on usb-0000:00:1d.0-1/input1
[ 2.683596] scsi host7: ahci
[ 2.683829] ata3: SATA max UDMA/133 abar m8192@0xf0200000 port 0xf0200100 irq 26
[ 2.683834] ata4: SATA max UDMA/133 abar m8192@0xf0200000 port 0xf0200180 irq 26
[ 2.683836] ata5: SATA max UDMA/133 abar m8192@0xf0200000 port 0xf0200200 irq 26
[ 2.683839] ata6: SATA max UDMA/133 abar m8192@0xf0200000 port 0xf0200280 irq 26
[ 2.683860] ata7: SATA max UDMA/133 abar m8192@0xf0200000 port 0xf0200300 irq 26
[ 2.683864] ata8: SATA max UDMA/133 abar m8192@0xf0200000 port 0xf0200380 irq 26
[ 2.685452] hub 4-0:1.0: USB hub found
[ 2.686996] hub 4-0:1.0: 12 ports detected
[ 2.688647] fbcon: prldrmfb (fb0) is primary device
[ 2.689689] Console: switching to colour frame buffer device 100x37
[ 2.690984] prl_vid 0000:01:00.0: [drm] fb0: prldrmfb frame buffer device
[ 2.693005] virtio_net virtio0 enp0s5: renamed from eth0
[ 2.709721] [drm] Initialized prl_vid 1.7.0 20210909 for 0000:01:00.0 on minor 0
[ 3.002031] ata3: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 3.002473] ata3.00: ATA-8: Ubuntu Linux-0 SSD, F.NB0GRW, max UDMA/100
[ 3.002509] ata3.00: 1073741824 sectors, multi 0: LBA48 NCQ (depth 32)
[ 3.002963] ata3.00: configured for UDMA/100
[ 3.003413] scsi 2:0:0:0: Direct-Access ATA Ubuntu Linux-0 S 0GRW PQ: 0 ANSI: 5
[ 3.003754] sd 2:0:0:0: Attached scsi generic sg0 type 0
[ 3.004067] sd 2:0:0:0: [sda] 1073741824 512-byte logical blocks: (550 GB/512 GiB)
[ 3.004093] sd 2:0:0:0: [sda] 4096-byte physical blocks
[ 3.004954] sd 2:0:0:0: [sda] Write Protect is off
[ 3.005716] sd 2:0:0:0: [sda] Mode Sense: 00 3a 00 00
[ 3.005762] sd 2:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 3.027611] sda: sda1 sda2 < sda5 >
[ 3.050540] sd 2:0:0:0: [sda] Attached SCSI disk
[ 3.318699] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 3.320847] ata4.00: ATAPI: Virtual DVD-ROM [1], FWR1, max UDMA/25
[ 3.322856] ata4.00: configured for UDMA/25
[ 3.325443] scsi 3:0:0:0: CD-ROM Virtual DVD-ROM R103 PQ: 0 ANSI: 5
[ 3.383265] sr 3:0:0:0: [sr0] scsi3-mmc drive: 44x/44x cd/rw xa/form2 cdda tray
[ 3.384340] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 3.446214] sr 3:0:0:0: Attached scsi CD-ROM sr0
[ 3.446545] sr 3:0:0:0: Attached scsi generic sg1 type 5
[ 3.563878] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input4
[ 3.764290] ata5: SATA link down (SStatus 0 SControl 300)
[ 4.082980] ata6: SATA link down (SStatus 0 SControl 300)
[ 4.397906] ata7: SATA link down (SStatus 0 SControl 300)
[ 4.718538] ata8: SATA link down (SStatus 0 SControl 300)
[ 122.808488] EXT4-fs (sda5): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
[ 122.927189] systemd[1]: Inserted module 'autofs4'
[ 122.947246] systemd[1]: systemd 245.4-4ubuntu3.11 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=hybrid)
[ 122.948345] systemd[1]: Detected virtualization kvm.
[ 122.948681] systemd[1]: Detected architecture x86-64.
[ 122.967752] systemd[1]: Set hostname to <ubuntu-vm>.
[ 123.102544] systemd[1]: /etc/systemd/system/prltoolsd.service:13: PIDFile= references a path below legacy directory /var/run/, updating /var/run/prltoolsd.pid → /run/prltoolsd.pid; please update the unit file accordingly.
[ 123.143913] systemd[1]: Created slice system-modprobe.slice.
[ 123.149406] systemd[1]: Created slice system-systemd\x2dfsck.slice.
[ 123.150410] systemd[1]: Created slice User and Session Slice.
...[snip]...
I can't tell if the delay is caused by mounting sda5 (it does say 'mounted...' which implies it has finished) or something else, e.g. an issue with ata8. I don't know enough about Linux to be confident in this statement but I'm wondering if that many drives is related to (A) my Mac hard disk; (B) my connected SSD with the Linux VM on it; (c) mapped folders from the Mac.
I've tried booting without the quiet and splash options in grub but all I see is the long pause as shown above. This is all before Journalctl and syslog get a look in so I can't find anything in there.
system-analyze blame or critical-chain show nothing useful.
I've tried booting with grub set to do no fsck but didn't help. I've compared UUIDs:
/dev/sda5: UUID="0363354f-f8fb-46b5-a6f3-2cdefd508240" TYPE="ext4" PARTUUID="77746e54-05"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/loop4: TYPE="squashfs"
/dev/loop5: TYPE="squashfs"
/dev/loop6: TYPE="squashfs"
/dev/loop7: TYPE="squashfs"
/dev/sda1: UUID="D46A-1225" TYPE="vfat" PARTUUID="77746e54-01"
/dev/loop8: TYPE="squashfs"
/dev/loop9: TYPE="squashfs"
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda5 during installation
UUID=0363354f-f8fb-46b5-a6f3-2cdefd508240 / ext4 errors=remount-ro 0 1
# /boot/efi was on /dev/sda1 during installation
UUID=D46A-1225 /boot/efi vfat umask=0077 0 1
/swapfile none swap sw 0 0
fdisk -l shows:
...[snip]...
Disk /dev/sda: 512 GiB, 549755813888 bytes, 1073741824 sectors
Disk model: Ubuntu Linux-0 S
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x77746e54
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 1050623 1048576 512M b W95 FAT32
/dev/sda2 1052670 1073739775 1072687106 511.5G 5 Extended
/dev/sda5 1052672 1073739775 1072687104 511.5G 83 Linux
Partition 2 does not start on physical sector boundary.
...[snip]...
I don't think that partition alignment is the issue, but could be wrong I suppose, because I haven't done anything with the disk image since creating it and, as I say, the problem only started recently. The only things recently installed are Ubuntu-base fixes through Software-Updater but I can't pinpoint it to a specific time or event.
I'm stuck on how to troubleshoot this further, does anyone have any ideas?
EDIT: Disk mappings
ls -l /dev/disk/by-path/
total 0
lrwxrwxrwx 1 root root 9 Sep 13 16:24 pci-0000:00:1f.2-ata-1 -> ../../sda
lrwxrwxrwx 1 root root 10 Sep 13 16:24 pci-0000:00:1f.2-ata-1-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Sep 13 16:24 pci-0000:00:1f.2-ata-1-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Sep 13 16:24 pci-0000:00:1f.2-ata-1-part5 -> ../../sda5
lrwxrwxrwx 1 root root 9 Sep 13 16:24 pci-0000:00:1f.2-ata-2 -> ../../sr0
Also:
grep '[0-9]' /sys/class/scsi_host/host{0..9}/unique_id
/sys/class/scsi_host/host0/unique_id:1
/sys/class/scsi_host/host1/unique_id:2
/sys/class/scsi_host/host2/unique_id:3
/sys/class/scsi_host/host3/unique_id:4
/sys/class/scsi_host/host4/unique_id:5
/sys/class/scsi_host/host5/unique_id:6
/sys/class/scsi_host/host6/unique_id:7
/sys/class/scsi_host/host7/unique_id:8
ls -lisah /sys/block
total 0
3899 0 drwxr-xr-x 2 root root 0 Sep 13 16:22 .
1 0 dr-xr-xr-x 13 root root 0 Sep 13 16:22 ..
17686 0 lrwxrwxrwx 1 root root 0 Sep 13 16:24 loop0 -> ../devices/virtual/block/loop0
17831 0 lrwxrwxrwx 1 root root 0 Sep 13 16:24 loop1 -> ../devices/virtual/block/loop1
29992 0 lrwxrwxrwx 1 root root 0 Sep 13 16:39 loop10 -> ../devices/virtual/block/loop10
17976 0 lrwxrwxrwx 1 root root 0 Sep 13 16:24 loop2 -> ../devices/virtual/block/loop2
18121 0 lrwxrwxrwx 1 root root 0 Sep 13 16:24 loop3 -> ../devices/virtual/block/loop3
18266 0 lrwxrwxrwx 1 root root 0 Sep 13 16:24 loop4 -> ../devices/virtual/block/loop4
18411 0 lrwxrwxrwx 1 root root 0 Sep 13 16:24 loop5 -> ../devices/virtual/block/loop5
18556 0 lrwxrwxrwx 1 root root 0 Sep 13 16:24 loop6 -> ../devices/virtual/block/loop6
18701 0 lrwxrwxrwx 1 root root 0 Sep 13 16:24 loop7 -> ../devices/virtual/block/loop7
26265 0 lrwxrwxrwx 1 root root 0 Sep 13 16:24 loop8 -> ../devices/virtual/block/loop8
26417 0 lrwxrwxrwx 1 root root 0 Sep 13 16:24 loop9 -> ../devices/virtual/block/loop9
25047 0 lrwxrwxrwx 1 root root 0 Sep 13 16:22 sda -> ../devices/pci0000:00/0000:00:1f.2/ata3/host2/target2:0:0/2:0:0:0/block/sda
25348 0 lrwxrwxrwx 1 root root 0 Sep 13 16:34 sr0 -> ../devices/pci0000:00/0000:00:1f.2/ata4/host3/target3:0:0/3:0:0:0/block/sr0
So I have host4-6 defined but nothing for those hosts, just hosts 2 and 3 (which seem ok in the boot messages.)