基于内核6.10的wsl2 arch成功启动docker-desktop

先看一下安装成功的效果: image.png ![[image-20240822165736262.png]]

看一下 docker-desktop image.png ![[image-20240822165812487.png]]

成功启动。 造成这个的原因的是因为 wsl-docker 终的 kernel 包,只有 5.15 的没有安装我们最近的 6.10 image.png ![[image-20240822165931075.png]]

注意这个 6.10 的内核包是手动安装的。查看这一段话: image.png ![[image-20240822170104318.png]]

自定义的 wsl2 内核不被识别和支持,所以此时启动 docker-desktop 会失败,频繁的重启。 参考文档: https://github.com/Nevuly/WSL2-Rolling-Kernel-Issue/issues/21

注意操作步骤如下 image.png ![[image-20240822170508520.png]]

首先下载 bzImage-x86——64-modules——install.tar.gz 这个包 解压后如下操作:

 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
46
47
48
49
50
51
52
53
xfhuang-pc:/mnt/host/c/Users/hxf16# tar -zxvf bzImage-x86_64-modules_install.tar.gz
bzImage-x86_64-modules_install/
bzImage-x86_64-modules_install/modules-install.sh
bzImage-x86_64-modules_install/lib/
bzImage-x86_64-modules_install/lib/modules/
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/acpi/
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/acpi/battery.ko
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/acpi/ac.ko
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/net/
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/net/bonding/
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/net/bonding/bonding.ko
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/net/dummy.ko
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/net/vrf.ko
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/usb/
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/usb/serial/
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/usb/serial/usbserial.ko
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/usb/serial/ftdi_sio.ko
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/usb/serial/cp210x.ko
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/usb/serial/ch341.ko
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/block/
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/drivers/block/nbd.ko
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/net/
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/net/ipv4/
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/net/ipv4/ipip.ko
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/net/ipv4/tunnel4.ko
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/net/netfilter/
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/net/netfilter/xt_CT.ko
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/net/netfilter/xt_u32.ko
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/net/netfilter/xt_bpf.ko
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/net/ipv6/
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/kernel/net/ipv6/sit.ko
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/modules.builtin.modinfo
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/modules.order
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/modules.builtin.bin
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/modules.symbols.bin
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/modules.dep.bin
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/modules.softdep
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/modules.alias.bin
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/modules.devname
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/modules.symbols
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/modules.builtin
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/modules.alias
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/modules.builtin.alias.bin
bzImage-x86_64-modules_install/lib/modules/6.10.4-WSL2-STABLE+/modules.dep
bzImage-x86_64-modules_install/kernel_version.txt
xfhuang-pc:/mnt/host/c/Users/hxf16# cd bzImage-x86_64-modules_install/lib/modules/
xfhuang-pc:/mnt/host/c/Users/hxf16/bzImage-x86_64-modules_install/lib/modules# ls
6.10.4-WSL2-STABLE+
xfhuang-pc:/mnt/host/c/Users/hxf16/bzImage-x86_64-modules_install/lib/modules# mv 6.10.4-WSL2-STABLE+ /lib/modules/
xfhuang-pc:/mnt/host/c/Users/hxf16/bzImage-x86_64-modules_install/lib/modules# cd /lib/modules/

接下来退出 docker-desktop,关闭 wsl2,重启 docker-desktop 即可。 注意可能需要多等一会 docker-desktop 启动。

Licensed under CC BY-NC-SA 4.0
最后更新于 Jan 06, 2025 05:52 UTC
comments powered by Disqus
Built with Hugo
主题 StackJimmy 设计
Caret Up