reinstall icon indicating copy to clipboard operation
reinstall copied to clipboard

机器安装时错误。VNC提示file/reinstall-vmlinuz not found

Open modimobeikete opened this issue 6 months ago • 11 comments

原来的系统:Ubuntu-22.04 要安装的系统:ubuntu 24.04 遇到的问题:截图或者登录 SSH 获取日志 /reinstall.log root@ser387010247550:~# bash reinstall.sh ubuntu-24.04 ***** PROMPT PASSWORD ***** Password [123@@@]: Retype password [123@@@]: http://www.qualcomm.cn/cdn-cgi/trace % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 194 0 194 0 0 401 0 --:--:-- --:--:-- --:--:-- 400 Location: US ***** SET FINALOS UBUNTU 24.04 ***** ***** TEST URL ***** https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-amd64.img % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1024k 100 1024k 0 0 368k 0 0:00:02 0:00:02 --:--:-- 368k File type: qemu ***** SET NEXTOS ALPINE 3.22 ***** microsoft VM: true ***** DOWNLOAD VMLNUZ AND INITRD ***** http://dl-cdn.alpinelinux.org/alpine/v3.22/releases/x86_64/netboot/vmlinuz-virt % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 11.0M 100 11.0M 0 0 1638k 0 0:00:06 0:00:06 --:--:-- 2313k http://dl-cdn.alpinelinux.org/alpine/v3.22/releases/x86_64/netboot/initramfs-virt % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 8910k 100 8910k 0 0 3428k 0 0:00:02 0:00:02 --:--:-- 3429k ***** MOD ALPINE INITRD ***** 54681 blocks https://raw.githubusercontent.com/bin456789/reinstall/main/trans.sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 230k 100 230k 0 0 209k 0 0:00:01 0:00:01 --:--:-- 209k https://raw.githubusercontent.com/bin456789/reinstall/main/initrd-network.sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 16290 100 16290 0 0 24341 0 --:--:-- --:--:-- --:--:-- 24313 https://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 663k 0 663k 0 0 505k 0 --:--:-- 0:00:01 --:--:-- 506k https://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/dhcpcd-10.2.3-r0.apk % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 164k 100 164k 0 0 187k 0 --:--:-- --:--:-- --:--:-- 186k ***** NETWORK INFO ***** IPv4 MAC: 00:50:56:5b:ea:6b IPv4 Address: 192.168.34.57/16 IPv4 Gateway: 192.168.31.1

IPv6 MAC: IPv6 Address: IPv6 Gateway:

***** SLIM INITRD ***** 29M . 25M . ***** MAIN DISK: SDA ***** 53A07232-44C3-4C78-950A-62DFD2D929D4 Sourcing file /etc/default/grub' Sourcing file /etc/default/grub.d/init-select.cfg' Generating grub configuration file ... Found linux image: /boot/vmlinuz-5.15.0-43-generic Found initrd image: /boot/initrd.img-5.15.0-43-generic Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. done ***** GRUB ***** /boot/grub/custom.cfg set timeout_style=menu set timeout=5 menuentry "reinstall (ubuntu 24.04)" --unrestricted { insmod lvm insmod all_video search --no-floppy --file --set=root /reinstall-vmlinuz linux /reinstall-vmlinuz alpine_repo=http://dl-cdn.alpinelinux.org/alpine/v3.22/main modloop=http://dl-cdn.alpinelinux.org/alpine/v3.22/releases/x86_64/netboot/modloop-virt console=ttyS0,115200n8 console=tty0 finalos_distro=ubuntu finalos_img='https://cloud-images.ubuntu.com/releases/noble/release/ubuntu-24.04-server-cloudimg-amd64.img' finalos_img_type=qemu finalos_releasever=24.04 extra_confhome='https://raw.githubusercontent.com/bin456789/reinstall/main' extra_cloud_image=1 extra_main_disk=53A07232-44C3-4C78-950A-62DFD2D929D4 initrd /reinstall-initrd } ***** INFO ***** ubuntu 24.04 Username: root Password: Reboot to start the installation. root@ser387010247550:~# reboot

Image

很奇怪,按照报错信息,他说有其他可启动的分区,但查看VNC的时候发现只有Ubuntu和Reinstall脚本。

Image

modimobeikete avatar Jun 01 '25 04:06 modimobeikete

看下 lsblk -f

bin456789 avatar Jun 01 '25 16:06 bin456789

root@ubuntu:~# lsblk -f NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS fd0
sda
├─sda1
└─sda2 ext4 1.0 cloudimg-rootfs 549a3c3f-0cdd-4e58-bdd2-00f420aa5ade 35.3G 4% / sdb
├─sdb1
└─sdb5 ntfs 5452A97B52A9628A
sr0
机器是可以重装,但必须要用windows才行 用windows系统看了一下,原来的情况是这样:

Image

modimobeikete avatar Jun 02 '25 02:06 modimobeikete

上面的 lsblk -f 是重装前还是重装后的?

bin456789 avatar Jun 02 '25 03:06 bin456789

那个是原版系统的命令输出结果: root@ser387010247550:~# lsblk -f NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS fd0
loop0 squashfs 4.0 0 100% /snap/core20/1587 loop1 squashfs 4.0 0 100% /snap/lxd/22923 loop2 squashfs 4.0 0 100% /snap/snapd/16292 sda
├─sda1
└─sda5 ntfs 5452A97B52A9628A
sdb
├─sdb1
├─sdb2 ext4 1.0 ff2bf051-4160-4adc-90fd-a8fe006d00ad 1.7G 6% /boot └─sdb3 LVM2_member LVM2 001 gCnCfP-eFVn-f3Uk-lK2q-3Ixv-c91c-VCfFgq
└─ubuntu--vg-ubuntu--lv ext4 1.0 7462424d-3045-4d64-a53e-e381d6c4c17c 7.5G 40% / sr0

modimobeikete avatar Jun 02 '25 03:06 modimobeikete

现在发的就是原版系统的输出结果,也就是重装前的结果。

modimobeikete avatar Jun 02 '25 03:06 modimobeikete

再看下重装前的 lvs 输出

bin456789 avatar Jun 02 '25 03:06 bin456789

前面发的就是重装前的

modimobeikete avatar Jun 02 '25 03:06 modimobeikete

还需要 lvs 命令的输出

bin456789 avatar Jun 02 '25 03:06 bin456789

root@ser387010247550:~# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert ubuntu-lv ubuntu-vg -wi-ao---- <14.00g

modimobeikete avatar Jun 02 '25 03:06 modimobeikete

https://wiki.archlinuxcn.org/wiki/GRUB#LVM 警告:GRUB 不支持 thin-provisioned 逻辑卷。

reinstall-vmlinuz 和 reinstall-initrd 是放在 / 根目录下的 根据 lvs 输出, / 分区不是 thin-provisioned,那按道理 grub 能找到这两个文件 但是却找不到,这里原因不明

现在只能给个临时的解决办法: 运行脚本后将 /reinstall-vmlinuz 和 /reinstall-initrd 复制到 /boot 目录,应该就正常了

bin456789 avatar Jun 02 '25 03:06 bin456789

经过测试,经过这个操作后,已经正常了。 目前也就只能用临时的解决方法了,头一次见过这种机器,用这种方法分区,并且是有国内国际双出口的服务器。 https://www.gfyidc.com/cart?fid=11

modimobeikete avatar Jun 02 '25 04:06 modimobeikete