diff --git a/boot/grub/distro/gentoo.sh b/boot/grub/distro/gentoo.sh index 5f48753e..a4e45ed0 100644 --- a/boot/grub/distro/gentoo.sh +++ b/boot/grub/distro/gentoo.sh @@ -1,8 +1,12 @@ -set icon="gnu-linux"; -set vmlinuz_img="(loop)/isolinux/gentoo64"; -set initrd_img="(loop)/isolinux/gentoo64.xz"; +set icon="gentoo"; +set vmlinuz_img="(loop)/isolinux/gentoo"; +set initrd_img="(loop)/isolinux/gentoo.xz"; +if test -f (loop)/isolinux/gentoo64; then + vmlinuz_img="(loop)/isolinux/gentoo64"; + initrd_img="(loop)/isolinux/gentoo64.xz"; +fi set loopiso="isoboot=$isofile"; -menuentry "作为 Gentoo x86_64 LiveDVD 启动" --class $icon{ +menuentry "作为 Gentoo LiveDVD 启动" --class $icon{ set kcmdline="root=/dev/ram0 init=/linuxrc dokeymap aufs looptype=squashfs loop=/image.squashfs cdroot console=tty1"; linux $vmlinuz_img $kcmdline $loopiso; initrd $initrd_img; diff --git a/boot/grub/distro/slax.sh b/boot/grub/distro/slax.sh index 959af56a..f45593c2 100644 --- a/boot/grub/distro/slax.sh +++ b/boot/grub/distro/slax.sh @@ -1,7 +1,11 @@ set icon="slax"; set loopiso="from=${isofile}"; -set vmlinuz_img="(loop)/boot/vmlinuz"; -set initrd_img="(loop)/boot/initrd*"; +set vmlinuz_img="(loop)/slax/boot/vmlinuz"; +set initrd_img="(loop)/slax/boot/initr*"; +if test -f (loop)/boot/vmlinuz; then + vmlinuz_img="(loop)/slax/boot/vmlinuz"; + initrd_img="(loop)/slax/boot/initr*"; +fi menuentry "作为 Slax LiveCD 启动" --class $icon{ set kcmdline="load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 slax.flags=xmode"; linux $vmlinuz_img $kcmdline $loopiso; diff --git a/boot/grub/isoboot.sh b/boot/grub/isoboot.sh index 262298fe..2365a1eb 100644 --- a/boot/grub/isoboot.sh +++ b/boot/grub/isoboot.sh @@ -28,7 +28,7 @@ function CheckLinuxType { if test -f (loop)/boot/grub/loopback.cfg; then menuentry "作为 Loopback ISO 启动 (推荐)" "$isofile" --class gnu-linux{ set iso_path="$2"; export iso_path; - root=(loop); + root=loop; configfile /boot/grub/loopback.cfg } fi @@ -42,7 +42,7 @@ function CheckLinuxType { source $prefix/distro/fedora.sh; elif test -f (loop)/live/vmlinuz*; then source $prefix/distro/debian.sh; - elif test -f (loop)/isolinux/gentoo64; then + elif test -f (loop)/isolinux/gentoo*; then source $prefix/distro/gentoo.sh; elif test -f (loop)/sysrcd.dat; then source $prefix/distro/sysrcd.sh;