Hi,

It also took 6+ hours to boot Linux using that disk image on my end, so I
think it's systemd being very slow.

By profiling systemd, I find that systemd took a lot of time to bring up
the networking service, and especially the "motd" (message of the day?)
service, which queries for updates from Ubuntu servers.

We can turn off the motd service, which would improve the booting time by a
lot. However, I don't really know how to turn off the network service.

I hope that somebody will help with the systemd stuff.

Regards,
Hoa Nguyen

On Fri, Feb 11, 2022 at 4:57 AM Νικόλαος Ταμπουρατζής via gem5-users <
gem5-users@gem5.org> wrote:

> Dear community,
>
> I have just downloaded the latest version of gem5 (v21.2.1) and I try
> to simulate the FS using the riscv-ubuntu-run.py
> (./build/RISCV/gem5.opt
> configs/example/gem5_library/riscv-ubuntu-run.py). It downloads
> automatically both riscv-ubuntu-20.04-img and
> riscv-bootloader-vmlinux-5.10. However, after 4 hours the system is
> not completely booted.
>
> How many hours it is required to boot?
> How can I disable the systemd services from riscv-ubuntu-20.04-img?
>
> I found the following link but I cannot emulate the image through
> qemu: http://resources.gem5.org/resources/riscv-ubuntu
>
> Best regards,
> Nikos
>
> Here is the output (through m5term):
>
> ==== m5 terminal: Terminal 0 ====
> [    0.000000] Linux version 5.10.0 (hn@amarillo)
> (riscv64-linux-gnu-gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld
> (GNU Binutils for Ubuntu) 2.30) #1 SMP Mon Jul 19 13:32:59 PDT 2021
> [    0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
> [    0.000000] efi: UEFI not found.
> [    0.000000] Zone ranges:
> [    0.000000]   DMA32    [mem 0x0000000080200000-0x00000000ffffffff]
> [    0.000000]   Normal   [mem 0x0000000100000000-0x000000013fffffff]
> [    0.000000] Movable zone start for each node
> [    0.000000] Early memory node ranges
> [    0.000000]   node   0: [mem 0x0000000080200000-0x000000013fffffff]
> [    0.000000] Initmem setup node 0 [mem
> 0x0000000080200000-0x000000013fffffff]
> [    0.000000] software IO TLB: mapped [mem
> 0x00000000fbfff000-0x00000000fffff000] (64MB)
> [    0.000000] SBI specification v0.1 detected
> [    0.000000] riscv: ISA extensions acdfim
> [    0.000000] riscv: ELF capabilities acdfim
> [    0.000000] percpu: Embedded 16 pages/cpu s26200 r8192 d31144 u65536
> [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages:
> 775175
> [    0.000000] Kernel command line: console=ttyS0 root=/dev/vda1 ro
> [    0.000000] Dentry cache hash table entries: 524288 (order: 10,
> 4194304 bytes, linear)
> [    0.000000] Inode-cache hash table entries: 262144 (order: 9,
> 2097152 bytes, linear)
> [    0.000000] Sorting __ex_table...
> [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
> [    0.000000] Memory: 3014996K/3143680K available (5866K kernel code,
> 3086K rwdata, 2048K rodata, 189K init, 341K bss, 128684K reserved, 0K
> cma-reserved)
> [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
> [    0.000000] rcu: Hierarchical RCU implementation.
> [    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to
> nr_cpu_ids=2.
> [    0.000000]  Tracing variant of Tasks RCU enabled.
> [    0.000000] rcu: RCU calculated value of scheduler-enlistment delay
> is 25 jiffies.
> [    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
> [    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
> [    0.000000] riscv-intc: 64 local interrupts mapped
> [    0.000000] plic: plic@c000000: mapped 10 interrupts with 2
> handlers for 4 contexts.
> [    0.000000] random: get_random_bytes called from
> start_kernel+0x316/0x496 with crng_init=0
> [    0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0]
> hartid [1]
> [    0.000000] clocksource: riscv_clocksource: mask:
> 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns
> [    0.000014] sched_clock: 64 bits at 10MHz, resolution 100ns, wraps
> every 4398046511100ns
> [    0.000269] Console: colour dummy device 80x25
> [    0.000322] Calibrating delay loop (skipped), value calculated
> using timer frequency.. 20.00 BogoMIPS (lpj=40000)
> [    0.000363] pid_max: default: 32768 minimum: 301
> [    0.000710] Mount-cache hash table entries: 8192 (order: 4, 65536
> bytes, linear)
> [    0.000776] Mountpoint-cache hash table entries: 8192 (order: 4,
> 65536 bytes, linear)
> [    0.002680] rcu: Hierarchical SRCU implementation.
> [    0.002885] EFI services will not be available.
> [    0.003051] smp: Bringing up secondary CPUs ...
> [    0.003724] smp: Brought up 1 node, 2 CPUs
> [    0.004415] devtmpfs: initialized
> [    0.006194] clocksource: jiffies: mask: 0xffffffff max_cycles:
> 0xffffffff, max_idle_ns: 7645041785100000 ns
> [    0.006230] futex hash table entries: 512 (order: 3, 32768 bytes,
> linear)
> [    0.006736] NET: Registered protocol family 16
> [    0.030604] vgaarb: loaded
> [    0.031121] SCSI subsystem initialized
> [    0.031625] usbcore: registered new interface driver usbfs
> [    0.031716] usbcore: registered new interface driver hub
> [    0.031801] usbcore: registered new device driver usb
> [    0.033017] clocksource: Switched to clocksource riscv_clocksource
> [    0.042536] NET: Registered protocol family 2
> [    0.043824] tcp_listen_portaddr_hash hash table entries: 2048
> (order: 3, 32768 bytes, linear)
> [    0.043977] TCP established hash table entries: 32768 (order: 6,
> 262144 bytes, linear)
> [    0.045452] TCP bind hash table entries: 32768 (order: 7, 524288
> bytes, linear)
> [    0.047006] TCP: Hash tables configured (established 32768 bind 32768)
> [    0.047159] UDP hash table entries: 2048 (order: 4, 65536 bytes, linear)
> [    0.047434] UDP-Lite hash table entries: 2048 (order: 4, 65536
> bytes, linear)
> [    0.047867] NET: Registered protocol family 1
> [    0.048364] RPC: Registered named UNIX socket transport module.
> [    0.048386] RPC: Registered udp transport module.
> [    0.048407] RPC: Registered tcp transport module.
> [    0.048430] RPC: Registered tcp NFSv4.1 backchannel transport module.
> [    0.048455] PCI: CLS 0 bytes, default 64
> [    0.049441] workingset: timestamp_bits=62 max_order=20 bucket_order=0
> [    0.065711] NFS: Registering the id_resolver key type
> [    0.065789] Key type id_resolver registered
> [    0.065809] Key type id_legacy registered
> [    0.066012] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
> [    0.066503] NET: Registered protocol family 38
> [    0.066560] Block layer SCSI generic (bsg) driver version 0.4
> loaded (major 254)
> [    0.066583] io scheduler mq-deadline registered
> [    0.066604] io scheduler kyber registered
> [    0.123474] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
> [    0.125216] printk: console [ttyS0] disabled
> [    0.125267] 10000000.uart: ttyS0 at MMIO 0x10000000 (irq = 1,
> base_baud = 230400) is a 8250
> [    0.128120] printk: console [ttyS0] enabled
> [    0.128546] [drm] radeon kernel modesetting enabled.
> [    0.136743] loop: module loaded
> [    0.137115] virtio_blk virtio0: [vda] 28311552 512-byte logical
> blocks (14.5 GB/13.5 GiB)
> [    0.137180] vda: detected capacity change from 0 to 14495514624
> [    0.141193]  vda: vda1 vda12 vda13 vda14 vda15
> [    0.143968] libphy: Fixed MDIO Bus: probed
> [    0.145274] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
> [    0.145323] ehci-pci: EHCI PCI platform driver
> [    0.145415] ehci-platform: EHCI generic platform driver
> [    0.145522] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
> [    0.145569] ohci-pci: OHCI PCI platform driver
> [    0.145661] ohci-platform: OHCI generic platform driver
> [    0.146095] usbcore: registered new interface driver uas
> [    0.146215] usbcore: registered new interface driver usb-storage
> [    0.146407] mousedev: PS/2 mouse device common for all mice
> [    0.146782] usbcore: registered new interface driver usbhid
> [    0.146824] usbhid: USB HID core driver
> [    0.148347] NET: Registered protocol family 10
> [    0.149582] Segment Routing with IPv6
> [    0.149730] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
> [    0.150694] NET: Registered protocol family 17
> [    0.150832] Key type dns_resolver registered
> [    0.154215] EXT4-fs (vda1): INFO: recovery required on readonly
> filesystem
> [    0.154269] EXT4-fs (vda1): write access will be enabled during recovery
> [    0.243877] EXT4-fs (vda1): recovery complete
> [    0.244090] EXT4-fs (vda1): mounted filesystem with ordered data
> mode. Opts: (null)
> [    0.244181] VFS: Mounted root (ext4 filesystem) readonly on device
> 254:1.
> [    0.244469] devtmpfs: mounted
> [    0.244648] Freeing unused kernel memory: 188K
> [    0.245022] Run /sbin/init as init process
>
> [    0.311595] systemd[1]: System time before build time, advancing clock.
> [    0.319136] random: fast init done
> [    0.339740] systemd[1]: systemd 245.4-4ubuntu3.13 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)
> [    0.340109] systemd[1]: Detected architecture riscv64.
>
> Welcome to Ubuntu 20.04.3 LTS!
>
> [    0.342577] systemd[1]: Set hostname to <ubuntu>.
> [    0.629637] random: lvmconfig: uninitialized urandom read (4 bytes read)
> [    1.914376] random: systemd: uninitialized urandom read (16 bytes read)
> [    1.916631] systemd[1]: Created slice system-modprobe.slice.
> [  OK  ] Created slice system-modprobe.slice.
> [    1.917793] random: systemd: uninitialized urandom read (16 bytes read)
> [    1.918768] systemd[1]: Created slice system-serial\x2dgetty.slice.
> [  OK  ] Created slice system-serial\x2dgetty.slice.
> [    1.919825] random: systemd: uninitialized urandom read (16 bytes read)
> [    1.920817] systemd[1]: Created slice system-systemd\x2dfsck.slice.
> [  OK  ] Created slice system-systemd\x2dfsck.slice.
> [    1.922613] systemd[1]: Created slice User and Session Slice.
> [  OK  ] Created slice User and Session Slice.
> [    1.924053] systemd[1]: Started Forward Password Requests to Wall
> Directory Watch.
> [  OK  ] Started Forward Password R…uests to Wall Directory Watch.
> [    1.925642] systemd[1]: Condition check resulted in Arbitrary
> Executable File Formats File System Automount Point being skipped.
> [    1.926437] systemd[1]: Reached target User and Group Name Lookups.
> [  OK  ] Reached target User and Group Name Lookups.
> [    1.927723] systemd[1]: Reached target Slices.
> [  OK  ] Reached target Slices.
> [    1.928838] systemd[1]: Reached target Swap.
> [  OK  ] Reached target Swap.
> [    1.930581] systemd[1]: Listening on Device-mapper event daemon FIFOs.
> [  OK  ] Listening on Device-mapper event daemon FIFOs.
> [    1.932305] systemd[1]: Listening on LVM2 poll daemon socket.
> [  OK  ] Listening on LVM2 poll daemon socket.
> [    1.933771] systemd[1]: Listening on multipathd control socket.
> [  OK  ] Listening on multipathd control socket.
> [    1.935386] systemd[1]: Listening on Syslog Socket.
> [  OK  ] Listening on Syslog Socket.
> [    1.937105] systemd[1]: Listening on fsck to fsckd communication Socket.
> [  OK  ] Listening on fsck to fsckd communication Socket.
> [    1.938542] systemd[1]: Listening on initctl Compatibility Named Pipe.
> [  OK  ] Listening on initctl Compatibility Named Pipe.
> [    1.948553] systemd[1]: Condition check resulted in Journal Audit
> Socket being skipped.
> [    1.949458] systemd[1]: Listening on Journal Socket (/dev/log).
> [  OK  ] Listening on Journal Socket (/dev/log).
> [    1.951257] systemd[1]: Listening on Journal Socket.
> [  OK  ] Listening on Journal Socket.
> [    1.953548] systemd[1]: Listening on Network Service Netlink Socket.
> [  OK  ] Listening on Network Service Netlink Socket.
> [    1.955258] systemd[1]: Listening on udev Control Socket.
> [  OK  ] Listening on udev Control Socket.
> [    1.956745] systemd[1]: Listening on udev Kernel Socket.
> [  OK  ] Listening on udev Kernel Socket.
> [    1.958904] systemd[1]: Condition check resulted in Huge Pages File
> System being skipped.
> [    1.962932] systemd[1]: Mounting POSIX Message Queue File System...
>           Mounting POSIX Message Queue File System...
> [    1.965016] systemd[1]: Condition check resulted in Kernel Debug
> File System being skipped.
> [    1.966057] systemd[1]: Condition check resulted in Kernel Trace
> File System being skipped.
> [    1.971879] systemd[1]: Starting Journal Service...
>           Starting Journal Service...
> [    1.978118] systemd[1]: Starting Set the console keyboard layout...
>           Starting Set the console keyboard layout...
> [    1.979297] systemd[1]: Condition check resulted in Create list of
> static device nodes for the current kernel being skipped.
> [    1.983066] systemd[1]: Starting Monitoring of LVM2 mirrors,
> snapshots etc. using dmeventd or progress polling...
>           Starting Monitoring of LVM…meventd or progress polling...
> [    1.984562] systemd[1]: Condition check resulted in Load Kernel
> Module drm being skipped.
> [    1.985098] systemd[1]: Condition check resulted in OpenVSwitch
> configuration for cleanup being skipped.
> [    1.987314] systemd[1]: Condition check resulted in Set Up
> Additional Binary Formats being skipped.
> [    1.991069] systemd[1]: Starting File System Check on Root Device...
>           Starting File System Check on Root Device...
> [    2.001958] systemd[1]: Starting Load Kernel Modules...
>           Starting Load Kernel Modules...
> [    2.013850] systemd[1]: Starting udev Coldplug all Devices...
>           Starting udev Coldplug all Devices...
> [    2.036294] systemd[1]: Starting Uncomplicated firewall...
>           Starting Uncomplicated firewall...
> [    2.077993] systemd[1]: Mounted POSIX Message Queue File System.
> [  OK  ] Mounted POSIX Message Queue File System.
> [    2.094648] systemd[1]: Finished Uncomplicated firewall.
> [  OK  ] Finished Uncomplicated firewall.
> [    2.126801] systemd[1]: Finished Load Kernel Modules.
> [  OK  ] Finished Load Kernel Modules.
> [    2.129153] systemd[1]: Condition check resulted in FUSE Control
> File System being skipped.
> [    2.129982] systemd[1]: Condition check resulted in Kernel
> Configuration File System being skipped.
> [    2.137942] systemd[1]: Started File System Check Daemon to report
> status.
> [  OK  ] Started File System Check Daemon to report status.
> [    2.154265] systemd[1]: Starting Apply Kernel Variables...
>           Starting Apply Kernel Variables...
> [    2.247083] systemd[1]: Finished File System Check on Root Device.
> [  OK  ] Finished File System Check on Root Device.
> [    2.251803] systemd[1]: Starting Remount Root and Kernel File Systems...
>           Starting Remount Root and Kernel File Systems...
> [  OK  ] Finished Apply Kernel Variables.
> [  OK  ] Finished Remount Root and Kernel File Systems.
> [  OK  ] Started Journal Service.
>           Starting Flush Journal to Persistent Storage...
>           Starting Load/Save Random Seed...
>           Starting Create System Users...
> [  OK  ] Finished Create System Users.
>           Starting Create Static Device Nodes in /dev...
> [  OK  ] Finished Flush Journal to Persistent Storage.
> [  OK  ] Finished Create Static Device Nodes in /dev.
>           Starting udev Kernel Device Manager...
> [  OK  ] Started udev Kernel Device Manager.
>           Starting Network Service...
> [  OK  ] Finished udev Coldplug all Devices.
>           Starting udev Wait for Complete Device Initialization...
> [  OK  ] Found device /dev/ttyS0.
> [  OK  ] Found device /dev/hvc0.
> [  OK  ] Finished Monitoring of LVM… dmeventd or progress polling.
> [  OK  ] Finished Set the console keyboard layout.
> [  OK  ] Started Network Service.
> [  OK  ] Found device /dev/disk/by-label/UEFI.
> [  OK  ] Finished udev Wait for Complete Device Initialization.
>           Starting Device-Mapper Multipath Device Controller...
> [  OK  ] Started Dispatch Password …ts to Console Directory Watch.
> [  OK  ] Reached target Local Encrypted Volumes.
>           Starting Wait for Network to be Configured...
> [  OK  ] Finished Wait for Network to be Configured.
> [FAILED] Failed to start Device-Map…r Multipath Device Controller.
> See 'systemctl status multipathd.service' for details.
> [  OK  ] Reached target Local File Systems (Pre).
>           Starting File System Check on /dev/disk/by-label/UEFI...
> [  OK  ] Finished File System Check on /dev/disk/by-label/UEFI.
>           Mounting /boot/efi...
> [   11.496946] FAT-fs (vda15): codepage cp437 not found
> [FAILED] Failed to mount /boot/efi.
> See 'systemctl status boot-efi.mount' for details.
> [DEPEND] Dependency failed for Local File Systems.
>           Starting Set console font and keymap...
>           Starting Create final runt…dir for shutdown pivot root...
>           Starting Tell Plymouth To Write Out Runtime Data...
>           Starting Create Volatile Files and Directories...
> [  OK  ] Finished Create final runt…e dir for shutdown pivot root.
> [  OK  ] Finished Set console font and keymap.
> [  OK  ] Finished Tell Plymouth To Write Out Runtime Data.
> [  OK  ] Finished Create Volatile Files and Directories.
>           Starting Network Name Resolution...
>           Starting Network Time Synchronization...
>           Starting Update UTMP about System Boot/Shutdown...
> [  OK  ] Finished Update UTMP about System Boot/Shutdown.
> [  OK  ] Started Network Time Synchronization.
> [  OK  ] Reached target System Initialization.
> [  OK  ] Started Daily Cleanup of Temporary Directories.
> [  OK  ] Reached target Paths.
> [  OK  ] Reached target System Time Set.
> [  OK  ] Reached target System Time Synchronized.
> [  OK  ] Started Daily apt download activities.
> [  OK  ] Started Daily apt upgrade and clean activities.
> [  OK  ] Started Periodic ext4 Onli…ata Check for All Filesystems.
> [  OK  ] Started Discard unused blocks once a week.
> [  OK  ] Started Refresh fwupd metadata regularly.
> [  OK  ] Started Daily rotation of log files.
> [  OK  ] Started Daily man-db regeneration.
> [  OK  ] Started Message of the Day.
> [  OK  ] Started Ubuntu Advantage update messaging.
> [  OK  ] Reached target Timers.
> [  OK  ] Listening on Avahi mDNS/DNS-SD Stack Activation Socket.
> [  OK  ] Listening on D-Bus System Message Bus Socket.
> [  OK  ] Listening on Open-iSCSI iscsid Socket.
> [  OK  ] Listening on UUID daemon activation socket.
> [  OK  ] Reached target Sockets.
> [  OK  ] Reached target Basic System.
>           Starting Accounts Service...
>           Starting Avahi mDNS/DNS-SD Stack...
> [  OK  ] Started D-Bus System Message Bus.
>           Starting Network Manager...
> [  OK  ] Started Save initial kernel messages after boot.
>           Starting Remove Stale Onli…t4 Metadata Check Snapshots...
> [  OK  ] Started irqbalance daemon.
>           Starting Dispatcher daemon for systemd-networkd...
> [  OK  ] Started Set the CPU Frequency Scaling governor.
>           Starting Authorization Manager...
>           Starting Restore /etc/reso… the ppp link was shut down...
>           Starting System Logging Service...
>           Starting Login Service...
>           Starting Disk Manager...
>           Starting WPA supplicant...
> [  OK  ] Started Network Name Resolution.
> [  OK  ] Finished Restore /etc/reso…re the ppp link was shut down.
> [  OK  ] Reached target Host and Network Name Lookups.
> [  OK  ] Started System Logging Service.
> [  OK  ] Started Avahi mDNS/DNS-SD Stack.
> [  OK  ] Started WPA supplicant.
> [  OK  ] Started Network Manager.
> [  OK  ] Reached target Network.
>           Starting Network Manager Wait Online...
> [  OK  ] Started Authorization Manager.
>           Starting Modem Manager...
>           Starting Hostname Service...
> [  OK  ] Started Login Service.
> [  OK  ] Started Unattended Upgrades Shutdown.
> [  OK  ] Started Accounts Service.
> [  OK  ] Started Modem Manager.
> [  OK  ] Started Disk Manager.
> [  OK  ] Started Hostname Service.
>
>
> _______________________________________________
> gem5-users mailing list -- gem5-users@gem5.org
> To unsubscribe send an email to gem5-users-le...@gem5.org
> %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
_______________________________________________
gem5-users mailing list -- gem5-users@gem5.org
To unsubscribe send an email to gem5-users-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s
  • [gem5-users] risc... Νικόλαος Ταμπουρατζής via gem5-users
    • [gem5-users]... Hoa Nguyen via gem5-users
      • [gem5-us... Νικόλαος Ταμπουρατζής via gem5-users
        • [gem... Νικόλαος Ταμπουρατζής via gem5-users
          • ... Bobby Bruce via gem5-users
            • ... Νικόλαος Ταμπουρατζής via gem5-users
              • ... Νικόλαος Ταμπουρατζής via gem5-users
                • ... Bobby Bruce via gem5-users
                • ... Νικόλαος Ταμπουρατζής via gem5-users
                • ... Bobby Bruce via gem5-users
                • ... Bobby Bruce via gem5-users
                • ... Νικόλαος Ταμπουρατζής via gem5-users

Reply via email to