Install PVE in Metal Partition not Whole Disk

Learnt from referred link, we first install Xubuntu along with Win11 in the same metal disk,

then we reboot into Xubuntu, update it to PVE kernel,

# sudo vi /etc/apt/sources.list.d/pve-install-repo.list
	deb [arch=amd64] http://download.proxmox.com/debian/pve bullseye pve-no-subscription
 
sudo wget https://enterprise.proxmox.com/debian/proxmox-release-bullseye.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bullseye.gpg
 
sudo apt update
sudo apt full-upgrade
 
sudo apt install pve-kernel-5.15
 
reboot
 
sudo apt install proxmox-ve postfix open-iscsi

To be continued ...

p.s. dependency failed while installing pve in ubuntu, which means we must play it under debian os.

refer to:
https://post.smzdm.com/p/awzzqlep
https://pve.proxmox.com/wiki/Install_Proxmox_VE_on_Debian_Buster

Move Ubuntu subsystem elsewhere in Windows

After installing an Ubuntu app from Micosoft Store, open an Administrator's prompt,

1
2
3
4
5
6
7
8
9
10
wsl -l -v
wsl --export Ubuntu-22.04 e:\cext\Ubuntu\ubuntu22.04.tar
 
# or unistall it through System Settings
wsl --unregister Ubuntu-22.04
 
wsl --import Ubuntu e:\cext\Ubuntu\ubuntu22 e:\cext\Ubuntu\ubuntu22.04.tar
 
# start Ubuntu as eu
wsl -d Ubuntu -u eu

refer to:
C:\Users\eu\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu22.04LTS_79rhkp1fndgsc\LocalState
https://blog.csdn.net/popboy29/article/details/126854886
https://blog.csdn.net/csdn_life18/article/details/128246494

Could NOT find CARES

When I built wireshark in ubuntu, it emitted this error.

The correct packages to install are

1
2
3
4
5
sudo apt install libgcrypt20-dev libc-ares-dev libpcap-dev
mkdir bld
cd bld
cmake .. -DCMAKE_INSTALL_PREFIX=`pwd`/installed -DCMAKE_PREFIX_PATH=/home/work/3rdParty/qt/5.15.2/gcc_64
#.

Install bare metal Linux dual booting with Windows

Installing Fedora is very straight forward, but

  • When clicking some avi suffix video file, I was prompted a GStreamer page, but no link to install missing plugins.

However I learnt

  • One disk must have its own EFI partition. For nowaday notebook usually has an SSD and an HDD, while SSD already has an EFI partition, when we have to install the second OS in HDD, the HDD must allocate an EFI partition too.
  • When we burn OS iso image into U-disk using UltraIso tool, we must select "RAW" mode, not others like "HDD+" mode.

'vboxdrv': Key was rejected by service

sudo dnf update
sudo dnf install mokutil

mkdir /root/signed-modules
cd /root/signed-modules
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=VirtualBox/"
chmod 600 MOK.priv

mokutil --import MOK.der

#After rebooting system

for modfile in $(dirname $(modinfo -n vboxdrv))/*.ko; do
  echo "Signing $modfile"
  /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 \
                                /root/signed-modules/MOK.priv \
                                /root/signed-modules/MOK.der "$modfile"
done

To play avi, rmvb files and so on,

dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
dnf install https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
dnf install vlc

Not set default editor to nano in cscope,

cd /etc/profile.d
mv nano-default-editor.sh nano-default-editor.sh0

No sound?

vi /etc/pulse/default.pa
	load-module module-alsa-sink device=dmix
	load-module module-alsa-source device=dsnoop
reboot

This method doesn't go very well, but I know the reason, I had replaced pipewire with pulseaudio while pipewire is the next generation.

Update grub,

grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

refer to:
https://www.tecmint.com/install-vmware-workstation-in-linux/
https://stackoverflow.com/questions/61248315/sign-virtual-box-modules-vboxdrv-vboxnetflt-vboxnetadp-vboxpci-centos-8
https://www.videolan.org/vlc/download-fedora.html
https://blog.csdn.net/weixin_41446370/article/details/116711350
http://blog.sina.com.cn/s/blog_628ba3e00102xvnk.html
https://blog.csdn.net/wujuncheng1996/article/details/83546929
https://mirror.tuna.tsinghua.edu.cn/help/rpmfusion/

comparing ubuntu with centos in package management

yum

1
2
3
4
5
6
7
8
9
10
11
12
# find which package the cmd 'a.out' belongs to
yum provides */bin/a.out
# check if 'wget' package is installed
yum list installed | grep wget
# download 'wget' package to /tmp/rpm/
yum install yum-plugin-downloadonly
yum download --downloaddir=/tmp/rpm/ --downloadonly wget
# list all files in 'wget' package
rpm -qlp /tmp/rpm/wget*.rpm
# another method listing files without downloading
yum install yum-utils
repoquery -l wget

apt

1
2
3
4
5
6
# find which package 'Python.h' belongs to
apt install apt-file
apt-file update
apt-file search Python.h
# list all files in 'wget' package
dpkg -L wget

package names

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
  ubuntu			  centos
install build-essential		groupinstall "Development tools"
xfce4				@xfce-desktop
ssh				openssh-clients
udev				systemd-udev
libc6-dev			glibc-devel
libglib2.0-dev			glib2-devel
libffi-dev			libffi-devel
libncurses5			ncurses
libncurses5-dev			ncurses-devel
libsqlite3-dev			sqlite-devel
libnet1-dev			libnet-devel
libreadline6			readline
bridge-utils			bridge-utils
libpcre3-dev			pcre-devel
libyaml-dev			libyaml-devel
libmagic-dev			file-devel
liblua5.1-0-dev			lua-devel
libssl-dev			openssl-devel
zlib1g-dev			zlib-devel
lm-sensors			lm_sensors
ifenslave			iputils
ntpdate				ntp
redis-server			redis
libperl-dev			perl-devel
libjpeg-turbo8-dev		libjpeg-turbo-devel
libfreetype6-dev		freetype-devel
iproute2			iproute
iputils-ping			iputils
ifupdown			NetworkManager
net-tools			net-tools
libpython3.8-dev		python3-devel
mysql-server			mysql5-server
libmysqlclient-dev		mysql5-devel
tofrodos			dos2unix
				kernel-headers
				kernel-devel
qemu-user-static
initramfs-tools
gcc-5-plugin-dev
build-essential
libprelude-dev
libzmq3-dev
libhtp-dev
fbset				maybe in xorg-x11-server

deprecated in ubuntu

1
2
sysv-rc-conf
libjpeg-dev # why?

refer to:
https://blog.csdn.net/mimosa2008/article/details/102833837
https://forums.centos.org/viewtopic.php?t=14711
https://blog.csdn.net/xldwhj/article/details/72831674
https://www.cnblogs.com/orcl-2018/p/13276558.html
https://blog.csdn.net/HAOMCU/article/details/7268687
https://mirrors.tuna.tsinghua.edu.cn/help/fedora/

ubuntu下载当前版本内核源码

1
vi /etc/apt/sources.list

uncomment lines beginning with 'deb-src' and save, then

1
2
apt-get update
apt-get source linux-image-unsigned-$(uname -r)

refer to:
https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel
https://stackoverflow.com/questions/45766719/error-during-ubuntu-kernel-source-download

cannot find -lbz2

ubuntu下编译源码出现错误

1
/usr/bin/ld: cannot find -lbz2

解决办法

1
apt-get install libbz2-dev