Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip log deletion on error #110

Merged
merged 1 commit into from
Dec 12, 2023
Merged

Skip log deletion on error #110

merged 1 commit into from
Dec 12, 2023

Conversation

dubeyabhishek
Copy link

skip removing root dir in case of error to
preserve debootstrap.log

skip removing root dir in case of error to
preserve debootstrap.log

Signed-off-by: Abhishek Dubey <adubey@linux.ibm.com>
Copy link
Collaborator

@chantra chantra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me. But please remove the index change.

INDEX Outdated Show resolved Hide resolved
@chantra chantra merged commit acc372f into libbpf:main Dec 12, 2023
4 checks passed
chantra added a commit to chantra/libbpf-ci that referenced this pull request Dec 12, 2023
Follow-up from libbpf#110

Signed-off-by: Manu Bretelle <chantr4@gmail.com>
@chantra
Copy link
Collaborator

chantra commented Dec 12, 2023

@dubeyabhishek do you mind validating that the ppc64le rootfs from https://github.com/chantra/libbpf-ci/tree/ppc64le_rootfs works for you?

@sharvipin
Copy link

Qemu is getting stuck with above rootfs. vmlinux used is from upstream kernel compiled with config generated from "make pseries_le_defconfig"

@sharvipin
Copy link

abhishekdubey:images$ qemu-system-ppc64 -nodefaults -display none -serial mon:stdio -m 4G -drive file="/home/abhishekdubey/rootfs/rootfs.img",format=raw,index=1,media=disk,if=scsi,cache=none -kernel "/home/abhishekdubey/linux/vmlinux" -append "root=/dev/sda rw console=hvc0"
qemu-system-ppc64: warning: TCG doesn't support requested feature, cap-cfpc=workaround
qemu-system-ppc64: warning: TCG doesn't support requested feature, cap-sbbc=workaround
qemu-system-ppc64: warning: TCG doesn't support requested feature, cap-ibs=workaround
qemu-system-ppc64: warning: TCG doesn't support requested feature, cap-ccf-assist=on

SLOF **********************************************************************
QEMU Starting
Build Date = Aug 20 2023 00:00:00
FW Version = mockbuild@ea6da09b015b4c5c944d64cdeb66398a release 20220719
Press "s" to enter Open Firmware.

Populating /vdevice methods
Populating /vdevice/vty@71000000
Populating /vdevice/nvram@71000001
Populating /vdevice/v-scsi@71000002
SCSI: Looking for devices
8100000000000000 DISK : "QEMU QEMU HARDDISK 2.5+"
Populating /pci@800000020000000
No NVRAM common partition, re-initializing...
Scanning USB
Using default console: /vdevice/vty@71000000
Detected RAM kernel at 400000 (2ae20d8 bytes)

Welcome to Open Firmware

Copyright (c) 2004, 2017 IBM Corporation All rights reserved.
This program and the accompanying materials are made available
under the terms of the BSD License available at
http://www.opensource.org/licenses/bsd-license.php

Booting from memory...
OF stdout device is: /vdevice/vty@71000000
Preparing to boot Linux version 6.7.0-rc4-00009-gbee0e7762ad2 (abhishekdubey@li-d5105e4c-3428-11b2-a85c-b5898f5f852f.ibm.com) (powerpc64le-linux-gnu-gcc (GCC) 13.2.1 20230728 (Red Hat Cross 13.2.1-1), GNU ld version 2.40-3.fc39) #1 SMP Wed Dec 13 13:13:54 IST 2023
Detected machine type: 0000000000000101
command line: root=/dev/sda rw console=hvc0
Max number of cores passed to firmware: 2048 (NR_CPUS = 2048)
Calling ibm,client-architecture-support... done
memory layout at init:
memory_limit : 0000000000000000 (16 MB aligned)
alloc_bottom : 0000000002f00000
alloc_top : 0000000030000000
alloc_top_hi : 0000000100000000
rmo_top : 0000000030000000
ram_top : 0000000100000000
instantiating rtas at 0x000000002fff0000... done
prom_hold_cpus: skipped
copying OF device tree...
Building dt strings...
Building dt structure...
Device tree strings 0x0000000002f10000 -> 0x0000000002f10abf
Device tree struct 0x0000000002f20000 -> 0x0000000002f30000
Quiescing Open Firmware ...
Booting Linux via __start() @ 0x0000000000400000 ...
[ 0.000000][ T0] random: crng init done
[ 0.000000][ T0] radix-mmu: Page sizes from device-tree:
[ 0.000000][ T0] radix-mmu: Page size shift = 12 AP=0x0
[ 0.000000][ T0] radix-mmu: Page size shift = 16 AP=0x5
[ 0.000000][ T0] radix-mmu: Page size shift = 21 AP=0x1
[ 0.000000][ T0] radix-mmu: Page size shift = 30 AP=0x2
[ 0.000000][ T0] Activating Kernel Userspace Access Prevention
[ 0.000000][ T0] Activating Kernel Userspace Execution Prevention
[ 0.000000][ T0] radix-mmu: Mapped 0x0000000000000000-0x0000000002600000 with 2.00 MiB pages (exec)
[ 0.000000][ T0] radix-mmu: Mapped 0x0000000002600000-0x0000000040000000 with 2.00 MiB pages
[ 0.000000][ T0] radix-mmu: Mapped 0x0000000040000000-0x0000000100000000 with 1.00 GiB pages
[ 0.000000][ T0] lpar: Using radix MMU under hypervisor
[ 0.000000][ T0] Linux version 6.7.0-rc4-00009-gbee0e7762ad2 (abhishekdubey@li-d5105e4c-3428-11b2-a85c-b5898f5f852f.ibm.com) (powerpc64le-linux-gnu-gcc (GCC) 13.2.1 20230728 (Red Hat Cross 13.2.1-1), GNU ld version 2.40-3.fc39) #1 SMP Wed Dec 13 13:13:54 IST 2023
[ 0.000000][ T0] Hardware name: IBM pSeries (emulated by qemu) POWER9 (raw) 0x4e1202 0xf000005 of:SLOF,HEAD pSeries
[ 0.000000][ T0] printk: legacy bootconsole [udbg0] enabled
[ 0.000000][ T0] Partition configured for 1 cpus.
[ 0.000000][ T0] CPU maps initialized for 1 thread per core
[ 0.000000][ T0] numa: Partition configured for 1 NUMA nodes.
[ 0.000000][ T0] -----------------------------------------------------
[ 0.000000][ T0] phys_mem_size = 0x100000000
[ 0.000000][ T0] dcache_bsize = 0x80
[ 0.000000][ T0] icache_bsize = 0x80
[ 0.000000][ T0] cpu_features = 0x0001c06b8f4f9187
[ 0.000000][ T0] possible = 0x001ffbfbcf5fb187
[ 0.000000][ T0] always = 0x0000000380008181
[ 0.000000][ T0] cpu_user_features = 0xdc0065c2 0xaef00000
[ 0.000000][ T0] mmu_features = 0x3c007641
[ 0.000000][ T0] firmware_features = 0x00000a85455a445f
[ 0.000000][ T0] vmalloc start = 0xc008000000000000
[ 0.000000][ T0] IO start = 0xc00a000000000000
[ 0.000000][ T0] vmemmap start = 0xc00c000000000000
[ 0.000000][ T0] -----------------------------------------------------
[ 0.000000][ T0] numa: NODE_DATA [mem 0xfffb4880-0xfffbbfff]
[ 0.000000][ T0] rfi-flush: fallback displacement flush available
[ 0.000000][ T0] rfi-flush: ori type flush available
[ 0.000000][ T0] rfi-flush: mttrig type flush available
[ 0.000000][ T0] count-cache-flush: hardware flush enabled.
[ 0.000000][ T0] link-stack-flush: software flush enabled.
[ 0.000000][ T0] stf-barrier: eieio barrier available
[ 0.000000][ T0] PPC64 nvram contains 65536 bytes
[ 0.000000][ T0] barrier-nospec: using ORI speculation barrier
[ 0.000000][ T0] Zone ranges:
[ 0.000000][ T0] Normal [mem 0x0000000000000000-0x00000000ffffffff]
[ 0.000000][ T0] Device empty
[ 0.000000][ T0] Movable zone start for each node
[ 0.000000][ T0] Early memory node ranges
[ 0.000000][ T0] node 0: [mem 0x0000000000000000-0x00000000ffffffff]
[ 0.000000][ T0] Initmem setup node 0 [mem 0x0000000000000000-0x00000000ffffffff]
[ 0.000000][ T0] percpu: Embedded 10 pages/cpu s599592 r0 d55768 u655360
[ 0.000000][ T0] Kernel command line: root=/dev/sda rw console=hvc0
[ 0.000000][ T0] Dentry cache hash table entries: 524288 (order: 6, 4194304 bytes, linear)
[ 0.000000][ T0] Inode-cache hash table entries: 262144 (order: 5, 2097152 bytes, linear)
[ 0.000000][ T0] Fallback order for Node 0: 0
[ 0.000000][ T0] Built 1 zonelists, mobility grouping on. Total pages: 65472
[ 0.000000][ T0] Policy zone: Normal
[ 0.000000][ T0] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[ 0.000000][ T0] Memory: 4121344K/4194304K available (17856K kernel code, 3328K rwdata, 14912K rodata, 6144K init, 1672K bss, 72960K reserved, 0K cma-reserved)
[ 0.000000][ T0] SLUB: HWalign=128, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000][ T0] ftrace: allocating 43983 entries in 17 pages
[ 0.000000][ T0] ftrace: allocated 17 pages with 2 groups
[ 0.000000][ T0] trace event string verifier disabled
[ 0.000000][ T0] rcu: Hierarchical RCU implementation.
[ 0.000000][ T0] rcu: RCU event tracing is enabled.
[ 0.000000][ T0] rcu: RCU restricting CPUs from NR_CPUS=2048 to nr_cpu_ids=1.
[ 0.000000][ T0] Rude variant of Tasks RCU enabled.
[ 0.000000][ T0] Tracing variant of Tasks RCU enabled.
[ 0.000000][ T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000][ T0] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000][ T0] NR_IRQS: 512, nr_irqs: 512, preallocated irqs: 16
[ 0.000000][ T0] xive: Using IRQ range [0-0]
[ 0.000000][ T0] xive: Interrupt handling initialized with spapr backend
[ 0.000000][ T0] xive: Using priority 6 for all interrupts
[ 0.000000][ T0] xive: Using 64kB queues
[ 0.000000][ T0] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[ 0.000046][ T0] time_init: 56 bit decrementer (max: 7fffffffffffff)
[ 0.000405][ T0] clocksource: timebase: mask: 0xffffffffffffffff max_cycles: 0x761537d007, max_idle_ns: 440795202126 ns
[ 0.000810][ T0] clocksource: timebase mult[1f40000] shift[24] registered
[ 0.006958][ T0] Console: colour dummy device 80x25
[ 0.007799][ T0] printk: legacy console [hvc0] enabled
[ 0.007799][ T0] printk: legacy console [hvc0] enabled
[ 0.008178][ T0] printk: legacy bootconsole [udbg0] disabled
[ 0.008178][ T0] printk: legacy bootconsole [udbg0] disabled
[ 0.010356][ T0] pid_max: default: 32768 minimum: 301
[ 0.015845][ T0] LSM: initializing lsm=lockdown,capability,landlock,yama,selinux,bpf,integrity
[ 0.016804][ T0] landlock: Up and running.
[ 0.016837][ T0] Yama: becoming mindful.
[ 0.017121][ T0] SELinux: Initializing.
[ 0.018751][ T0] LSM support for eBPF active
[ 0.019086][ T0] stackdepot: allocating hash table of 262144 entries via kvcalloc
[ 0.020807][ T0] Mount-cache hash table entries: 8192 (order: 0, 65536 bytes, linear)
[ 0.020882][ T0] Mountpoint-cache hash table entries: 8192 (order: 0, 65536 bytes, linear)
[ 0.054053][ T1] RCU Tasks Rude: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1.
[ 0.054334][ T1] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1.
[ 0.055212][ T1] POWER9 performance monitor hardware support registered
[ 0.056535][ T1] rcu: Hierarchical SRCU implementation.
[ 0.056600][ T1] rcu: Max phase no-delay instances is 1000.
[ 0.068806][ T1] smp: Bringing up secondary CPUs ...
[ 0.069445][ T1] smp: Brought up 1 node, 1 CPU
[ 0.069664][ T1] numa: Node 0 CPUs: 0
[ 0.085229][ T1] devtmpfs: initialized
[ 0.093692][ T1] PCI host bridge /pci@800000020000000 ranges:
[ 0.094282][ T1] IO 0x0000200000000000..0x000020000000ffff -> 0x0000000000000000
[ 0.094384][ T1] MEM 0x0000200080000000..0x00002000ffffffff -> 0x0000000080000000
[ 0.094438][ T1] MEM 0x0000210000000000..0x000021ffffffffff -> 0x0000210000000000
[ 0.095101][ T1] PCI: OF: PROBE_ONLY disabled
[ 0.095691][ T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.095853][ T1] futex hash table entries: 256 (order: -1, 32768 bytes, linear)
[ 0.106315][ T1] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[ 0.109892][ T1] audit: initializing netlink subsys (disabled)
[ 0.111805][ T21] audit: type=2000 audit(1702463287.100:1): state=initialized audit_enabled=0 res=1
[ 0.115150][ T1] cpuidle: using governor menu
[ 0.118054][ T1] pstore: Using crash dump compression: deflate
[ 0.118420][ T1] pstore: Registered nvram as persistent store backend
Linux ppc64le
#1 SMP Wed Dec 1[ 0.119921][ T1] EEH: pSeries platform initialized
[ 0.130581][ T1] kprobes: kprobe jump-optimization is enabled. All kprobes are optimized if possible.
[ 0.179805][ T1] HugeTLB: registered 2.00 MiB page size, pre-allocated 0 pages
[ 0.179876][ T1] HugeTLB: 0 KiB vmemmap can be freed for a 2.00 MiB page
[ 0.179909][ T1] HugeTLB: registered 1.00 GiB page size, pre-allocated 0 pages
[ 0.179930][ T1] HugeTLB: 0 KiB vmemmap can be freed for a 1.00 GiB page
[ 0.210146][ T1] iommu: Default domain type: Translated
[ 0.210238][ T1] iommu: DMA domain TLB invalidation policy: strict mode
[ 0.211913][ T1] SCSI subsystem initialized
[ 0.221405][ T1] usbcore: registered new interface driver usbfs
[ 0.221617][ T1] usbcore: registered new interface driver hub
[ 0.221793][ T1] usbcore: registered new device driver usb
[ 0.222093][ T1] pps_core: LinuxPPS API ver. 1 registered
[ 0.222121][ T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti giometti@linux.it
[ 0.222201][ T1] PTP clock support registered
[ 0.222672][ T1] EDAC MC: Ver: 3.0.0
[ 0.241259][ T1] PCI: Probing PCI hardware
[ 0.242565][ T1] PCI host bridge to bus 0000:00
[ 0.242951][ T1] pci_bus 0000:00: root bus resource [io 0x10000-0x1ffff] (bus address [0x0000-0xffff])
[ 0.243267][ T1] pci_bus 0000:00: root bus resource [mem 0x200080000000-0x2000ffffffff] (bus address [0x80000000-0xffffffff])
[ 0.243344][ T1] pci_bus 0000:00: root bus resource [mem 0x210000000000-0x21ffffffffff 64bit]
[ 0.243532][ T1] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.248748][ T1] IOMMU table initialized, virtual merging enabled
[ 0.249722][ T1] pci_bus 0000:00: resource 4 [io 0x10000-0x1ffff]
[ 0.249762][ T1] pci_bus 0000:00: resource 5 [mem 0x200080000000-0x2000ffffffff]
[ 0.249784][ T1] pci_bus 0000:00: resource 6 [mem 0x210000000000-0x21ffffffffff 64bit]
[ 0.249918][ T1] EEH: No capable adapters found: recovery disabled.
[ 0.263888][ T1] vgaarb: loaded
[ 0.265220][ T1] clocksource: Switched to clocksource timebase
[ 0.293822][ T1] NET: Registered PF_INET protocol family
[ 0.295279][ T1] IP idents hash table entries: 65536 (order: 3, 524288 bytes, linear)
[ 0.308753][ T1] tcp_listen_portaddr_hash hash table entries: 4096 (order: 0, 65536 bytes, linear)
[ 0.308876][ T1] Table-perturb hash table entries: 65536 (order: 2, 262144 bytes, linear)
[ 0.309096][ T1] TCP established hash table entries: 32768 (order: 2, 262144 bytes, linear)
[ 0.309522][ T1] TCP bind hash table entries: 32768 (order: 4, 1048576 bytes, linear)
[ 0.309980][ T1] TCP: Hash tables configured (established 32768 bind 32768)
[ 0.310798][ T1] UDP hash table entries: 2048 (order: 0, 65536 bytes, linear)
[ 0.311008][ T1] UDP-Lite hash table entries: 2048 (order: 0, 65536 bytes, linear)
[ 0.311964][ T1] NET: Registered PF_UNIX/PF_LOCAL protocol family
[ 0.316712][ T1] RPC: Registered named UNIX socket transport module.
[ 0.316779][ T1] RPC: Registered udp transport module.
[ 0.316799][ T1] RPC: Registered tcp transport module.
[ 0.316815][ T1] RPC: Registered tcp-with-tls transport module.
[ 0.316831][ T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.316931][ T1] PCI: CLS 0 bytes, default 128
[ 0.674631][ T1] Initialise system trusted keyrings
[ 0.675635][ T1] Key type blacklist registered
[ 0.676620][ T1] workingset: timestamp_bits=38 max_order=16 bucket_order=0
[ 0.682107][ T1] NFS: Registering the id_resolver key type
[ 0.682364][ T1] Key type id_resolver registered
[ 0.682393][ T1] Key type id_legacy registered
[ 0.683008][ T1] SGI XFS with ACLs, security attributes, no debug enabled
[ 0.689644][ T1] integrity: Platform Keyring initialized
[ 0.689735][ T1] Key type asymmetric registered
[ 0.689823][ T1] Asymmetric key parser 'x509' registered
[ 0.690094][ T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 247)
[ 0.690279][ T1] io scheduler mq-deadline registered
[ 0.690401][ T1] io scheduler kyber registered
[ 0.745612][ T1] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 0.749665][ T1] Non-volatile memory driver v1.3
[ 0.769816][ T1] brd: module loaded
[ 0.777962][ T1] loop: module loaded
[ 0.778402][ T1] ipr: IBM Power RAID SCSI Device Driver version: 2.6.4 (March 14, 2017)
[ 0.780565][ T1] ibmvscsi 71000002: SRP_VERSION: 16.a
[ 0.781114][ T1] ibmvscsi 71000002: Maximum ID: 64 Maximum LUN: 32 Maximum Channel: 3
[ 0.781197][ T1] scsi host0: IBM POWER Virtual SCSI Adapter 1.5.9
[ 0.786081][ C0] ibmvscsi 71000002: partner initialization complete
[ 0.786938][ C0] ibmvscsi 71000002: host srp version: 16.a, host partition qemu (0), OS 2, max io 2097152
[ 0.787115][ C0] ibmvscsi 71000002: sent SRP login
[ 0.787276][ C0] ibmvscsi 71000002: SRP_LOGIN succeeded
[ 0.798403][ T1] scsi 0:0:1:0: Direct-Access QEMU QEMU HARDDISK 2.5+ PQ: 0 ANSI: 5
[ 0.891696][ C0] sd 0:0:1:0: Power-on or device reset occurred
[ 0.893068][ T11] sd 0:0:1:0: [sda] 12582912 512-byte logical blocks: (6.44 GB/6.00 GiB)
[ 0.893514][ T11] sd 0:0:1:0: [sda] Write Protect is off
[ 0.893830][ T11] sd 0:0:1:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 0.913166][ T11] sd 0:0:1:0: [sda] Attached SCSI disk
[ 0.914016][ T1] sd 0:0:1:0: Attached scsi generic sg0 type 0
[ 0.916245][ T1] e100: Intel(R) PRO/100 Network Driver
[ 0.916283][ T1] e100: Copyright(c) 1999-2006 Intel Corporation
[ 0.916346][ T1] e1000: Intel(R) PRO/1000 Network Driver
[ 0.916366][ T1] e1000: Copyright (c) 1999-2006 Intel Corporation.
[ 0.916455][ T1] e1000e: Intel(R) PRO/1000 Network Driver
[ 0.916479][ T1] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 0.917717][ T1] i2c_dev: i2c /dev entries driver
[ 0.918050][ T1] device-mapper: core: CONFIG_IMA_DISABLE_HTABLE is disabled. Duplicate IMA measurements will not be recorded in the IMA log.
[ 0.918158][ T1] device-mapper: uevent: version 1.0.3
[ 0.918832][ T1] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised: dm-devel@redhat.com
[ 0.920749][ T1] usbcore: registered new interface driver usbhid
[ 0.920800][ T1] usbhid: USB HID core driver
[ 0.921246][ T1] ipip: IPv4 and MPLS over IPv4 tunneling driver
[ 0.923846][ T1] NET: Registered PF_INET6 protocol family
[ 0.929865][ T1] Segment Routing with IPv6
[ 0.930036][ T1] In-situ OAM (IOAM) with IPv6
[ 0.930392][ T1] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 0.931998][ T1] NET: Registered PF_PACKET protocol family
[ 0.932699][ T1] Key type dns_resolver registered
[ 0.933072][ T1] secvar-sysfs: Failed to retrieve secvar operations
[ 0.933167][ T1] drmem: No dynamic reconfiguration memory found
[ 0.933983][ T1] Running code patching self-tests ...
[ 0.948541][ T1] registered taskstats version 1
[ 0.949601][ T1] Loading compiled-in X.509 certificates
[ 0.957404][ T53] cryptomgr_probe (53) used greatest stack depth: 14032 bytes left
[ 0.963397][ T1] Loaded X.509 cert 'Build time autogenerated kernel key: 6a5e4578c252401424b2afbf1386424badf1f911'
[ 0.977493][ T1] page_owner is disabled
[ 0.978815][ T1] Secure boot mode disabled
[ 0.979210][ T1] ima: No TPM chip found, activating TPM-bypass!
[ 0.979285][ T1] Loading compiled-in module X.509 certificates
[ 0.980795][ T1] Loaded X.509 cert 'Build time autogenerated kernel key: 6a5e4578c252401424b2afbf1386424badf1f911'
[ 0.980893][ T1] ima: Allocated hash algorithm: sha256
[ 0.983336][ T1] Secure boot mode disabled
[ 0.983471][ T1] Trusted boot mode disabled
[ 0.983545][ T1] ima: No architecture policies found
[ 0.985326][ T1] printk: legacy console [netcon0] enabled
[ 0.985406][ T1] netconsole: network logging started
[ 0.992872][ T1] md: Waiting for all devices to be available before autodetect
[ 0.992916][ T1] md: If you don't use raid, use raid=noautodetect
[ 0.992975][ T1] md: Autodetecting RAID arrays.
[ 0.993021][ T1] md: autorun ...
[ 0.993053][ T1] md: ... autorun DONE.
[ 1.003176][ T1] EXT4-fs (sda): mounting ext2 file system using the ext4 subsystem
[ 1.009534][ T1] EXT4-fs (sda): warning: mounting unchecked fs, running e2fsck is recommended
[ 1.016053][ T1] EXT4-fs (sda): mounted filesystem 295103de-088a-4eae-a3e9-504c544bda6a r/w without journal. Quota mode: disabled.
[ 1.016523][ T1] VFS: Mounted root (ext2 filesystem) on device 8:0.
[ 1.022180][ T1] devtmpfs: mounted
[ 1.080217][ T1] Freeing unused kernel image (initmem) memory: 6144K
[ 1.083067][ T1] Checked W+X mappings: passed, no W+X pages found
[ 1.083615][ T1] rodata_test: all tests were successful
[ 1.083918][ T1] Run /sbin/init as init process

  • [ -x /etc/rcS.d/S10-mount ]
  • /etc/rcS.d/S10-mount
  • /bin/mount proc /proc -t proc
    [ 1.469823][ T59] mount (59) used greatest stack depth: 10048 bytes left
  • /bin/mount -t devtmpfs
  • [[ -z devtmpfs on /dev type devtmpfs (rw,relatime,size=2060672k,nr_inodes=32198,mode=755) ]]
  • /bin/mount sysfs /sys -t sysfs
  • /bin/mount bpffs /sys/fs/bpf -t bpf
  • /bin/mount debugfs /sys/kernel/debug -t debugfs
  • [[ -e /dev/fd ]]
  • ln -s /proc/self/fd /dev/fd
  • echo Listing currently mounted file systems
    Listing currently mounted file systems
  • /bin/mount
    /dev/sda on / type ext2 (rw,relatime)
    devtmpfs on /dev type devtmpfs (rw,relatime,size=2060672k,nr_inodes=32198,mode=755)
    proc on /proc type proc (rw,relatime)
    sysfs on /sys type sysfs (rw,relatime)
    bpffs on /sys/fs/bpf type bpf (rw,relatime)
    debugfs on /sys/kernel/debug type debugfs (rw,relatime)
  • [ -x /etc/rcS.d/S40-network ]
  • /etc/rcS.d/S40-network
  • ip link set lo up
    [ 1.939235][ T70] ip (70) used greatest stack depth: 9728 bytes left

@chantra
Copy link
Collaborator

chantra commented Dec 13, 2023

This looks fine to me. The host booted and ran (our very limited) init. If you want to get a shell, you would need to boot in single mode.

@chantra
Copy link
Collaborator

chantra commented Dec 15, 2023

@sharvipin did you manage to confirm that single mode worked?

@dubeyabhishek
Copy link
Author

@chantra result is same with "single mode". log tail available below:
[ 1.275060][ T1] ima: Allocated hash algorithm: sha256
[ 1.277906][ T1] Secure boot mode disabled
[ 1.278284][ T1] Trusted boot mode disabled
[ 1.278571][ T1] ima: No architecture policies found
[ 1.282092][ T1] printk: legacy console [netcon0] enabled
[ 1.282486][ T1] netconsole: network logging started
[ 1.291221][ T1] Warning: unable to open an initial console.
[ 1.291788][ T1] md: Waiting for all devices to be available before autodetect
[ 1.292093][ T1] md: If you don't use raid, use raid=noautodetect
[ 1.292392][ T1] md: Autodetecting RAID arrays.
[ 1.292595][ T1] md: autorun ...
[ 1.292732][ T1] md: ... autorun DONE.
[ 1.356581][ T1] EXT4-fs (sda): orphan cleanup on readonly fs
[ 1.357745][ T1] EXT4-fs (sda): mounted filesystem 93e3b558-b3b4-4236-a28c-923eabe29815 ro with ordered data mode. Quota mode: disabled.
[ 1.360333][ T1] VFS: Mounted root (ext4 filesystem) readonly on device 8:0.
[ 1.364676][ T1] devtmpfs: mounted
[ 1.408241][ T1] Freeing unused kernel image (initmem) memory: 6208K
[ 1.432544][ T1] Checked W+X mappings: passed, no W+X pages found
[ 1.433451][ T1] rodata_test: all tests were successful
[ 1.433945][ T1] Run /sbin/init as init process
[ 1.722162][ T120] id (120) used greatest stack depth: 10096 bytes left
[ 1.777548][ T118] sh (118) used greatest stack depth: 10080 bytes left

I was facing similar issue with rootfs made with buildroot, ultimately it turned out to be init script issue.

@chantra
Copy link
Collaborator

chantra commented Dec 26, 2023

@dubeyabhishek what is the problem exactly?
What I see from the log is that the VM does boot and go through the init step.

When booting (x86_64) with -append "root=/dev/vda rw console=ttyS0,115200 panic=-1 sysctl.vm.panic_on_oom=1 single" it does get me to a shell. I can then run /etc/init.d/rcS which is our init process.

Is this not what happen for ppc64?

@dubeyabhishek
Copy link
Author

@chantra It was not working for more than a week for ppc64. May be the problem was with my laptop. After accidental restart, today I am getting expected result on running below command. I spent many days debugging above issue of getting stuck at init.

Command:

qemu-system-ppc64 -nodefaults -display none -serial mon:stdio -m 4G -drive file="rootfs.img",format=raw,index=1,media=disk,if=scsi,cache=none -kernel "/home/abhishekdubey/linux/arch/powerpc/boot/zImage" -append "root=/dev/sda rw console=hvc0 single"

Boot log from successful run:

[ 2.267610][ T1] EXT4-fs (sda): recovery complete
[ 2.270496][ T1] EXT4-fs (sda): mounted filesystem 93e3b558-b3b4-4236-a28c-923eabe29815 r/w with ordered data mode. Quota mode: disabled.
[ 2.271189][ T1] VFS: Mounted root (ext4 filesystem) on device 8:0.
[ 2.275907][ T1] devtmpfs: mounted
[ 2.349445][ T1] Freeing unused kernel image (initmem) memory: 6464K
[ 2.354031][ T1] Checked W+X mappings: passed, no W+X pages found
[ 2.354888][ T1] rodata_test: all tests were successful
[ 2.355391][ T1] Run /sbin/init as init process
[ 2.355508][ T1] with arguments:
[ 2.355590][ T1] /sbin/init
[ 2.355640][ T1] single
[ 2.355680][ T1] with environment:
[ 2.355731][ T1] HOME=/
[ 2.355775][ T1] TERM=linux
[ 2.634504][ T57] ext4lazyinit (57) used greatest stack depth: 13728 bytes left
[ 2.943526][ T59] id (59) used greatest stack depth: 11440 bytes left

@dubeyabhishek
Copy link
Author

Screenshot from 2023-12-28 00-04-35

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants