Subject: Re: report on debian-9.0-sparc64-NETINST-1.iso
with qemu [SOLVED]



Here's a summary of what's needed to get a Sparc64 Linux running in QEMU.

I use qemu-2.8.0, compiled from source.

1) Use the image from

https://people.debian.org/~glaubitz/debian-cd/2016-05-04/debian-9.0-sparc64-NETINST-1.iso
It is new enough but avoids a 'debootstrap' bug found in newer versions.
(Symptom: During the installation of the base system:
"debootstrap: mknod: /target/dev/null: No such file or directory")

2) Use the following qemu options:
2.1) Machine args:
-m 512 -vga none
Without the option "-vga none", the installed system, after one minute,
activates a framebuffer device on the emulated VGA card, and something
goes wrong with that (either the Sparc64 Linux does not have the right
drivers for it, or qemu cannot display its contents).
(Symptom: Black screen after booting into the installed system.)

2.2) Disk args:
-drive file=debian90.img,format=raw,index=0
This is standard.

2.3) Network device args:
-netdev user,id=hostnet0 -device
virtio-net-pci,disable-modern=off,disable-legacy=off,disable-modern=on,netdev=hostnet0
Without it, the network card accepts a configuration through the built-in DHCP
server of QEMU, but - as I could see by putting myself in a chroot environment
at the end of the installation - an 'ssh [email protected]' cannot connect to the
host machine at 10.0.2.2, and DNS lookup doesn't work either.
Thanks to Artyom Tarasenko for the solution.

2.4) Display args:
-nographic
This makes it easier (compared to "-display gtk" or "-display vnc:N")
to copy&paste text from the host into the guest VM.

3) During the installation of the Debian system (use qemu option
-cdrom /path/to/debian-9.0-sparc64-NETINST-1.iso -boot d
), when it comes to partitio...

ning the disk, use
Manual.
- Create a first partition, size less than 1 MB (I used 250 MB), ext2, /boot,
set bootable: true. This will become /dev/sda1.
- Create a second partition, size: the rest of the disk minus 1 GB, ext4, /.
This will become /dev/sda2.
- Create a third partition, swap.
With the default partitioning, on a disk larger than 1 GB, the kernel and initrd
may not lie within the first 1 GB of this disk. Symptom: The installation
completes but the installed system can not boot: "Cannot find /etc/silo.conf".

You can now boot into the installed system. At the SILO prompt, I can either
wait or press Return, or enter this kernel invocation line:
1/vmlinuz initrd=/initrd.img root=/dev/sda2

4) After booting into the installed system (use qemu option -boot c), fix
two network configuration problems:

4.1) Symptom: "ifconfig" lists only the loopback device, but "ifconfig -a"
shows that there is actually a network device enp0s4.
Fix: Edit /etc/network/interfaces, to mention enp0s4 instead of enp0s5.
For some reason, the name of the network device was different during the
installation session than in the installed system.

Then reboot.

4.2) Accessing a web site by name does not work.
/etc/resolv.conf contains: "nameserver fec0::3"
Workaround: Disable IPv6 through
echo 'net.ipv6.conf.all.disable_ipv6 = 1' > /etc/sysctl.d/01-disable-ipv6.conf

Then reboot.

5) Finally edit /etc/apt/sources.list, as shown in
https://wiki.debian.org/Sparc64. Now you can "sudo apt-get install" whatever
you like.


Bruno



Programming list archiving by: Enterprise Git Hosting