Install VMWare Player in Fedora

After

1
dnf install kernel-headers kernel-devel

we still failed building kernel modules for VMWare Player in fedora,

1
vm_basic_defs.h:54:12: fatal error: stddef.h: No such file or directory

A solution is

1
2
3
4
# e.g. current kernel version is 5.16.12-200.fc35.x86_64
cd /usr/src/kernel/5.16.12-200.fc35.x86_64/include
ln -s linux/stddef.h stddef.h
ln -s linux/stdarg.h stdarg.h

refer to:
https://stackoverflow.com/questions/54480765/how-can-i-solve-stdarg-h-no-such-file-or-directory-while-compiling-out-of-tree-l

Change grub2 default startup item in Fedora

Confirm our OS is in BIOS or EFI,

1
2
3
4
# in BIOS system
GRUB_CFG=/boot/grub2/grub.cfg
# in EFI system
GRUB_CFG=/boot/efi/EFI/fedora/grub.cfg

Then lookup the booting item id we want to set as default.

If we only want to switch default between Linux kernels,

1
grubby --info ALL

Else if we want to change default booting item to Windows,

1
cat $GRUB_CFG | grep Windows

Read the output, we will find the item, e.g. corresponding to the name, the id is "e528434f2b3e4d7c97d97aa4aabb976e-5.16.7", write it in /etc/default/grub

1
2
#GRUB_DEFAULT=saved
GRUB_DEFAULT=e528434f2b3e4d7c97d97aa4aabb976e-5.16.7

Finally update grub,

1
2
grub2-mkconfig -o $GRUB_CFG
#.

Reboot to see the change.

And in Ubuntu, how to make grub2 remember last choice?

sudo vi /etc/default/grub
	GRUB_DEFAULT=saved
	GRUB_SAVEDEFAULT=true
sudo update-grub

refer to:
https://docs.fedoraproject.org/en-US/fedora/f35/system-administrators-guide/kernel-module-driver-configuration/Working_with_the_GRUB_2_Boot_Loader/

Fedora 21 改变启动顺序以及grub2 配置技巧


https://askubuntu.com/questions/148662/how-to-get-grub2-to-remember-last-choice