virt-install on A20-OLinuXino-buster image

Started by miroR, August 22, 2020, 07:55:55 PM

Previous topic - Next topic

miroR

I have an initially deployed Lime2-server. But I would like to get some things done in the image first, such as install Tor, and modify the update/ugrade process to get anonymous apt with Tor[1]. before I work with my Lime2-server proper.
I am trying to run:
virt-install --virt-type kvm --name buster-lime2 \
--cdrom /Cmn/libvirt/A20-OLinuXino-buster-base-20200731-135406.img \
--os-variant debian10 --disk size=10 \
--memory 1024 \
--boot kernel=boot/vmlinuz-5.6.14-olimex,initrd=boot/initrd.img-5.6.14-olimex,dtb=usr/lib/linux-image-5.6.14-olimex/sun7i-a20-olinuxino-lime2.dtb,kernel_args="console=/dev/ttyS0 rw root=/dev/mmcblk0p1"
and it is failing with:
Starting install...
Allocating 'buster-lime2.qcow2'                                              |  10 GB  00:00:01     
ERROR    internal error: process exited while connecting to monitor: qemu: linux kernel too old to load a ram disk
Removing disk 'buster-lime2.qcow2'                                           |    0 B  00:00:00     
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///session start buster-lime2
otherwise, please restart your installation.
The kernel, initrd, and dtb I copied from the running Lime-server.

What is wrong in my setup?

Or does anybody hava a working method, maybe a link to a tutorial, where I can learn how to do this A20 image work?

---
[1] The anonymous update/upgrade process is one of the best things in the whole of Linuxdom, it's a very good base for building an anonymous system. It is very strong in Debian and some derivatives, but does not exist is some other of it's family members, like Ubuntu.

miroR

#1
Studying InstallingDebianOn, and this section:
https://wiki.debian.org/InstallingDebianOn/Allwinner#Installing_from_a_USB_stick
these words:
Quote[...]
Choose HDMI for installer display: On A20-Olinuxino-Lime2, the serial console is selected by default, so you need to run bootargs=console=tty1 and saveenv commands to choose HDMI display. [...]
may have a hint for my situation...

Because the error that I get is:
ERROR    internal error: process exited while connecting to monitor: qemu: linux kernel too old to load a ram diskand while kernel can't be too old, I don't think, I'll try and modify the ...cosole=... to:
kernel_args="console=/dev/tty1Let's see...
(Of course that wiki does not apply full to my case, but I don't think I need to try and build the u-boot...)
---
Nope. I still get the same error...

--- If I replace s/kernel_args/bootargs'  it says:
ERROR    Unknown --boot options: ['bootargs']and exits.

miroR

#2
However, even if I change the kernel line to:
virt-install --virt-type kvm --name buster-lime2 \
--cdrom /Cmn/libvirt/A20-OLinuXino-buster-base-20200731-135406.img \
--os-variant debian10 --disk size=10 \
--memory 1024 \
--boot kernel=boot/kernel.itb,initrd=boot/kernel.itb,dtb=usr/lib/linux-image-5.6.14-olimex/sun7i-a20-olinuxino-lime2.dtb,kernel_args="console=/dev/tty1 rw root=/dev/mmcblk0p1"
I get the same error:
Starting install...
Allocating 'buster-lime2.qcow2'                                              |  10 GB  00:00:01     
ERROR    internal error: process exited while connecting to monitor: qemu: linux kernel too old to load a ram disk
Removing disk 'buster-lime2.qcow2'                                           |    0 B  00:00:00     
Domain installation does not appear to have been successful.
If it was, you can restart your domain by running:
  virsh --connect qemu:///session start buster-lime2
otherwise, please restart your installation.
I admit I'm not at home (yet) with Arm and u-boot...
And this is what I copied over (I modified the /etc/network/interfaces and /etc/ssh/sshd_config to allow root login, and ssh'ed into and rsync av -e ssh <the boot.tar archived /boot of Lime2-server> <this machine>):
$ ls -l boot/
total 37420
-rw-r--r-- 1 mr mr     2202 2020-07-31 14:15 boot.cmd
-rw-r--r-- 1 mr mr     2274 2020-07-31 14:15 boot.scr
-rw-r--r-- 1 mr mr   182242 2020-07-31 08:18 config-5.6.14-olimex
-rw-r--r-- 1 mr mr 10905749 2020-07-31 14:47 initrd.img-5.6.14-olimex
-rw-r--r-- 1 mr mr 14722615 2020-07-31 14:16 kernel.itb
-rw-r--r-- 1 mr mr    26675 2020-07-31 14:16 kernel.its
-rw-r--r-- 1 mr mr  4282510 2020-07-31 08:18 System.map-5.6.14-olimex
-rw-r--r-- 1 mr mr     1093 2020-07-31 14:13 uEnv.txt
-rwxr-xr-x 1 mr mr  8172736 2020-07-31 08:18 vmlinuz-5.6.14-olimex
And also I tar'ed and ssh-rsync'ed the /usr/lib/linux-image-5.6.14-olimex where I entered this entry for dtb from:
dtb=usr/lib/linux-image-5.6.14-olimex/sun7i-a20-olinuxino-lime2.dtbBut maybe something more is needed or some of these are not correct, which I typed/pasted into the --boot... line above... ?

I'm stuck...

Just to mention that the other tar untar'd has:
ls -l usr/lib/linux-image-5.6.14-olimex/ | wc -l
154
154 entries...
However, only two lime2:
ls -l usr/lib/linux-image-5.6.14-olimex/*-lime2*
-rw-r--r-- 1 mr mr 42891 2020-07-31 08:18 usr/lib/linux-image-5.6.14-olimex/sun7i-a20-olinuxino-lime2.dtb
-rw-r--r-- 1 mr mr 43277 2020-07-31 08:18 usr/lib/linux-image-5.6.14-olimex/sun7i-a20-olinuxino-lime2-emmc.dtb
and mine is plain Lime2 not emmc, IIUC.

miroR

#3
I searched and found this:
https://bugs.launchpad.net/qemu/+bug/1394550/
where the guy says:
Quotethis is not an old linux! Just something should be configured better.
and later:
QuoteI loaded kernel and initramfs through symlinks and make that symlinks wrong (kernel become initramfs and vice versa)
So how do I modify that --boot line of mine.

miroR

My Lime2 is board revision K, the
Rev.Kit is printed on the board in white color font on red color of the board.

Looking up the manual, "8.2 Board revision", at:
https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2/resources/A20-OLinuXino-LIME2-UM.pdf
still the Board revisions end at
G (released)
but I read in some place on the forum, didn't bookmark it, that there are also revision L, which is also released. And of course mine, the K, is also released.

Where is the hardware changelog for Lime2?

I searched with duckduck.go, and couldn't find it.[1]

I looked up the outdated wiki page at:
https://www.olimex.com/wiki/A20-OLinuXino-LIME2
and the product page:
https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2/

and other places, but I couldn't find the hardware changelog for Lime2 which is more complete than the one in the manual.

Is in on gihub? If so, where, since the docs are also pretty dispersed on github, looks to me there is no one place to start reading things there either...[2]

---
[1] I don't use the usual search engine, it's too privacy-invasive; worse, dangerous with their woodoo-like methods, as Ed Snowden likened their methods.

[2] Just like the u-boot and other required reading to get this work of mine done. I've been studying it for the last many hours, getting somewhere... but it's jumping to diverse sources pretty often...

LubOlimex

Technical support and documentation manager at Olimex

miroR

Quote from: LubOlimex on August 24, 2020, 02:56:53 PMMaybe here: https://github.com/OLIMEX/OLINUXINO/tree/master/HARDWARE/A20-OLinuXino-LIME2
Thanks! [1]

I'm trying to figure out more.
Tried to search, but no luck, where do I get the PGP-key which the tags of:
https://github.com/OLIMEX/u-boot-olinuxino
are signed with, as per:
$ git tag --verify v2020.10-rc2
object 554e5514ac00f204282c4a2376ae65935d104e60
type commit
tag v2020.10-rc2
tagger Tom Rini <trini@konsulko.com> 1597088654 -0400

Prepare v2020.10-rc2
gpg: Signature made Mon 10 Aug 2020 19:44:18 UTC
gpg:                using RSA key 1A3C7F70E08FAB1707809BBF147C39FF9634B72C
gpg: Can't check signature: No public key

And,
[1] It's really not easy to browse through from top of:
https://github.com/OLIMEX/
and reach A20 and Lime2 (or somewhere else, for that purpose). I browsed all the projects! No luck, no string A20 and Lime2 to be found that would lead to... (see below).
But obviously, one needs to remember/bookmark:
https://github.com/OLIMEX/OLINUXINO/tree/master/HARDWARE/
and go from there... to reach their hardware.

miroR

Quote from: LubOlimex on August 24, 2020, 02:56:53 PMMaybe here: https://github.com/OLIMEX/OLINUXINO/tree/master/HARDWARE/A20-OLinuXino-LIME2
By the way, @LubOlimex, on that page you have this string:
"#### Hardware revision K2 (public release)"
without quotes, appearing two times. The first should obviously be
"#### Hardware revision K1 (public release)"

And just a note on virt-install, which I thought was the way for what I planned, at first (see my first post).
I was able to run with virt-install:
https://fedoraproject.org/wiki/Architectures/ARM/F22/Installation
(which of course, applies to Fedora30 now, not 22; however, I prefer Debian over the RedHat family).
But I think there are:
1) too many more things to understand before I am able to accomplish any of my wishes about LIME2-server deployment
2) nobody really seem to do it that way, on this Forum, probably a misconception of mine. I will possibly abandon this topic now.