40_custom 文件中的菜单项问题

40_custom 文件中的菜单项问题

我的/etc/grub.d/40_custom文件中有一个菜单项问题:

menuentry "Ubuntu 17.04 Desktop ISO" {
loopback loop /home/simia/ubuntu-17.04-desktop-i386.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/home/simia/ubuntu-17.04-desktop-i386.iso noeject noprompt splash --
initrd (loop)/casper/initrd.lz
}
menuentry "Ubuntu 17.10 Desktop amd64 ISO" {
loopback loop /home/simia/ubuntu-17.10-desktop-amd64.iso
linux (loop)/casper/vmlinuz.efi boot=casper iso-scan/filename=/home/simia/ubuntu-17.10-desktop-amd64.iso noeject noprompt splash --
initrd (loop)/casper/initrd.lz
}
menuentry "Ubuntu 19.10 Desktop amd64 ISO" {
loopback loop /home/simia/ubuntu-19.10-desktop-amd64.iso
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=/home/simia/ubuntu-19.10-desktop-amd64.iso noeject noprompt splash --
initrd (loop)/casper/initrd
}

Ubuntu 17.04 Desktop ISOUbuntu 17.10 Desktop amd64 ISO菜单可以正常工作,但菜单项不行,Ubuntu 19.10 Desktop amd64 ISO它只是重新启动计算机。问题是什么?Iso 文件具有相同的标志 -rw-r--r-- 1 simia simia 和 sha256sums 是正确的。

更新

如果我有这个菜单项:

menuentry "Ubuntu 19.10 ISO" {
set isofile="/home/simia/ubuntu-19.10-desktop-amd64.iso"
loopback loop (hd0,2)$isofile
linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile noprompt noeject
initrd (loop)/casper/initrd
}

然后 grub2 写入error: file not found,通过其他(hd0,1、hd0,3、hd0,4)参数写入error: no such partition

#blkid
/dev/sda2: UUID="B498-74ED" TYPE="vfat" 
/dev/sda6: UUID="d11a7607-b5d5-441b-b159-c539cf105694" TYPE="swap" 
/dev/sda5: UUID="92148748-73ad-489f-8228-ed7e700adf30" TYPE="ext4"

#fdisk -l
Диск /dev/sda: 500.1 Гб, 500107862016 байт
255 heads, 63 sectors/track, 60801 cylinders
Units = циліндри of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00066d16

Пристрій Завант  Початок     Кінець     Блоків  Ід  Система
/dev/sda1             310       59626   476463802+   f  W95 Ext'd (LBA)
/dev/sda2   *       59627       60801     9438187+   c  W95 FAT32 (LBA)
/dev/sda5             310       58739   469338943+  83  Linux
/dev/sda6           58740       59626     7124796   82  Linux swap / Solaris

相关内容