[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

RE: specifying virtio block device as root filesystem for Debian S390X install?



Okay, I think I figured out the gist of the problem -

a) If I boot up the machine with a debian9 (daily build) kernel using the
following comamnd line:

qemu-system-s390x.exe -machine type=s390-ccw-virtio-2.5 -m 512 -hda
linux.disk -device virtio-net-ccw,netdev=net0 -netdev user,id=net0 -k en-us
-redir tcp:9022::22

The VM will boot with issues initializing the virtio devices for the disk
and the networking...looks to be a regression.

b) If I boot up the machine with a debian8 (stable) kernel using the
following comamnd line:

qemu-system-s390x.exe -machine type=s390-ccw-virtio-2.5 -m 512 -kernel
kernel.debian8 -initrd initrd.debian8 -hda linux.disk -device
virtio-net-ccw,netdev=net0 -netdev user,id=net0 -k en-us -redir tcp:9022::22

The VM will boot with no problems, see the virtio hard drive and the
networking.

This being the Debian8 kernel/initrd environment, netcfg will be an issue
down the line, since it would not allow you to proceed with a virtio NIC
configure.  This will need to be patched with installing the netcfg 1.13 or
1.134 udeb from the repo (1.13 is stable, 1.134 is testing/sid)

Then all you conceivably have to do is to patch the dasd-postinst so the
machine will allow you to proceed

c) Unfortunately, that was not the technique I chose on this install - the
command line I used for the initial install was this:

qemu-system-s390x.exe -machine type=s390-virtio -m 512 -kernel
kernel.debian9 -initrd initrd.debian9 -drive
file=linux.disk,if=none,id=disk0 -device
virtio-blk-s390,drive=disk0,id=virtio-disk0 -device
virtio-net-s390,netdev=net0 -netdev user,id=net0 -k en-us -redir
tcp:9022::22

Note that the peripherals are virtio-blk-s390 and virtio-net-s390 instead of
being ccw devices.  The install went seemingly well, everything went to
/dev/vda1, zipl ran, and after the install was complete the QEMU session
completed with no issues.  I would assume that I can remove the
kernel/initrd parameters on QEMU and it should IPL directly into Debian.
HOWEVER, after the install when I tried to run the installed VM, I ran this:

qemu-system-s390x.exe -machine type=s390-virtio -m 512 -drive
file=linux.disk,if=none,id=disk0 -device
virtio-blk-s390,drive=disk0,id=virtio-disk0 -device
virtio-net-s390,netdev=net0 -netdev user,id=net0 -k en-us -redir
tcp:9022::22

QEMU starts up, shows up with a blank console and then no discernable
suggestion that it did anything.

Well, so what I did was to modify the command line to this:

qemu-system-s390x.exe -machine type=s390-ccw-virtio-2.5 -m 512 -hda
linux.disk -device virtio-net-ccw,netdev=net0 -netdev user,id=net0 -k en-us
-redir tcp:9022::22

Which remarkably enough worked.   The console renders the usual Linux boot
sequence, and it worked until it tried to mount the root filesystem, in
which case it looks like the kernel commandline (/proc/cmdline) expected 
root=/dev/disk/by-path/ccw-virtio0-part1

However, since the machine booted with ccw peripherals, the disk is now:
/dev/disk/by-path/ccw-0.0.0001-part1 (which is a symlink to ../../vda1)

This will result in the init process bombing out to an initramfs mini-shell
with a failure to find the root.  

This is a relatively easy fix since all I had to do is to make a symlink:

cd /dev/disk/by-path/
ln -s ../../vda1 ccw-virtio0-part1

And then exit the initramfs, in which case the init process re-initializes.
This time, the correct rootfs is referenced so init runs to completion and
brings up Debian.

That being said, I tried to correct the issue by running zipl.  However,
this time I run into an error:

Error: Assume disk_type FBA for virtblk device, but please specify type
manually: Virtblk device type not clearly determined.

I am not sure how the original Debian install process ran zipl during the
initial install, but how would I specify the proper type for zipl?









-----Original Message-----
From: Philipp Kern [mailto:pkern@debian.org] 
Sent: Wednesday, November 04, 2015 3:22 AM
To: kkwan.nyc@gmail.com
Cc: debian-s390@lists.debian.org
Subject: RE: specifying virtio block device as root filesystem for Debian
S390X install?

On 2015-11-04 05:23, Kevin Kwan (Personal) wrote:
> If I use the CCW version:
> 
> qemu-system-s390x.exe -machine type=s390-ccw-virtio-2.5 -m 512 -hda 
> linux.disk -device virtio-net-ccw,netdev=net0 -netdev user,id=net0 -k 
> en-us -redir tcp:9022::22
> 

I just use -nographic on Linux and it does the right thing.

> Then I'll see a console, followed by some complaints about missing
> /sys/bus/ccw/devices/virtio/cutype (sysfs not populating info on the 
> CCW
> bus?)

Can you transcribe the actual failure you see?

Kind regards
Philipp Kern


Reply to: