#865314 debian-installer-9-netboot-mips: 32bit MIPS (big-endian) Malta netboot installer doesn't boot

#865314#5
Date:
2017-06-20 13:23:41 UTC
From:
To:
Dear Maintainer,

I wanted to install Debian Stretch MIPS in QEMU.
It seems that the netboot installer is broken and stops while unpacking the initrd.

Steps to reproduce:
wget http://ftp.nl.debian.org/debian/dists/stretch/main/installer-mips/current/images/malta/netboot/initrd.gz
wget http://ftp.nl.debian.org/debian/dists/stretch/main/installer-mips/current/images/malta/netboot/vmlinux-4.9.0-3-4kc-malta
qemu-system-mips -M malta -m 256 -kernel vmlinux-4.9.0-3-4kc-malta -initrd initrd.gz -nographic

Output:
[    0.000000] Linux version 4.9.0-3-4kc-malta (debian-kernel@lists.debian.org) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #1 Debian 4.9.30-2 (2017-06-12)
[    0.000000] earlycon: uart8250 at I/O port 0x3f8 (options '38400n8')
[    0.000000] bootconsole [uart8250] enabled
[    0.000000] Config serial console: console=ttyS0,38400n8r
[    0.000000] CPU0 revision is: 00019300 (MIPS 24Kc)
[    0.000000] FPU revision is: 00739300
[    0.000000] MIPS: machine is mti,malta
[    0.000000] Software DMA cache coherency enabled
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 0ffff000 @ 00000000 (usable)
[    0.000000] Kernel relocated by 0x00c50000
 .text @ 0x80d50000
 .data @ 0x8131cbb4
 .bss  @ 0x81660000
[    0.000000] Initial ramdisk at: 0x80a60000 (22064934 bytes)
[    0.000000] Reserving 0MB of memory at 0MB for crashkernel
[    0.000000] Primary instruction cache 2kB, VIPT, 2-way, linesize 16 bytes.
[    0.000000] Primary data cache 2kB, 2-way, VIPT, no aliases, linesize 16 bytes
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x0000000000ffffff]
[    0.000000]   Normal   [mem 0x0000000001000000-0x000000000fffefff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fffefff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffefff]
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64959
[    0.000000] Kernel command line: rd_start=0xffffffff80a60000 rd_size=22064934  console=ttyS0,38400n8r
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 237016K/262140K available (5930K kernel code, 573K rwdata, 1328K rodata, 1440K init, 284K bss, 25124K reserved, 0K cma-reserved)
[    0.000000] NR_IRQS:256
[    0.000000] CPU frequency 200.00 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112595867 ns
[    0.000129] sched_clock: 32 bits at 100MHz, resolution 9ns, wraps every 21474827259ns
[    0.051138] Console: colour dummy device 80x25
[    0.052018] Calibrating delay loop... 1277.95 BogoMIPS (lpj=2555904)
[    0.075931] pid_max: default: 32768 minimum: 301
[    0.076996] Security Framework initialized
[    0.077196] Yama: disabled by default; enable with sysctl kernel.yama.*
[    0.078078] AppArmor: AppArmor disabled by boot time parameter
[    0.078572] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.078830] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.092484] ftrace: allocating 18581 entries in 37 pages
[    0.144457] Performance counters: No available PMU.
[    0.158188] devtmpfs: initialized
[    0.164252] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.164689] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.168792] NET: Registered protocol family 16
[    0.181878] clocksource: pit: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1601818034827 ns
[    0.200668] vgaarb: loaded
[    0.201749] SCSI subsystem initialized
[    0.203616] PCI host bridge to bus 0000:00
[    0.204072] pci_bus 0000:00: root bus resource [mem 0x10000000-0x17ffffff]
[    0.204353] pci_bus 0000:00: root bus resource [io  0x1000-0x1fffff]
[    0.204605] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.204997] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.206458] pci 0000:00:00.0: [Firmware Bug]: reg 0x14: invalid BAR (can't size)
[    0.206713] pci 0000:00:00.0: [Firmware Bug]: reg 0x18: invalid BAR (can't size)
[    0.206953] pci 0000:00:00.0: [Firmware Bug]: reg 0x1c: invalid BAR (can't size)
[    0.207192] pci 0000:00:00.0: [Firmware Bug]: reg 0x20: invalid BAR (can't size)
[    0.207441] pci 0000:00:00.0: [Firmware Bug]: reg 0x24: invalid BAR (can't size)
[    0.209666] pci 0000:00:0a.1: legacy IDE quirk: reg 0x10: [io  0x01f0-0x01f7]
[    0.209908] pci 0000:00:0a.1: legacy IDE quirk: reg 0x14: [io  0x03f6]
[    0.210137] pci 0000:00:0a.1: legacy IDE quirk: reg 0x18: [io  0x0170-0x0177]
[    0.210373] pci 0000:00:0a.1: legacy IDE quirk: reg 0x1c: [io  0x0376]
[    0.211719] pci 0000:00:0a.3: quirk: [io  0x1000-0x103f] claimed by PIIX4 ACPI
[    0.212025] pci 0000:00:0a.3: quirk: [io  0x1100-0x110f] claimed by PIIX4 SMB
[    0.213663] vgaarb: device added: PCI:0000:00:12.0,decodes=io+mem,owns=none,locks=none
[    0.214955] pci 0000:00:12.0: BAR 0: assigned [mem 0x10000000-0x11ffffff pref]
[    0.215368] pci 0000:00:0b.0: BAR 6: assigned [mem 0x12000000-0x1203ffff pref]
[    0.215867] pci 0000:00:12.0: BAR 6: assigned [mem 0x12040000-0x1204ffff pref]
[    0.216352] pci 0000:00:12.0: BAR 1: assigned [mem 0x12050000-0x12050fff]
[    0.216800] pci 0000:00:0a.2: BAR 4: assigned [io  0x1040-0x105f]
[    0.217054] pci 0000:00:0b.0: BAR 0: assigned [io  0x1060-0x107f]
[    0.217272] pci 0000:00:0b.0: BAR 1: assigned [mem 0x12051000-0x1205101f]
[    0.217616] pci 0000:00:0a.1: BAR 4: assigned [io  0x1080-0x108f]
[    0.224811] clocksource: Switched to clocksource MIPS
[    0.286518] VFS: Disk quotas dquot_6.6.0
[    0.286906] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.314373] NET: Registered protocol family 2
[    0.320074] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.320474] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.320971] TCP: Hash tables configured (established 2048 bind 2048)
[    0.321859] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.322258] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.324046] NET: Registered protocol family 1
[    0.325097] PCI: Enabling device 0000:00:0a.2 (0000 -> 0001)
[    0.332813] Unpacking initramfs...
[    0.531898] Initramfs unpacking failed: uncompression error


Greetings,
Bruno

#865314#10
Date:
2017-06-20 13:43:36 UTC
From:
To:
It also seems to be broken on MIPSEL

wget
http://ftp.nl.debian.org/debian/dists/stretch/main/installer-mipsel/current/images/malta/netboot/initrd.gz
wget
http://ftp.nl.debian.org/debian/dists/stretch/main/installer-mipsel/current/images/malta/netboot/vmlinux-4.9.0-3-4kc-malta
qemu-system-mipsel -M malta -m 256 -kernel vmlinux-4.9.0-3-4kc-malta
-initrd initrd.gz -nographic

Greetings,
Bruno

#865314#15
Date:
2017-06-20 13:47:52 UTC
From:
To:
Hi Bruno,

Did the same setup work with jessie images? I've got ~no background
with mips stuff here...

#865314#20
Date:
2017-06-20 14:01:26 UTC
From:
To:
Yes, it works perfectly well for Debian Jessie.
#865314#25
Date:
2017-06-20 14:11:27 UTC
From:
To:
Ok, thanks for confirming.

mips folks - any clues please? AFAICS we've had ~zero input about mips
in d-i and image work, and no visible testing. Some help would be
appreciated...
  lists asking us to send them to you.

#865314#30
Date:
2017-06-20 14:40:41 UTC
From:
To:
It's maybe related that the mips64el kernel doesn't  boot at all.
#865314#35
Date:
2017-06-20 15:10:14 UTC
From:
To:
Hi,

I think I know which error you mean (and I confess I have seen it
before). The issue is that QEMU loads the initrd into the memory
immediately after the kernel, but that bit of memory might get
overwritten by KASLR when the kernel starts and relocates itself.

You can workaround it by passing "-append nokaslr" to QEMU, but I guess
that QEMU should be fixed to place the initrd in a higher bit of memory.

James

#865314#40
Date:
2017-06-20 15:15:13 UTC
From:
To:
Hi,

This is unrelated. On mips64el, QEMU defaults to the 20Kc CPU which
Debian does not support. If you pass "-cpu MIPS64R2-generic" to QEMU
then it should work.

James

#865314#45
Date:
2017-06-20 15:19:27 UTC
From:
To:
Hi,
thanks for the quick response!
I can confirm that netboot installer starts with nokalsr switch.

Greetings,
Bruno

#865314#50
Date:
2017-07-07 08:22:20 UTC
From:
To:
Dear Maintainer,

I can confirm that qemu starts with nokalsr switch for mips and mipsel architectures.

Maybe this bug should be reassigned to qemu ?

Christian