安装和启动qemu编译
rlk@ubuntu:rlk_basic$ cp runninglinuxkernel_4.0 runninglinuxkernel_4.0_x86 -R
cp: cannot create special file 'runninglinuxkernel_4.0_x86/_install_arm32/dev/console': Operation not permitted
cp: cannot create special file 'runninglinuxkernel_4.0_x86/_install_arm64/dev/console': Operation not permitted
rlk@ubuntu:rlk_basic$ cd runninglinuxkernel_4.0_x86/
rlk@ubuntu:runninglinuxkernel_4.0_x86$ ./run_debian_x86_64.sh build_kernel
start build kernel image...
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
... ...
AS arch/x86/boot/header.o
LD arch/x86/boot/setup.elf
OBJCOPY arch/x86/boot/setup.bin
BUILD arch/x86/boot/bzImage
Setup is 15836 bytes (padded to 15872 bytes).
System is 4950 kB
CRC ae4f7328
Kernel: arch/x86/boot/bzImage is ready (#1)
rlk@ubuntu:runninglinuxkernel_4.0_x86$
rlk@ubuntu:runninglinuxkernel_4.0_x86$ ./run_debian_x86_64.sh build_rootfs
superuser privileges are required to run
sudo ./run_debian_x86_64.sh build_rootfs
rlk@ubuntu:runninglinuxkernel_4.0_x86$ sudo ./run_debian_x86_64.sh build_rootfs
decompressing rootfs...
sh ./arch/x86/boot/install.sh 4.0.0+ arch/x86/boot/bzImage \
System.map "/home/rlk/rlk_basic/runninglinuxkernel_4.0_x86/rootfs_debian_x86_64/boot/"
INSTALL fs/efivarfs/efivarfs.ko
INSTALL net/ipv4/netfilter/ipt_MASQUERADE.ko
INSTALL drivers/thermal/x86_pkg_temp_thermal.ko
INSTALL net/ipv4/netfilter/iptable_nat.ko
INSTALL net/ipv4/netfilter/nf_log_arp.ko
INSTALL net/ipv4/netfilter/nf_log_ipv4.ko
INSTALL net/ipv4/netfilter/nf_nat_ipv4.ko
INSTALL net/ipv4/netfilter/nf_nat_masquerade_ipv4.ko
INSTALL net/ipv6/netfilter/nf_log_ipv6.ko
INSTALL net/netfilter/nf_log_common.ko
INSTALL net/netfilter/nf_nat.ko
INSTALL net/netfilter/nf_nat_ftp.ko
INSTALL net/netfilter/nf_nat_irc.ko
INSTALL net/netfilter/nf_nat_sip.ko
INSTALL net/netfilter/xt_LOG.ko
INSTALL net/netfilter/xt_mark.ko
INSTALL net/netfilter/xt_nat.ko
DEPMOD 4.0.0+
making image...
2048+0 records in
2048+0 records out
2147483648 bytes (2.1 GB, 2.0 GiB) copied, 1.2814 s, 1.7 GB/s
mke2fs 1.44.1 (24-Mar-2018)
Discarding device blocks: done
Creating filesystem with 524288 4k blocks and 131072 inodes
Filesystem UUID: ef288e7b-9383-426d-a117-92809ccb7557
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
copy data into rootfs...
rlk@ubuntu:runninglinuxkernel_4.0_x86$
启动qemu
执行 rlk@ubuntu:runninglinuxkernel_4.0_x86$ ./run_debian_x86_64.sh run
然后显示
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 4.0.0+ (rlk@ubuntu) (gcc version 5.5.0 20171010 (Ubuntu 5.5.0-12ubuntu1) ) #1 SMP Sun Feb 14 23:45:37 PST 2021
[ 0.000000] Command line: noinintrd console=ttyS0 crashkernel=256M root=/dev/vda rootfstype=ext4 rw loglevel=8
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000003ffddfff] usable
[ 0.000000] BIOS-e820: [mem 0x000000003ffde000-0x000000003fffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
[ 0.000000] NX (Execute Disable) protection: active
[ 0.000000] SMBIOS 2.8 present.
[ 0.000000] DMI: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
[ 0.000000] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[ 0.000000] e820: remove [mem 0x000a0000-0x000fffff] usable
[ 0.000000] e820: last_pfn = 0x3ffde max_arch_pfn = 0x400000000
[ 0.000000] MTRR default type: write-back
[ 0.000000] MTRR fixed ranges enabled:
[ 0.000000] 00000-9FFFF write-back
[ 0.000000] A0000-BFFFF uncachable
[ 0.000000] C0000-FFFFF write-protect
[ 0.000000] MTRR variable ranges enabled:
[ 0.000000] 0 base 0080000000 mask FF80000000 uncachable
[ 0.000000] 1 disabled
[ 0.000000] 2 disabled
[ 0.000000] 3 disabled
[ 0.000000] 4 disabled
[ 0.000000] 5 disabled
[ 0.000000] 6 disabled
[ 0.000000] 7 disabled
[ 0.000000] PAT configuration [0-7]: WB WC UC- UC WB WC UC- UC
[ 0.000000] found SMP MP-table at [mem 0x000f5ab0-0x000f5abf] mapped at [ffff8800000f5ab0]
[ 0.000000] Scanning 1 areas for low memory corruption
[ 0.000000] Base memory trampoline at [ffff880000099000] 99000 size 24576
[ 0.000000] init_memory_mapping: [mem 0x00000000-0x000fffff]
[ 0.000000] [mem 0x00000000-0x000fffff] page 4k
[ 0.000000] BRK [0x020b4000, 0x020b4fff] PGTABLE
[ 0.000000] BRK [0x020b5000, 0x020b5fff] PGTABLE
[ 0.000000] BRK [0x020b6000, 0x020b6fff] PGTABLE
[ 0.000000] init_memory_mapping: [mem 0x3fc00000-0x3fdfffff]
[ 0.000000] [mem 0x3fc00000-0x3fdfffff] page 2M
[ 0.000000] init_memory_mapping: [mem 0x20000000-0x3fbfffff]
[ 0.000000] [mem 0x20000000-0x3fbfffff] page 2M
[ 0.000000] init_memory_mapping: [mem 0x00100000-0x1fffffff]
[ 0.000000] [mem 0x00100000-0x001fffff] page 4k
[ 0.000000] [mem 0x00200000-0x1fffffff] page 2M
[ 0.000000] init_memory_mapping: [mem 0x3fe00000-0x3ffddfff]
[ 0.000000] [mem 0x3fe00000-0x3ffddfff] page 4k
[ 0.000000] BRK [0x020b7000, 0x020b7fff] PGTABLE
[ 0.000000] ACPI: Early table checksum verification disabled
[ 0.000000] ACPI: RSDP 0x00000000000F5A70 000014 (v00 BOCHS )
[ 0.000000] ACPI: RSDT 0x000000003FFE1405 000030 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001)
[ 0.000000] ACPI: FACP 0x000000003FFE12C9 000074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001)
[ 0.000000] ACPI: DSDT 0x000000003FFDFDC0 001509 (v01 BOCHS BXPCDSDT 00000001 BXPC 00000001)
[ 0.000000] ACPI: FACS 0x000000003FFDFD80 000040
[ 0.000000] ACPI: APIC 0x000000003FFE133D 000090 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001)
[ 0.000000] ACPI: HPET 0x000000003FFE13CD 000038 (v01 BOCHS BXPCHPET 00000001 BXPC 00000001)
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] No NUMA configuration found
[ 0.000000] Faking a node at [mem 0x0000000000000000-0x000000003ffddfff]
[ 0.000000] NODE_DATA(0) allocated [mem 0x3ffda000-0x3ffddfff]
[ 0.000000] Reserving 256MB of memory at 640MB for crashkernel (System RAM: 1023MB)
[ 0.000000] [ffffea0000000000-ffffea0000ffffff] PMD -> [ffff88003e600000-ffff88003f5fffff] on node 0
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000001000-0x0000000000ffffff]
[ 0.000000] DMA32 [mem 0x0000000001000000-0x000000003ffddfff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000001000-0x000000000009efff]
[ 0.000000] node 0: [mem 0x0000000000100000-0x000000003ffddfff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000001000-0x000000003ffddfff]
[ 0.000000] On node 0 totalpages: 262012
[ 0.000000] DMA zone: 64 pages used for memmap
[ 0.000000] DMA zone: 21 pages reserved
[ 0.000000] DMA zone: 3998 pages, LIFO batch:0
[ 0.000000] DMA32 zone: 4032 pages used for memmap
[ 0.000000] DMA32 zone: 258014 pages, LIFO batch:31
[ 0.000000] ACPI: PM-Timer IO Port: 0x608
[ 0.000000] ACPI: Local APIC address 0xfee00000
[ 0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] enabled)
[ 0.000000] ACPI: LAPIC (acpi_id[0x03] lapic_id[0x03] enabled)
[ 0.000000] ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
[ 0.000000] ACPI: IOAPIC (id[0x00] address[0xfec00000] gsi_base[0])
[ 0.000000] IOAPIC[0]: apic_id 0, version 32, address 0xfec00000, GSI 0-23
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
[ 0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
[ 0.000000] ACPI: IRQ0 used by override.
[ 0.000000] ACPI: IRQ5 used by override.
[ 0.000000] ACPI: IRQ9 used by override.
[ 0.000000] ACPI: IRQ10 used by override.
[ 0.000000] ACPI: IRQ11 used by override.
[ 0.000000] Using ACPI (MADT) for SMP configuration information
[ 0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[ 0.000000] smpboot: Allowing 4 CPUs, 0 hotplug CPUs
[ 0.000000] PM: Registered nosave memory: [mem 0x00000000-0x00000fff]
[ 0.000000] PM: Registered nosave memory: [mem 0x0009f000-0x0009ffff]
[ 0.000000] PM: Registered nosave memory: [mem 0x000a0000-0x000effff]
[ 0.000000] PM: Registered nosave memory: [mem 0x000f0000-0x000fffff]
[ 0.000000] e820: [mem 0x40000000-0xfffbffff] available for PCI devices
[ 0.000000] setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:4 nr_node_ids:1
[ 0.000000] PERCPU: Embedded 30 pages/cpu @ffff88003fc00000 s84504 r8192 d30184 u524288
[ 0.000000] pcpu-alloc: s84504 r8192 d30184 u524288 alloc=1*2097152
[ 0.000000] pcpu-alloc: [0] 0 1 2 3
[ 0.000000] Built 1 zonelists in Node order, mobility grouping on. Total pages: 257895
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: noinintrd console=ttyS0 crashkernel=256M root=/dev/vda rootfstype=ext4 rw loglevel=8
[ 0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[ 0.000000] Calgary: detecting Calgary via BIOS EBDA area
[ 0.000000] Calgary: Unable to locate Rio Grande table in EBDA - bailing!
[ 0.000000] Memory: 751732K/1048048K available (10229K kernel code, 745K rwdata, 3064K rodata, 1116K init, 880K bss, 296316K reserved, 0K cma-)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] Hierarchical RCU implementation.
[ 0.000000] Additional per-CPU info printed with stalls.
[ 0.000000] RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[ 0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS:4352 nr_irqs:456 16
[ 0.000000] Console: colour VGA+ 80x25
[ 0.000000] console [ttyS0] enabled
[ 0.000000] hpet clockevent registered
[ 0.000000] tsc: Fast TSC calibration using PIT
[ 0.000000] tsc: Detected 2803.078 MHz processor
[ 0.000000] tsc: Marking TSC unstable due to TSCs unsynchronized
[ 0.006000] Calibrating delay loop (skipped), value calculated using timer frequency.. 5606.15 BogoMIPS (lpj=2803078)
[ 0.007212] pid_max: default: 32768 minimum: 301
[ 0.007584] ACPI: Core revision 20150204
[ 0.016000] ACPI: All ACPI Tables successfully acquired
[ 0.017000] Security Framework initialized
[ 0.018000] SELinux: Initializing.
[ 0.018576] SELinux: Starting in permissive mode
[ 0.020000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.022000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.022992] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.023087] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.029000] Initializing cgroup subsys freezer
[ 0.031000] mce: CPU supports 10 MCE banks
[ 0.032000] Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
[ 0.032034] Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0, 1GB 0
[ 0.034000] Freeing SMP alternatives memory: 12K (ffffffff81fd3000 - ffffffff81fd6000)
[ 0.043679] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[ 0.049000] APIC calibration not consistent with PM-Timer: 390ms instead of 100ms
[ 0.049000] APIC delta adjusted to PM-Timer: 6249966 (24402063)
[ 0.049000] smpboot: CPU0: AMD QEMU Virtual CPU version 2.5+ (fam: 06, model: 06, stepping: 03)
[ 0.049000] Performance Events: Broken PMU hardware detected, using software events only.
[ 0.049623] Failed to access perfctr msr (MSR c0010004 is 0)
[ 0.054000] Huh? What family is it: 0x6?!
[ 0.054000] MCE: In-kernel MCE decoding enabled.
[ 0.056000] x86: Booting SMP configuration:
[ 0.056093] .... node #0, CPUs: #1 #2
[ 0.006000] calibrate_delay_direct() dropping min bogoMips estimate 2 = 7642040
[ 0.006000] calibrate_delay_direct() dropping max bogoMips estimate 4 = 10921452
[ 0.196000] #3
[ 0.006000] calibrate_delay_direct() dropping max bogoMips estimate 1 = 15245821
[ 0.006000] calibrate_delay_direct() dropping min bogoMips estimate 3 = 8737930
[ 0.006000] calibrate_delay_direct() dropping max bogoMips estimate 0 = 13134822
[ 0.263000] x86: Booted up 1 node, 4 CPUs
[ 0.263280] smpboot: Total of 4 processors activated (68392.62 BogoMIPS)
[ 0.280000] devtmpfs: initialized
[ 0.291968] RTC time: 7:48:28, date: 02/15/21
[ 0.296000] NET: Registered protocol family 16
[ 0.296381] kworker/u8:0 (28) used greatest stack depth: 12576 bytes left
[ 0.320563] cpuidle: using governor ladder
[ 0.330585] cpuidle: using governor menu
[ 0.332000] ACPI: bus type PCI registered
[ 0.334431] PCI: Using configuration type 1 for base access
[ 0.339608] mtrr: your CPUs had inconsistent fixed MTRR settings
[ 0.340000] mtrr: your CPUs had inconsistent variable MTRR settings
[ 0.342072] mtrr: your CPUs had inconsistent MTRRdefType settings
[ 0.342407] mtrr: probably your BIOS does not setup all CPUs.
[ 0.342569] mtrr: corrected configuration.
[ 0.414177] ACPI: Added _OSI(Module Device)
[ 0.415232] ACPI: Added _OSI(Processor Device)
[ 0.415473] ACPI: Added _OSI(3.0 _SCP Extensions)
[ 0.415473] ACPI: Added _OSI(Processor Aggregator Device)
[ 0.432000] ACPI: Interpreter enabled
[ 0.432218] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S1_] (20150204/hwxface-580)
[ 0.432312] ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [\_S2_] (20150204/hwxface-580)
[ 0.433000] ACPI: (supports S0 S3 S4 S5)
[ 0.433000] ACPI: Using IOAPIC for interrupt routing
[ 0.433912] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[ 0.482000] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[ 0.482356] acpi PNP0A03:00: _OSC: OS supports [ASPM ClockPM Segments MSI]
[ 0.483194] acpi PNP0A03:00: _OSC failed (AE_NOT_FOUND); disabling ASPM
[ 0.487000] acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
[ 0.488259] PCI host bridge to bus 0000:00
[ 0.489287] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.489899] pci_bus 0000:00: root bus resource [io 0x0000-0x0cf7 window]
[ 0.490000] pci_bus 0000:00: root bus resource [io 0x0d00-0xffff window]
[ 0.490577] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[ 0.490916] pci_bus 0000:00: root bus resource [mem 0x40000000-0xfebfffff window]
[ 0.491000] pci_bus 0000:00: root bus resource [mem 0x100000000-0x17fffffff window]
[ 0.492776] pci 0000:00:00.0: [8086:1237] type 00 class 0x060000
[ 0.495000] pci 0000:00:01.0: [8086:7000] type 00 class 0x060100
[ 0.498000] pci 0000:00:01.1: [8086:7010] type 00 class 0x010180
[ 0.503931] pci 0000:00:01.1: reg 0x20: [io 0xc0e0-0xc0ef]
[ 0.506543] pci 0000:00:01.1: legacy IDE quirk: reg 0x10: [io 0x01f0-0x01f7]
[ 0.506543] pci 0000:00:01.1: legacy IDE quirk: reg 0x14: [io 0x03f6]
[ 0.508164] pci 0000:00:01.1: legacy IDE quirk: reg 0x18: [io 0x0170-0x0177]
[ 0.509073] pci 0000:00:01.1: legacy IDE quirk: reg 0x1c: [io 0x0376]
[ 0.511238] pci 0000:00:01.3: [8086:7113] type 00 class 0x068000
[ 0.511596] pci 0000:00:01.3: quirk: [io 0x0600-0x063f] claimed by PIIX4 ACPI
[ 0.513128] pci 0000:00:01.3: quirk: [io 0x0700-0x070f] claimed by PIIX4 SMB
[ 0.516354] pci 0000:00:02.0: [1234:1111] type 00 class 0x030000
[ 0.518926] pci 0000:00:02.0: reg 0x10: [mem 0xfd000000-0xfdffffff pref]
[ 0.520095] pci 0000:00:02.0: reg 0x18: [mem 0xfebd0000-0xfebd0fff]
[ 0.527000] pci 0000:00:02.0: reg 0x30: [mem 0xfebc0000-0xfebcffff pref]
[ 0.532073] pci 0000:00:03.0: [1af4:1001] type 00 class 0x010000
[ 0.535000] pci 0000:00:03.0: reg 0x10: [io 0xc000-0xc07f]
[ 0.535000] pci 0000:00:03.0: reg 0x14: [mem 0xfebd1000-0xfebd1fff]
[ 0.540180] pci 0000:00:03.0: reg 0x20: [mem 0xfe000000-0xfe003fff 64bit pref]
[ 0.544000] pci 0000:00:04.0: [1af4:1000] type 00 class 0x020000
[ 0.544000] pci 0000:00:04.0: reg 0x10: [io 0xc0c0-0xc0df]
[ 0.545000] pci 0000:00:04.0: reg 0x14: [mem 0xfebd2000-0xfebd2fff]
[ 0.548163] pci 0000:00:04.0: reg 0x20: [mem 0xfe004000-0xfe007fff 64bit pref]
[ 0.550832] pci 0000:00:04.0: reg 0x30: [mem 0xfeb80000-0xfebbffff pref]
[ 0.553000] pci 0000:00:05.0: [1af4:1009] type 00 class 0x000200
[ 0.553000] pci 0000:00:05.0: reg 0x10: [io 0xc080-0xc0bf]
[ 0.554000] pci 0000:00:05.0: reg 0x14: [mem 0xfebd3000-0xfebd3fff]
[ 0.554000] pci 0000:00:05.0: reg 0x20: [mem 0xfe008000-0xfe00bfff 64bit pref]
[ 0.569626] ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
[ 0.570520] ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
[ 0.573079] ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
[ 0.574799] ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
[ 0.576203] ACPI: PCI Interrupt Link [LNKS] (IRQs *9)
[ 0.581000] ACPI: Enabled 2 GPEs in block 00 to 0F
[ 0.585687] vgaarb: setting as boot device: PCI:0000:00:02.0
[ 0.586000] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[ 0.588158] vgaarb: loaded
[ 0.590245] vgaarb: bridge control possible 0000:00:02.0
[ 0.595011] SCSI subsystem initialized
[ 0.596982] pps_core: LinuxPPS API ver. 1 registered
[ 0.597070] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.597730] PTP clock support registered
[ 0.600000] PCI: Using ACPI for IRQ routing
[ 0.600000] PCI: pci_cache_line_size set to 64 bytes
[ 0.601000] e820: reserve RAM buffer [mem 0x0009fc00-0x0009ffff]
[ 0.601375] e820: reserve RAM buffer [mem 0x3ffde000-0x3fffffff]
[ 0.617419] NetLabel: Initializing
[ 0.618065] NetLabel: domain hash size = 128
[ 0.618364] NetLabel: protocols = UNLABELED CIPSOv4
[ 0.619000] NetLabel: unlabeled traffic allowed by default
[ 0.620000] HPET: 3 timers in total, 0 timers will be used for per-cpu timer
[ 0.621522] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
[ 0.622841] hpet0: 3 comparators, 64-bit 100.000000 MHz counter
[ 0.632698] Switched to clocksource hpet
[ 0.767570] pnp: PnP ACPI init
[ 0.773268] pnp 00:00: Plug and Play ACPI device, IDs PNP0b00 (active)
[ 0.775129] pnp 00:01: Plug and Play ACPI device, IDs PNP0303 (active)
[ 0.776930] pnp 00:02: Plug and Play ACPI device, IDs PNP0f13 (active)
[ 0.778348] pnp 00:03: [dma 2]
[ 0.780054] pnp 00:03: Plug and Play ACPI device, IDs PNP0700 (active)
[ 0.781608] pnp 00:04: Plug and Play ACPI device, IDs PNP0400 (active)
[ 0.783076] pnp 00:05: Plug and Play ACPI device, IDs PNP0501 (active)
[ 0.786080] pnp: PnP ACPI: found 6 devices
[ 0.892617] pci_bus 0000:00: resource 4 [io 0x0000-0x0cf7 window]
[ 0.893023] pci_bus 0000:00: resource 5 [io 0x0d00-0xffff window]
[ 0.893115] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
[ 0.894400] pci_bus 0000:00: resource 7 [mem 0x40000000-0xfebfffff window]
[ 0.894989] pci_bus 0000:00: resource 8 [mem 0x100000000-0x17fffffff window]
[ 0.896380] NET: Registered protocol family 2
[ 0.906618] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.908030] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[ 0.909034] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.910593] TCP: reno registered
[ 0.911586] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 0.912057] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 0.913337] NET: Registered protocol family 1
[ 0.927380] RPC: Registered named UNIX socket transport module.
[ 0.929675] RPC: Registered udp transport module.
[ 0.932926] RPC: Registered tcp transport module.
[ 0.933351] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.934191] pci 0000:00:01.0: PIIX3: Enabling Passive Release
[ 0.935360] pci 0000:00:00.0: Limiting direct PCI/PCI transfers
[ 0.935795] pci 0000:00:01.0: Activating ISA DMA hang workarounds
[ 0.936769] pci 0000:00:02.0: Video device with shadowed ROM
[ 0.939744] PCI: CLS 0 bytes, default 64
[ 0.949580] microcode: AMD CPU family 0x6 not supported
[ 0.970681] Scanning for low memory corruption every 60 seconds
[ 0.986130] futex hash table entries: 1024 (order: 4, 65536 bytes)
[ 0.987831] audit: initializing netlink subsys (disabled)
[ 0.989166] audit: type=2000 audit(1613375306.985:1): initialized
[ 1.001510] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[ 1.053233] VFS: Disk quotas dquot_6.5.2
[ 1.055343] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 1.081818] NFS: Registering the id_resolver key type
[ 1.083757] Key type id_resolver registered
[ 1.083917] Key type id_legacy registered
[ 1.086863] 9p: Installing v9fs 9p2000 file system support
[ 1.090222] SELinux: Registering netfilter hooks
[ 1.118855] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 1.120381] io scheduler noop registered
[ 1.120640] io scheduler deadline registered
[ 1.122400] io scheduler cfq registered (default)
[ 1.125567] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[ 1.131457] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input0
[ 1.133691] ACPI: Power Button [PWRF]
[ 1.783593] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11
[ 2.414102] ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 10
[ 2.965794] ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 10
[ 2.970337] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 3.083931] 00:05: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 3.100451] Non-volatile memory driver v1.3
[ 3.101746] Linux agpgart interface v0.103
[ 3.202231] VFIO - User Level meta-driver version: 0.3
[ 3.209190] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
[ 3.216666] serio: i8042 KBD port at 0x60,0x64 irq 1
[ 3.218154] serio: i8042 AUX port at 0x60,0x64 irq 12
[ 3.222052] mousedev: PS/2 mouse device common for all mice
[ 3.243140] rtc_cmos 00:00: RTC can wake from S4
[ 3.245933] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input1
[ 3.255203] rtc_cmos 00:00: rtc core: registered rtc_cmos as rtc0
[ 3.257099] rtc_cmos 00:00: alarms up to one day, y3k, 114 bytes nvram, hpet irqs
[ 3.259985] hidraw: raw HID events driver (C) Jiri Kosina
[ 3.275425] Netfilter messages via NETLINK v0.30.
[ 3.276650] nf_conntrack version 0.5.0 (5873 buckets, 23492 max)
[ 3.286254] ctnetlink v0.93: registering with nfnetlink.
[ 3.291853] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 3.298063] TCP: cubic registered
[ 3.298534] Initializing XFRM netlink socket
[ 3.305304] NET: Registered protocol family 10
[ 3.334128] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 3.341722] sit: IPv6 over IPv4 tunneling driver
[ 3.353801] NET: Registered protocol family 17
[ 3.357188] 9pnet: Installing 9P2000 support
[ 3.369204] Key type dns_resolver registered
[ 3.404098] registered taskstats version 1
[ 3.418063] Magic number: 9:629:824
[ 3.427417] PM: Hibernation image not present or could not be loaded.
[ 3.707131] input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input3
[ 3.785322] EXT4-fs (vda): mounted filesystem with ordered data mode. Opts: (null)
[ 3.786574] VFS: Mounted root (ext4 filesystem) on device 254:0.
[ 3.807346] devtmpfs: mounted
[ 3.896760] Freeing unused kernel memory: 1116K (ffffffff81ebc000 - ffffffff81fd3000)
[ 3.897412] Write protecting the kernel read-only data: 14336k
[ 3.906962] Freeing unused kernel memory: 1032K (ffff880001cfe000 - ffff880001e00000)
SELinux: Could not open policy file <= /etc/selinux/targeted/policy/policy.31: No such file or directory
[ 4.844910] modprobe (709) used greatest stack depth: 11264 bytes left
[ 5.017531] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT)
[ 5.021892] systemd[1]: Detected virtualization qemu.
[ 5.022600] systemd[1]: Detected architecture x86-64.
Welcome to Debian GNU/Linux 10 (buster)!
[ 5.072991] systemd[1]: Set hostname to <runninglinuxkernel>.
[ 6.043149] systemd-sysv-ge (723) used greatest stack depth: 10920 bytes left
[ 6.137198] systemd[1]: File /lib/systemd/system/systemd-journald.service:12 configures an IP firewall (IPAddressDeny=any), but the local syst.
[ 6.139346] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[ 6.832202] random: systemd urandom read with 15 bits of entropy available
[ 6.861783] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[ OK ] Started Dispatch Password …ts to Console Directory Watch.
[ 6.871120] systemd[1]: Reached target Remote File Systems.
[ OK ] Reached target Remote File Systems.
[ 6.878232] systemd[1]: Reached target Swap.
[ OK ] Reached target Swap.
[ 6.893543] systemd[1]: Listening on udev Kernel Socket.
[ OK ] Listening on udev Kernel Socket.
[ 6.904962] systemd[1]: Listening on Journal Socket (/dev/log).
[ OK ] Listening on Journal Socket (/dev/log).
[ 6.915564] systemd[1]: Listening on Journal Audit Socket.
[ OK ] Listening on Journal Audit Socket.
[ 6.921322] systemd[1]: Listening on Syslog Socket.
[ OK ] Listening on Syslog Socket.
[ 6.927470] systemd[1]: Reached target Slices.
[ OK ] Reached target Slices.
[ 6.948071] systemd[1]: Created slice system-serial\x2dgetty.slice.
[ OK ] Created slice system-serial\x2dgetty.slice.
[ 6.955127] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[ OK ] Started Forward Password R…uests to Wall Directory Watch.
[ 6.959356] systemd[1]: Reached target Local Encrypted Volumes.
[ OK ] Reached target Local Encrypted Volumes.
[ 6.966516] systemd[1]: Listening on initctl Compatibility Named Pipe.
[ OK ] Listening on initctl Compatibility Named Pipe.
[ 6.982553] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[ OK ] Set up automount Arbitrary…s File System Automount Point.
[ 6.989032] systemd[1]: Reached target Paths.
[ OK ] Reached target Paths.
[ 6.997381] systemd[1]: Listening on udev Control Socket.
[ OK ] Listening on udev Control Socket.
[ 7.006756] systemd[1]: Created slice system-getty.slice.
[ OK ] Created slice system-getty.slice.
[ 7.013437] systemd[1]: Listening on Journal Socket.
[ OK ] Listening on Journal Socket.
[ 7.049395] systemd[1]: Starting Journal Service...
Starting Journal Service...
[ 7.081279] systemd[1]: Starting Remount Root and Kernel File Systems...
Starting Remount Root and Kernel File Systems...
[ 7.114614] systemd[1]: Mounting POSIX Message Queue File System...
Mounting POSIX Message Queue File System...
[ 7.198940] systemd[1]: Starting Load Kernel Modules...
Starting Load Kernel Modules...
[ 7.282447] systemd[1]: Mounting Kernel Debug File System...
Mounting Kernel Debug File System...
[ 7.385803] systemd[1]: Mounting Huge Pages File System...
Mounting Huge Pages File System...
[ 7.404966] systemd[1]: Reached target Sockets.
[ OK ] Reached target Sockets.
[ 7.424825] systemd[1]: Condition check resulted in Create list of required static device nodes for the current kernel being skipped.
[ 7.489602] systemd[1]: Starting udev Coldplug all Devices...
Starting udev Coldplug all Devices...
[ 7.527829] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.
[ 7.615417] systemd[1]: Started Remount Root and Kernel File Systems.
[ OK ] Started Remount Root and Kernel File Systems.
[ 7.719312] systemd[1]: Mounted POSIX Message Queue File System.
[ OK ] Mounted POSIX Message Queue File System.
[ 7.759077] systemd[1]: Mounted Kernel Debug File System.
[ OK ] Mounted Kernel Debug File System.
[ 7.801045] systemd[1]: Mounted Huge Pages File System.
[ OK ] Mounted Huge Pages File System.
[ 7.876150] systemd[1]: Started Load Kernel Modules.
[ OK ] Started Load Kernel Modules.
[ 7.941266] systemd[1]: Condition check resulted in Kernel Configuration File System being skipped.
[ 7.990931] systemd[1]: Starting Apply Kernel Variables...
Starting Apply Kernel Variables...
[ 8.007392] systemd[1]: Condition check resulted in FUSE Control File System being skipped.
[ 8.045236] systemd[1]: Starting Create System Users...
Starting Create System Users...
[ 8.098176] systemd[1]: Condition check resulted in Rebuild Hardware Database being skipped.
[ 8.149047] systemd[1]: Starting Load/Save Random Seed...
Starting Load/Save Random Seed...
[ 8.391242] systemd[1]: Started Apply Kernel Variables.
[ OK ] Started Apply Kernel Variables.
[ 8.580695] systemd[1]: Started Journal Service.
[ OK ] Started Journal Service.
[ OK ] Started Load/Save Random Seed.
Starting Flush Journal to Persistent Storage...
[ OK ] Started Create System Users.
[ 9.152111] systemd-journald[725]: Received request to flush runtime journal from PID 1
Starting Create Static Device Nodes in /dev...
[ OK ] Started Flush Journal to Persistent Storage.
[ OK ] Started Create Static Device Nodes in /dev.
[ OK ] Reached target Local File Systems (Pre).
Mounting /mnt...
Starting udev Kernel Device Manager...
[ OK ] Mounted /mnt.
[ OK ] Reached target Local File Systems.
Starting Create Volatile Files and Directories...
[ OK ] Started udev Coldplug all Devices.
Starting Helper to synchronize boot up for ifupdown...
[ OK ] Started udev Kernel Device Manager.
[ OK ] Started Helper to synchronize boot up for ifupdown.
Starting Raise network interfaces...
[ OK ] Started Create Volatile Files and Directories.
Starting Update UTMP about System Boot/Shutdown...
Starting Network Time Synchronization...
[ 11.857082] virtio_net virtio1 enp0s4: renamed from eth0
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Found device /dev/ttyS0.
[ OK ] Started Network Time Synchronization.
[ OK ] Started Raise network interfaces.
[ OK ] Reached target System Time Synchronized.
[ OK ] Reached target System Initialization.
[ OK ] Reached target Basic System.
Starting getty on tty2-tty…nd logind are not available...
Starting System Logging Service...
Starting LSB: Execute the …-e command to reboot system...
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Started Regular background program processing daemon.
[ OK ] Started Daily apt download activities.
[ OK ] Started Daily apt upgrade and clean activities.
[ OK ] Started Daily rotation of log files.
[ OK ] Reached target Timers.
[ OK ] Started System Logging Service.
[ OK ] Found device Virtio network device.
[ OK ] Started LSB: Execute the k…c -e command to reboot system.
Starting LSB: Load kernel image with kexec...
[ OK ] Started ifup for enp0s4.
[ OK ] Reached target Network.
Starting Permit User Sessions...
[ OK ] Reached target Network is Online.
Starting Kernel crash dump capture service...
[ OK ] Started Permit User Sessions.
[ OK ] Started Getty on tty5.
[ OK ] Started Getty on tty2.
[ OK ] Started Getty on tty4.
[ OK ] Started Getty on tty3.
[ OK ] Started Getty on tty1.
[ OK ] Started Serial Getty on ttyS0.
[ OK ] Started Getty on tty6.
[ OK ] Started getty on tty2-tty6… and logind are not available.
[ OK ] Reached target Login Prompts.
[ OK ] Started LSB: Load kernel image with kexec.
[ 15.915980] hrtimer: interrupt took 8128370 ns
[ 17.364745] kdump-tools[1200]: Starting kdump-tools: Creating symlink /var/lib/kdump/vmlinuz.
[ 17.423096] kdump-tools[1200]: ln: failed to create symbolic link '/var/lib/kdump/vmlinuz': No such file or directory
[ 18.708888] kdump-tools[1200]: kdump-tools: Generating /var/lib/kdump/initrd.img-4.0.0+
Debian GNU/Linux 10 runninglinuxkernel ttyS0
用户名 密码 root 123
root@runninglinuxkernel:~# ls
root@runninglinuxkernel:~# cat /proc/version
Linux version 4.0.0+ (rlk@ubuntu) (gcc version 5.5.0 20171010 (Ubuntu 5.5.0-12ubuntu1) ) #1 SMP Sun Feb 14 23:45:37 PST 2021
root@runninglinuxkernel:~# pwd
/root
root@runninglinuxkernel:~# ls /
bin dev home lib64 media opt root sbin sys usr
boot etc lib lost+found mnt proc run srv tmp var
root@runninglinuxkernel:~#
root@runninglinuxkernel:~# uname -a
Linux runninglinuxkernel 4.0.0+ #1 SMP Sun Feb 14 23:45:37 PST 2021 x86_64 GNU/Linux
关闭qemu的正规方法
root@runninglinuxkernel:~# shutdown -h now
[ OK ] Stopped target Timers.
root@runninglinuxkernel:~# [ OK ] Stopped Daily apt upgrade and clean activities.
[ OK ] Stopped Daily apt download activities.
[ OK ] Stopped Daily rotation of log files.
Stopping Regular background program processing daemon...
[ 71.531336] kdump-config (1151) used greatest stack depth: 10816 bytes left
[ OK ] Stopped Daily Cleanup of Temporary Directories.
[ OK ] Stopped target System Time Synchronized.
[ OK ] Stopped target Login Prompts.
[ 71.652834] kdump-tools[1129]: Terminated
Stopping Serial Getty on ttyS0...
Stopping Getty on tty6...
Stopping Getty on tty5...
Stopping Getty on tty2...
Stopping Getty on tty1...
Stopping Getty on tty4...
Stopping System Logging Service...
[ OK ] Stopped getty on tty2-tty6… and logind are not available.
Stopping Getty on tty3...
Stopping LSB: Load kernel image with kexec...
[ 73.624336] kdump-tools[1129]: Terminated
[ OK ] Stopped Regular background program processing daemon.
[ OK ] Stopped System Logging Service.
[ OK ] Stopped Getty on tty6.
[ OK ] Stopped Getty on tty5.
[ OK ] Stopped Getty on tty4.
[ OK ] Stopped Getty on tty3.
[ OK ] Stopped Getty on tty2.
[ OK ] Stopped Getty on tty1.
[ OK ] Stopped Serial Getty on ttyS0.
[ OK ] Stopped Kernel crash dump capture service.
[ OK ] Stopped target Network is Online.
[ OK ] Removed slice system-serial\x2dgetty.slice.
[ OK ] Removed slice system-getty.slice.
Stopping Permit User Sessions...
[ OK ] Stopped LSB: Load kernel image with kexec.
Stopping LSB: Execute the …-e command to reboot system...
[ OK ] Stopped Permit User Sessions.
[ OK ] Stopped target Network.
Stopping ifup for enp0s4...
Stopping Raise network interfaces...
[ OK ] Stopped target Remote File Systems.
[ OK ] Stopped Raise network interfaces.
[ OK ] Stopped LSB: Execute the k…c -e command to reboot system.
[ OK ] Stopped target Basic System.
[ OK ] Stopped target Paths.
[ OK ] Stopped target Sockets.
[ OK ] Closed Syslog Socket.
[ OK ] Stopped target System Initialization.
Stopping Network Time Synchronization...
Stopping Load/Save Random Seed...
[ OK ] Stopped target Local Encrypted Volumes.
[ OK ] Stopped Forward Password R…uests to Wall Directory Watch.
[ OK ] Stopped Dispatch Password …ts to Console Directory Watch.
[ OK ] Stopped target Swap.
Stopping Update UTMP about System Boot/Shutdown...
[ OK ] Stopped target Slices.
[ OK ] Stopped Network Time Synchronization.
[ OK ] Stopped Load/Save Random Seed.
[ OK ] Stopped Update UTMP about System Boot/Shutdown.
[ OK ] Stopped Create Volatile Files and Directories.
[ OK ] Stopped ifup for enp0s4.
[ OK ] Stopped Apply Kernel Variables.
[ OK ] Stopped Load Kernel Modules.
[ OK ] Stopped target Local File Systems.
Unmounting /mnt...
[ OK ] Unmounted /mnt.
[ OK ] Reached target Unmount All Filesystems.
[ OK ] Stopped target Local File Systems (Pre).
[ OK ] Stopped Create Static Device Nodes in /dev.
[ OK ] Stopped Create System Users.
[ OK ] Stopped Remount Root and Kernel File Systems.
[ OK ] Reached target Shutdown.
[ OK ] Reached target Final Step.
[ OK ] Started Power-Off.
[ OK ] Reached target Power-Off.
[ 81.860036] systemd-shutdown[1]: Syncing filesystems and block devices.
[ 81.958894] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[ 82.011485] systemd-journald[698]: Received SIGTERM from PID 1 (systemd-shutdow).
[ 82.094295] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[ 82.127077] systemd-shutdown[1]: Unmounting file systems.
[ 82.163291] [1942]: Remounting '/' read-only in with options 'data=ordered'.
[ 82.203080] EXT4-fs (vda): re-mounted. Opts: data=ordered
[ 82.238015] systemd-shutdown[1]: All filesystems unmounted.
[ 82.238708] systemd-shutdown[1]: Deactivating swaps.
[ 82.240152] systemd-shutdown[1]: All swaps deactivated.
[ 82.240899] systemd-shutdown[1]: Detaching loop devices.
[ 82.245092] systemd-shutdown[1]: All loop devices detached.
[ 82.245624] systemd-shutdown[1]: Detaching DM devices.
[ 82.247255] systemd-shutdown[1]: All DM devices detached.
[ 82.247822] systemd-shutdown[1]: All filesystems, swaps, loop devices and DM devices detached.
[ 82.305125] systemd-shutdown[1]: Syncing filesystems and block devices.
[ 82.320722] systemd-shutdown[1]: Powering off.
[ 82.332195] ACPI: Preparing to enter system sleep state S5
[ 82.337557] reboot: Power down
[ 82.338111] acpi_power_off called
非正规方法:在另外一个串口
rlk@ubuntu:runninglinuxkernel_4.0_x86$ ps -e
2612 ? 00:00:00 kworker/1:0
17776 ? 00:00:00 kworker/3:2
24687 ? 00:00:00 kworker/u256:0
25337 ? 00:00:00 kworker/2:2
25926 pts/0 00:00:00 run_debian_x86_
25928 pts/0 00:02:20 qemu-system-x86
25952 ? 00:00:00 kworker/0:0
25967 pts/1 00:00:00 bash
25977 pts/1 00:00:00 ps
rlk@ubuntu:runninglinuxkernel_4.0_x86$ kill 25928