• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Successfully booting Parted Magic

    Scheduled Pinned Locked Moved
    Tutorials
    2
    2
    1.9k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      renewedharry
      last edited by renewedharry

      I’ve decided to write a guide on how to PXE boot Parted Magic, I read through the existing FOG Wiki entry on parted magic, this unfortunately doesn’t seem to work on the later versions. I am using the ISO from May 2023, on Fog 1.5.10.

      Firstly create a directory to hold your extracted parted magic ISO

      mkdir /extractediso
      

      If you are customising your Parted Magic with a save state, you can instead just create a bootable Parted Magic USB using Rufus, boot to it and customise as you wish, then click the power button and choose “Save Session”. You can then plug that USB into your FOG server and copy the files without extracting, e.g

      cp /run/media/user/PM_2023_05_21/* /extractediso
      

      Now create the directory to boot from

      mkdir /var/www/html/pmagic
      

      Now, in any old guide that I find online it then recommends running a .pm2pxe.sh script to generate files.cgz and then copying that, and the other necessary files to the recently created pmagic directory, however I found that this would not work, during the boot process Parted Magic would be unable to find pmagic_2023_05_21.sqfs so instead I skipped this step and just copied the directory like so;

      cp /extractediso/pmagic/* /var/www/html/pmagic
      

      Doing this also copies over your saved session, if you ever need to change this, just create another save session through a USB and then replace the .sqfm file in /var/www/html/pmagic/pmodules with a new one.

      Now you need to simply create an iPXE Menu Item in the Fog Web Server -> Fog Configuration -> New iPXE Menu Item. These are the parameters I used to get it working after reading through partedmagic.com/pxe/

      kernel http://${fog-ip}/pmagic/bzImage
      initrd http://${fog-ip}/pmagic/initrd.img
      initrd http://${fog-ip}/pmagic/fu.img
      initrd http://${fog-ip}/pmagic/m.img
      imgargs bzImage ip=dhcp edd=on netsrc=wget neturl="http://${fog-ip}/pmagic/pmodules" netargs="-U pmagicboot" noapci load_ramdisk=1 prompt_ramdisk=0 rw vga=normal sleep=0 loglevel=0 keymap=us splash quiet - || read void
      boot || read void
      

      I’m sure some of these parameters are not relevant as I don’t really know what I’m doing, but it now finally works! This takes about 3 and a half minutes to boot to load up to the parted magic desktop so if anyone has any ideas to speed that up I’d be happy to hear them. Anyway, I hope this helps someone as this took a lot of trial and error for me to get going.

      george1421G 1 Reply Last reply Reply Quote 1
      • R renewedharry referenced this topic on
      • george1421G george1421 referenced this topic on
      • george1421G
        george1421 Moderator @renewedharry
        last edited by

        @renewedharry

        I’m sure some of these parameters are not relevant as I don’t really know what I’m doing,

        It looks like you are doing very well.

        I can add a little context as in the kernel parameter loads the linux kernel. The initrd commands load these image files onto a virtual hard drive created by iPXE so the kernel can locate them. The .img files would actually be mapped as hard drives to the kernel. The kernel would know how to connect to them and use them.

        As for the imgargs these are flags for the kernel as it boots. The different flags tell the startup scripts in the kernel how to react dynamically to the external environment. The alternative would be to build the flags into the kernel, but then you would need to recompile the kernel every time you wanted to make a change. Hint: kernel args are the way to go.

        I don’t see much room for improvements with this design. You are currently using http to transfer the boot files. Once the kernel starts up then iPXE is out of the picture. I’m going to suspect most of the slowness is because most of the files are the pmodules directory. iPXE should load bzImage, initrd.img, fu.img and m.img very quickly. Where most of your time is probably once bzImage starts to boot. Then you are at the mercy of what Parted Magic does.

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post

        183

        Online

        12.0k

        Users

        17.3k

        Topics

        155.2k

        Posts
        Copyright © 2012-2024 FOG Project