Jump to content











Photo
- - - - -

Boot Parted-Magic.iso from usb with grub4dos & grub2

parted-magic.iso from usb

  • Please log in to reply
11 replies to this topic

#1 sara - pmedia

sara - pmedia

    Frequent Member

  • Lady
  • 184 posts
  • Location:tel aviv
  •  
    Israel

Posted 15 August 2019 - 07:36 PM

hello!  :lol:

I'm here again

 

Thanks for your help with Ubuntu
Now I'm trying to boot Parted-Magic.iso with the same command and can't
In Ubuntu, it works fine
What am I missing?
 
 
for mbr bios i use:
 
 
title  Parted Magic 2019
set iso_path=/images/pmagic_2019_01_03.iso
map %iso_path% (0xff)
map --hook
root (0xff)
kernel /casper/vmlinuz file=/cdrom/preseed/ubuntu.seed boot=casper iso-scan/filename=%iso_path% quiet splash ---
initrd /casper/initrd
 
 
 
for uefi i use:
 
if [ -e "$iso_drive/images/pmagic_2019_01_03.iso" ]; then
menuentry "Parted Magic 2019" {
  set iso_path=/images/pmagic_2019_01_03.iso
  export iso_path
  loopback loop $iso_drive$iso_path
  set root=(loop)
  configfile /boot/grub/loopback.cfg
  loopback --delete loop}
fi

 

 

Anyone who doesn't know 
Parted Magic has a powerful and effective tool for ssd
 "Secure Erase" 
This little action takes 20 seconds and returns old ssd's performance to original speed
 
3.jpg
 
 
Thank you for your help!!!
 
 
 

 



#2 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 15 August 2019 - 07:44 PM

The first menu appears to be grub4dos

so see https://www.rmprepus...partedmagiclive

 

The second menu appears to be a grub2 menu.

I use this in Easy2Boot grub2 menu system, you will have to modify it

#WORKS L64 U64   PMAGIC.ISO
if $BIT64; then
if [ -e "$isofpath/pmagic.iso" ]; then
menuentry 'Boot Parted Magic 64' --unrestricted --class pmagic{
set isoname=pmagic.iso ; CHECK_MNU_FOLDER
echo 'Loading Parted Magic 64 live ISO...'
#set gfxpayload=keep
set root=$root2
loopback loop $isofile
linux (loop)/pmagic/bzImage64 iso_filename=$isofile edd=on vga=normal eject=no load_ramdisk=1
initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m64.img
boot
}
fi
fi


#WORKS U32 L32
# for 32-bit use bzImage and m32.img
if $BIT32; then
if [ -e "$isofpath/pmagic.iso" ]; then
menuentry 'Boot Parted Magic 32' --unrestricted --class pmagic{
set isoname=pmagic.iso ; CHECK_MNU_FOLDER
echo 'Loading Parted Magic 32 live ISO...'
#set gfxpayload=keep
set root=$root2
loopback loop $isofile
# linux (loop)/pmagic/bzImage iso_filename=$isofile edd=on vga=normal boot=live eject=no
linux (loop)/pmagic/bzImage iso_filename=$isofile eject=no load_ramdisk=1
initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m32.img
boot
}
fi
fi


#3 sara - pmedia

sara - pmedia

    Frequent Member

  • Lady
  • 184 posts
  • Location:tel aviv
  •  
    Israel

Posted 15 August 2019 - 09:36 PM

thank you ☺

With your advice I tried modify my menu 

 

for grub4dos i use this but i get "Mounting the fu.sqfs failed" erorr during boot  -   video 

 

iftitle [if exist /images/pmagic_2019_01_03.iso] Parted Magic (2019)\n Boot Parted Magic with Save Session option.
set ISO=/images/pmagic_2019_01_03.iso
set LIVE=boot=live
map --read-only %ISO% (0xff) || map --mem %ISO% (0xff)
map --hook
root (0xff)
set keymap=
# For 1GiB+ 64-bit systems use:
#kernel /pmagic/bzImage64 iso_filename=%ISO% eject=no edd=on vga=normal %keymap% %LIVE%
#initrd /pmagic/initrd64.img
 
kernel /pmagic/bzImage iso_filename=%ISO% eject=no edd=on vga=normal vmalloc=512MiB %keymap% %LIVE%
initrd /pmagic/initrd.img
boot
 

for UEFI i use this but i get  syntax error 

 

if [ -e "$iso_drive/images/pmagic_2019_01_03.iso" ]; then
menuentry "pmagic_2019_01_03.iso" {
  set iso_path=/images/pmagic_2019_01_03.iso
set isoname=pmagic_2019_01_03.iso ; CHECK_MNU_FOLDER
echo 'Loading Parted Magic 64 live ISO...'
#set gfxpayload=keep
set root=$root2
loopback loop $isofile
linux (loop)/pmagic/bzImage64 iso_filename=$isofile edd=on vga=normal eject=no load_ramdisk=1
initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m64.img
boot
}
fi


#4 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 16 August 2019 - 07:51 AM

compare my menu with yours! esp. the initrd line in the UEFI menu.

You should delete the CHECK_MNU_FOLDER and $root2 parts - they are probably not used in your menu system.



#5 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 16 August 2019 - 12:29 PM

@sara - pmedia

The grub4dos entrry is not providing the path to the second and third initrd images.

Since 2015 or 2016 (see the page by Steve):
https://www.rmprepus...partedmagiclive
partedmagic is using multiple initrd images.

:duff:
Wonko

#6 alacran

alacran

    Platinum Member

  • .script developer
  • 2710 posts
  •  
    Mexico

Posted 16 August 2019 - 09:14 PM

@sara - pmedia

 

For grub4dos menu (MBR boot) you may also use this (partnew) title (good for USB devices where fourth partition is not present)

iftitle [if exist (hd0,0)/Images/pmagic_2019_01_03.iso] Boot pmagic_2019_01_03.iso from ISO on (hd0,0)/Images
set ISO=Images/pmagic_2019_01_03.iso
parttype (hd0,3) | set check=
set check=%check:~-5,4%
if "%check%"=="0x00" partnew (hd0,3) 0 0 0
if not "%check%"=="0x00" echo WARNING: PTN TABLE 4 IS ALREADY IN USE! && pause && configfile /menu.lst
find --set-root /%ISO%
ls (hd0,0)/%ISO% && partnew (hd0,3) 0x00 /%ISO%
map (hd0,0)/%ISO% (0xff)
echo -e \r\n
map --hook
root (0xff)
chainloader (0xff)

Title from steve6375 tutorial 93

 

For additional info you may see this thread, it includes all references to partnew: http://reboot.pro/to...artnew-command/

 

 

1 - File to boot from, must be contiguous (not fragmented).

2 - Partnew is used mainly for Linux live Isos, but also WinPE Isos can be booted this way since I have already tested.

 

IMHO, this makes Parnew booting method the more versatile.

 

alacran



#7 RoyM

RoyM

    Frequent Member

  • .script developer
  • 420 posts
  • Interests:"Booting and Owning".
  •  
    United States

Posted 16 August 2019 - 11:37 PM

title  ------- Pmagic 2018 -----------------------
root
#
title Parted Magic Test, No *live* --> kernel vga=788 keymap=us
usb --init
map /pmagic/pmagic_2018_01_08.iso (hd32) || map --mem /pmagic/pmagic_2018_01_08.iso (hd32)
map --hook
root (hd32)
# *** NOT SURE I AM USING NOAPIC CORRECTLY, BEFORE OR AFTER INITRD.....***  [APIC,X86] Advanced Programmable Interrupt Controller
# noapic initrd=/pmagic/initrd root=/dev/ram0 init=/linuxrc ramdisk_size=200000 pmodules=/pmagic/pmodules squashfs=/pmagic/pmagic keymap=us livecd vga=791 quiet toram
# kernel /pmagic/bzImage keymap=us iso_location=/pmagic/ iso_filename=/pmagic/pmagic_2018_01_08.iso noapic load_ramdisk=1 prompt_ramdisk=0 rw vga=normal loglevel=9 max_loop=256 vmalloc=256MiB
# kernel /pmagic/bzImage keymap=us iso_location=/pmagic/ iso_filename=/pmagic/pmagic_2018_01_08.iso noapic load_ramdisk=1 prompt_ramdisk=0 rw vga=788 loglevel=9 max_loop=256 vmalloc=256MiB
kernel /pmagic/bzImage keymap=us iso_location=/pmagic/ iso_filename=/pmagic/pmagic_2018_01_08.iso load_ramdisk=1 prompt_ramdisk=0 rw vga=788 loglevel=9 max_loop=256 vmalloc=256MiB

# *** Notice next line ***

initrd /pmagic/initrd.img /pmagic/fu.img /pmagic/m32.img



#8 sara - pmedia

sara - pmedia

    Frequent Member

  • Lady
  • 184 posts
  • Location:tel aviv
  •  
    Israel

Posted 15 November 2019 - 11:56 AM

thank you! :rolleyes:

 

For MBR I finally succeeded with this code:
 
iftitle [if exist /images/pmagic_2019_01_03.iso] Parted Magic 2019
set ISO=/images/pmagic_2019_01_03.iso
set LIVE=boot=live
map --read-only %ISO% (0xff) || map --mem %ISO% (0xff)
map --hook
root (0xff)
set keymap=
# For 1GiB+ 64-bit systems use:
#kernel /pmagic/bzImage64 iso_filename=%ISO% eject=no edd=on vga=normal %keymap% %LIVE%
#initrd /pmagic/initrd64.img /pmagic/fu.img /pmagic/m64.img
kernel /pmagic/bzImage iso_filename=%ISO% eject=no edd=on vga=normal vmalloc=512MiB %keymap% %LIVE%
initrd /pmagic/initrd.img /pmagic/fu.img /pmagic/m32.img
boot
 
 
But for UEFI -  I can't find the right code
Can anyone convert for me?


#9 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 15 November 2019 - 12:09 PM

menuentry "pmagic_2019_01_03.iso" {
set iso_path=/images/pmagic_2019_01_03.iso
echo 'Loading Parted Magic 64 live ISO...'
loopback loop $iso_path
linux (loop)/pmagic/bzImage64 iso_filename=$iso_path edd=on vga=normal eject=no load_ramdisk=1
initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m64.img
boot
}

Does this work?



#10 sara - pmedia

sara - pmedia

    Frequent Member

  • Lady
  • 184 posts
  • Location:tel aviv
  •  
    Israel

Posted 15 November 2019 - 12:25 PM

menuentry "pmagic_2019_01_03.iso" {
set iso_path=/images/pmagic_2019_01_03.iso
echo 'Loading Parted Magic 64 live ISO...'
loopback loop $iso_path
linux (loop)/pmagic/bzImage64 iso_filename=$iso_path edd=on vga=normal eject=no load_ramdisk=1
initrd (loop)/pmagic/initrd.img (loop)/pmagic/fu.img (loop)/pmagic/m64.img
boot
}

Does this work?

 

 

 

Thank You Steve!!  :cheerleader:  :cheerleader:
You are a genius :smart:
you helped me alot!! :cheers:
 
 
1 more question
about my MBR code 
 
Instead of creating 2 separate titles (32/64 bit) 
Can g4d automatic detect bit mode ?
 


#11 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 15 November 2019 - 12:29 PM

Sure  use 'is64bit'

 

Its all on my site!

 

https://www.rmprepus...partedmagiclive



#12 sara - pmedia

sara - pmedia

    Frequent Member

  • Lady
  • 184 posts
  • Location:tel aviv
  •  
    Israel

Posted 15 November 2019 - 12:43 PM

I understood
Thanks again so much :jump:





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users