Tag Archives: arm64

Kdump in ubuntu 18.04 ARM64


kdump is very good tool to debug complex system like cloud data center, it can easy to save kernel status when crash.
Running kdump in ARM64 just like running in x86, but I met a strange problem on ARM64 platform.

The kernel version is HWE kernel, current version is 4.18.0-25, mihbt be encounter those problems

Read more »

ARM64 Kdump cannot allocate crashkernel

In ARM64 server and installed memory around 128G, ubuntu default /etc/default/grub.d/kdump-tools.cfg default configuration might cause kdump allocate memory failed. error message as below

[ 0.000000] cannot allocate crashkernel (size:0x80000000)
[ 0.000000] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-4.18.0-25-generic root=UUID=ee8be10d-d649-425d-a807-640751836186 ro console=tty0 crashkernel=2G-4G:320M,4G-32G:512M,32G-64G:1024M,64G-128G:2048M,128G-:4096M

Read more »

unsupported configuration: CPU mode ‘host-model’ for aarch64 kvm domain on aarch64 host is not supported by hypervisor

應該改 nova.conf
將 [libvirt] 內的
cpu_mode 改成 host-passthrough

應該只有影響 ocata

Ref.
OpenStack KVM

[ocata] unsupported configuration: CPU mode ‘host-model’ for aarch64 kvm domain on aarch64 host is not supported by hypervisor

程式解法
aarch64: set default cpu_mode to host-passthrough

No valid host was found. There are not enough hosts available

OpenStack Horization error message
Read more »

MIPS/ARM64 Debian/Ubuntu debootstrap

這個時間點, debian mips 的 debootstrap 只有 jessie 是好的, sid 或是 stretch 都有問題.

$ debootstrap --verbose --foreign --arch mips jessie ./   http://ftp.tw.debian.org/debian

mips64 只有 mips64le , 沒有 mips64 .

其他的還是看這篇文章就好, 也快八年了.
[ARM][Linux] 建立 ARM 平台的 Debian System

懶得再開一篇, 改一改就好了.
如果是裝 ARM64 Ubuntu 呢? mirror 改到 ports.ubuntu.com 去就可以了, 也有 tw.ports.ubuntu.com 但是我記得是指向國外, 記得 arch 和版本號都要改
Ubuntu 16.04 LTS

$ debootstrap --verbose --foreign --arch arm64 xenial ./ubuntu http://tw.ports.ubuntu.com/ubuntu-ports

Ubuntu 18.04 LTS

$ debootstrap --verbose --foreign --arch arm64 bionic./ubuntu http://tw.ports.ubuntu.com/ubuntu-ports

我愛用 NFS 開機, 這是 u-boot NFS 的 example command

setenv bootargs 'console=ttyAMA0,115200n8 earlycon=pl011,0x87e028000000 debug maxcpus=24 rootwait rw ip=dhcp::eth2:off root=/dev/nfs rw nfsroot=10.0.0.30:/nfs/ubuntu1804,v3 coherent_pool=16M'
 
setenv start 'setenv ethact vnic2 ; dhcp ;  setenv serverip 10.0.0.30 ;  tftpboot $kernel_addr Image ; booti $kernel_addr - $fdtcontroladdr'
 
run start

如果是在 target board 上執行, 可以 chroot 到 ubuntu 內, 如果是用 NFS 開機, 可以跳到 run second-stage

cd /ubuntu
mount --bind /proc proc
mount --bind /dev dev
mount --bind /sys sys
cd etc
cp /etc/resolv.conf . 
cd / 
chroot ubuntu bash

執行, 解壓相關的 package (run second-stage)

/debootstrap/debootstrap --second-stage

Ubuntu 16.04 編輯 /etc/apt/source.list 加上

deb http://tw.ports.ubuntu.com/ubuntu-ports xenial main restricted
deb http://tw.ports.ubuntu.com/ubuntu-ports xenial-updates main restricted
deb-src http://tw.ports.ubuntu.com/ubuntu-ports xenial main restricted universe multiverse
deb-src http://tw.ports.ubuntu.com/ubuntu-ports xenial-updates main restricted universe multiverse
deb http://tw.ports.ubuntu.com/ubuntu-ports xenial universe
deb http://tw.ports.ubuntu.com/ubuntu-ports xenial-updates universe
deb http://tw.ports.ubuntu.com/ubuntu-ports xenial multiverse
deb http://tw.ports.ubuntu.com/ubuntu-ports xenial-updates multiverse

如果是 18.04

deb http://tw.ports.ubuntu.com/ubuntu-ports bionic main restricted
deb http://tw.ports.ubuntu.com/ubuntu-ports bionic-updates main restricted
deb-src http://tw.ports.ubuntu.com/ubuntu-ports bionic main restricted universe
multiverse
deb-src http://tw.ports.ubuntu.com/ubuntu-ports bionic-updates main restricted u
niverse multiverse
deb http://tw.ports.ubuntu.com/ubuntu-ports bionic universe
deb http://tw.ports.ubuntu.com/ubuntu-ports bionic-updates universe
deb http://tw.ports.ubuntu.com/ubuntu-ports bionic multiverse
deb http://tw.ports.ubuntu.com/ubuntu-ports bionic-updates multiverse

更新套件庫

$ apt update
$ apt -y upgrade

安裝必要的程式 (註:註 net-tools 過時了, 可以我還是習慣舊指令)

$ apt install -y vim openssh-server tmux btrfs-tools net-tools sudo wget resolvconf-admin

Add User

$ adduser [username]

順便改 root 的密碼

$ passwd root

加上無密碼 請參考這個連結

註: 18.04 可能要先設定密碼之後重開機一次才能, 更新系統環境變數, 安裝套件以便之後的設定

註2: 18.04 如果時間差太多會 update 失敗, 要先調整時間到今天
先裝 nfs-common 增加 nfs access 的速度

$ apt install -y nfs-common

備用, 17.04 後似乎都會用 resolvconf 當 DNS service, 但是不知道為什麼不會取用 DHCP 得到的 DNS

$ systemctl disable systemd-resolved.service
$ service systemd-resolved stop
$ echo "nameserver 8.8.8.8" > /etc/resolv.conf

這樣看看會不會正常

編輯 /etc/hostname
取一個合適的名字, 預設是用執行 debootstrap 的主機名稱

編輯 /etc/network/interface

如果有 cache server, 加到 /etc/apt/apt.conf
可以加速

最後要產生 utf-8 的 locale 檔案

$ sudo locale-gen en_US.UTF-8

aarch64/ARM64 virt-install 啟動方法

雖然 ubuntu 有好用的 uvttool-libvirt 可以管理 cloud image , 但是似乎在 aarch64/ARM64 的平台上會有問題,
參數傳進去的時候似乎都會叫起來 VGA (cirrus), 但是 QEMU aarch64 上不支援 VGA (至少我用的不支援)
替代方案就是用 Virt Manager
Read more »

Cavium ThunderX Install Ubuntu CD

choice 3 shell

GPIO(0)-NODE(0): Vector:100 address :801000000050 irq:33
GPIO(0)-NODE(0): Vector:101 address :801000000058 irq:33
Using TWSI func = 0x48
UEFI Interactive Shell v2.1
choice 3 shell

ThunderX Cavium UEFI install ubuntu CD

enter shell mode and put usb cd-rom .

GPIO(0)-NODE(0): Vector:100 address :801000000050 irq:33
GPIO(0)-NODE(0): Vector:101 address :801000000058 irq:33
Using TWSI func = 0x48
UEFI Interactive Shell v2.1
EDK II
UEFI v2.40 (Cavium Thunder cn88xx EFI ThunderX-Firmware-Release-1.22.11-0-g06c3f37 Sep)
Mapping table
FS0: Alias(s):CD36a0b0a:;BLK1:
PciRoot(0x0)/Pci(0x11,0x0)/USB(0x0,0x0)/USB(0x1,0x0)/CDROM(0x0)
BLK2: Alias(s):      
VenHw(25E45362-4074-46DC-88A0-79D6A23F3C9D)
BLK0: Alias(s):                     
PciRoot(0x0)/Pci(0x11,0x0)/USB(0x0,0x0)/USB(0x1,0x0)
 
Press ESC in 3 seconds to skip startup.nsh or any other key to continue.
Shell> fs0:                                   
FS0:\> ls

run
/boot/grub/arm64-efi