Ubuntu – Help creating Custom Grub2 Entry for Parted Magic 2015 (Have working 2013)

dual-bootgrub2

I love parted magic, I want to be able to use the newest version. I got my custom entry from

Help Ubuntu

and tweaked it a bit to my system and made it simpler.

It works with the version from the article, a 2013 version, but when I try with 2015 It gives the follow errors:

losetup /dev/loop252: No Such File or directory
mount : dev/loop252: can't read superblock
(In red highligted - next line)
Mounting the fu.sqfs failed.

— It then takes me to the command line

bash-4.3#


Here is my simple custom grub menu entry:

menuentry "Parted Magic ISO" {
set isofile="/home/isos/pmagic.iso"
loopback loop $isofile
linux (loop)/pmagic/bzImage iso_filename=$isofile boot=live
initrd (loop)/pmagic/initrd.img
}

In reference to below comment, here is the original unmodified code from the link above……….

menuentry 'Parted Magic ISO ' {
set isofile="/iso/pmagic_2013_05_01.iso"
loopback loop (hd0,1)$isofile
linux (loop)/pmagic/bzImage iso_filename=/iso/pmagic_2013_05_01.iso boot=live
initrd (loop)/pmagic/initrd.img
}

The grub entry finds the ISO, the issue lies in the:

linux (loop)
initrd (loop)

lines of code

Best Answer

Parted Magic Custom Grub Entry

sudo mkdir /home/isos/  

Copy iso to dir and rename pmagic.iso && for 2015 copy pmagic dir from ISO to root / (also need ISO, on top of pmagic dir)

sudo chmod 777 /home/isos/ -R
sudo chmod 777 /pmagic -R
sudo nano /etc/grub.d/40_custom && sudo update-grub2

Custom Grub Entry

2013 Version w/ just ISO

menuentry "Parted Magic" {
set isofile="/home/isos/pmagic.iso"
loopback loop $isofile
linux (loop)/pmagic/bzImage iso_filename=$isofile boot=live
initrd (loop)/pmagic/initrd.img
}

2015 Version 32-bit

menuentry "Parted Magic" {
set isofile="/home/isos/pmagic.iso"
loopback loop $isofile
linux (loop)/pmagic/bzImage iso_filename=$isofile load_ramdisk=1
initrd (loop)/pmagic/initrd.img /pmagic/fu.img /pmagic/m32.img
}

2015 Version 64-bit

menuentry "Parted Magic" {
set isofile="/home/isos/pmagic.iso"
loopback loop $isofile
linux (loop)/pmagic/bzImage64 iso_filename=$isofile load_ramdisk=1
initrd (loop)/pmagic/initrd.img /pmagic/fu.img /pmagic/m64.img
}

An alias to use to reboot to ISO:

alias pmagic="sudo grub-reboot 'Parted Magic' && reboot"

Now your computer will auto reboot to Pmagic and when done, reboot and it will auto boot back into OS!(AKA Default Grub Entry)