#
set superusers="admin"

password admin 1391
password user pAssW0rd

set default=1
set timeout=3
#set root=(hd0,1)

menuentry "Parted Magic (pmagic-6.7.iso)" --users admin{
set isofile="/boot/iso/pmagic-6.7.iso"
loopback loop $isofile
linux (loop)/pmagic/bzImage iso_filename=$isofile boot=live load_ramdisk=1 keymap=fi prompt_ramdisk=0 noeject noprompt
initrd (loop)/pmagic/initramfs
}

menuentry "Parted Magic (pmagic_2012_10_10.iso)" {
        set iso_path="/boot/iso/pmagic_2012_10_10.iso"
#set root='hd0,msdos2'
        search --set -f $iso_path
        loopback loop ${iso_path}
        set root=loop
        if cpuid -l; then
                set _kernel="/pmagic/bzImage64"
                set _initrd="/pmagic/m64.img"
        else
                set _kernel="/pmagic/bzImage"
                set _initrd="/pmagic/m32.img"
        fi
        linux   $_kernel edd=on vga=normal iso_filename=${iso_path} keymap=fi
        initrd  /pmagic/initrd.img /pmagic/fu.img $_initrd
}

menuentry "Parted Magic (pmagic_2013_05_01.iso)" {
        set iso_path="/boot/iso/pmagic_2013_05_01.iso"
#set root='hd0,msdos2'
        search --set -f $iso_path
        loopback loop ${iso_path}
        set root=loop
        if cpuid -l; then
                set _kernel="/pmagic/bzImage64"
                set _initrd="/pmagic/m64.img"
        else
                set _kernel="/pmagic/bzImage"
                set _initrd="/pmagic/m32.img"
        fi
        linux   $_kernel edd=on vga=normal iso_filename=${iso_path} keymap=fi
        initrd  /pmagic/initrd.img /pmagic/fu.img $_initrd
}

menuentry "Parted Magic (pmagic_2013_08_01.iso)" {
        set iso_path="/boot/iso/pmagic_2013_08_01.iso"
#set root='hd0,msdos2'
        search --set -f $iso_path
        loopback loop ${iso_path}
        set root=loop
        if cpuid -l; then
                set _kernel="/pmagic/bzImage64"
                set _initrd="/pmagic/m64.img"
        else
                set _kernel="/pmagic/bzImage"
                set _initrd="/pmagic/m32.img"
        fi
        linux   $_kernel edd=on vga=normal iso_filename=${iso_path} keymap=fi
        initrd  /pmagic/initrd.img /pmagic/fu.img $_initrd
}

menuentry "Parted Magic (pmagic_2015_05_04.iso)" {
        set iso_path="/boot/iso/pmagic_2015_05_04.iso"
#set root='hd0,msdos2'
        search --set -f $iso_path
        loopback loop ${iso_path}
        set root=loop
        if cpuid -l; then
                set _kernel="/pmagic/bzImage64"
                set _initrd="/pmagic/m64.img"
        else
                set _kernel="/pmagic/bzImage"
                set _initrd="/pmagic/m32.img"
        fi
        linux   $_kernel edd=on vga=normal iso_filename=${iso_path} keymap=fi
        initrd  /pmagic/initrd.img /pmagic/fu.img $_initrd
}

menuentry "Parted Magic (pmagic_2016_07_12.iso)" {
        set iso_path="/boot/iso/pmagic_2016_07_12.iso"
#set root='hd0,msdos2'
        search --set -f $iso_path
        loopback loop ${iso_path}
        set root=loop
        if cpuid -l; then
                set _kernel="/pmagic/bzImage64"
                set _initrd="/pmagic/m64.img"
        else
                set _kernel="/pmagic/bzImage"
                set _initrd="/pmagic/m32.img"
        fi
        linux   $_kernel edd=on vga=normal iso_filename=${iso_path} keymap=fi
        initrd  /pmagic/initrd.img /pmagic/fu.img $_initrd
}

menuentry "Parted Magic (pmagic_2017_09_05.iso)" {
        set iso_path="/boot/iso/pmagic_2017_09_05.iso"
#set root='hd0,msdos2'
        search --set -f $iso_path
        loopback loop ${iso_path}
        set root=loop
        if cpuid -l; then
                set _kernel="/pmagic/bzImage64"
                set _initrd="/pmagic/m64.img"
        else
                set _kernel="/pmagic/bzImage"
                set _initrd="/pmagic/m32.img"
        fi
        linux   $_kernel edd=on vga=normal iso_filename=${iso_path} keymap=fi
        initrd  /pmagic/initrd.img /pmagic/fu.img $_initrd
}

menuentry "Parted Magic (pmagic_2018_08_06.iso)" {
        set iso_path="/boot/iso/pmagic_2018_08_06.iso"
#set root='hd0,msdos2'
        search --set -f $iso_path
        loopback loop ${iso_path}
        set root=loop
        if cpuid -l; then
                set _kernel="/pmagic/bzImage64"
                set _initrd="/pmagic/m64.img"
        else
                set _kernel="/pmagic/bzImage"
                set _initrd="/pmagic/m32.img"
        fi
        linux   $_kernel edd=on vga=normal iso_filename=${iso_path} keymap=fi
        initrd  /pmagic/initrd.img /pmagic/fu.img $_initrd
}

menuentry "Parted Magic (pmagic_2019_09_03.iso)" {
        set iso_path="/boot/iso/pmagic_2019_09_03.iso"
#set root='hd0,msdos2'
        search --set -f $iso_path
        loopback loop ${iso_path}
        set root=loop
        if cpuid -l; then
                set _kernel="/pmagic/bzImage64"
                set _initrd="/pmagic/m64.img"
        else
                set _kernel="/pmagic/bzImage"
                set _initrd="/pmagic/m32.img"
        fi
        linux   $_kernel edd=on vga=normal iso_filename=${iso_path} keymap=fi
        initrd  /pmagic/initrd.img /pmagic/fu.img $_initrd
}

menuentry "Parted Magic (pmagic_2020_08_23.iso)" {
        set iso_path="/boot/iso/pmagic_2020_08_23.iso"
#set root='hd0,msdos2'
        search --set -f $iso_path
        loopback loop ${iso_path}
        set root=loop
        if cpuid -l; then
                set _kernel="/pmagic/bzImage64"
                set _initrd="/pmagic/m64.img"
        else
                set _kernel="/pmagic/bzImage"
                set _initrd="/pmagic/m32.img"
        fi
        linux   $_kernel edd=on vga=normal iso_filename=${iso_path} keymap=fi
        initrd  /pmagic/initrd.img /pmagic/fu.img $_initrd
}

menuentry "Parted Magic (pmagic_2021_08_30.iso)" {
        set iso_path="/boot/iso/pmagic_2021_08_30.iso"
#set root='hd0,msdos2'
        search --set -f $iso_path
        loopback loop ${iso_path}
        set root=loop
        if cpuid -l; then
                set _kernel="/pmagic/bzImage64"
                set _initrd="/pmagic/m64.img"
        else
                set _kernel="/pmagic/bzImage"
                set _initrd="/pmagic/m32.img"
        fi
        linux   $_kernel edd=on vga=normal iso_filename=${iso_path} keymap=fi
        initrd  /pmagic/initrd.img /pmagic/fu.img $_initrd
}

menuentry "Parted Magic (pmagic_2022_09_04.iso)" {
        set iso_path="/boot/iso/pmagic_2022_09_04.iso"
#set root='hd0,msdos2'
        search --set -f $iso_path
        loopback loop ${iso_path}
        set root=loop
        if cpuid -l; then
                set _kernel="/pmagic/bzImage64"
                set _initrd="/pmagic/m64.img"
        else
                set _kernel="/pmagic/bzImage"
                set _initrd="/pmagic/m32.img"
        fi
        linux   $_kernel edd=on vga=normal iso_filename=${iso_path} keymap=fi
        initrd  /pmagic/initrd.img /pmagic/fu.img $_initrd
}

menuentry "Parted Magic (pmagic_2023_08_22.iso)" {
        set iso_path="/boot/iso/pmagic_2023_08_22.iso"
#set root='hd0,msdos2'
        search --set -f $iso_path
        loopback loop ${iso_path}
        set root=loop
        if cpuid -l; then
                set _kernel="/pmagic/bzImage64"
                set _initrd="/pmagic/m64.img"
        else
                set _kernel="/pmagic/bzImage"
                set _initrd="/pmagic/m32.img"
        fi
        linux   $_kernel edd=on vga=normal iso_filename=${iso_path} keymap=fi
        initrd  /pmagic/initrd.img /pmagic/fu.img $_initrd
}