I’m a convinced user of Parted Magic, but now i wanted to use it on my GRUB PXE server.
Unfortunately it’s being really slow, because of lack of nfs support.
So i was searching for a solution and got the following idea.
I was able to boot Parted Magic using PXE but unfortunately it was really really slow, because the files are transfered by the TFTP protocoll only which is the slowest of all available options.
Why is there no nfs support and what it’s the cause?
The drivers which are necessary to boot a system are included in the initial ramdisk file, usually just called initrd.
In case of Parted Magic the drivers which are needed for a boot from a nfs root, or fetching a squashfs file, are not included.
So there is no easy way to get rid of it. Take care! Only for advanced users who know what they are doing.
Get NFS support for Parted Magic PXE
I have chosen the easy way, to get the Kernel file of an system which already supports NFS boot.
So Clonezilla was my option. It offers NFS root support as well as networking to fetch squashfs files by using http.
My first try was to replace the bzImage64 file from Parted Magic by the vmlinuz Kernel image of Clonezilla.
This didn’t work well, because of following problem.
Inside of the init file the Parted Magic initrd uses a different way to deal with paths. In this case it looks like this.
But in case of Clonezilla they look like that.
So there’s a difference. But now after all it works like i wanted it to work.
How to get rid of this Problem?
Get The newest Clonezilla image from https://clonezilla.org/downloads.php
After having downloaded the iso (!) file mount it on /mnt using
Unpack the initrd file into a new working directory.
First, create a temporary work directory and switch into it. This will be the location where the initramfs/initrd contents will be viewed, edited, and re-compressed if required.
First we need to check out which kind of compression our initrd file uses.
So we use:
- In case of a gzip file we switch into the newly working directory and use
- However, if the file is using xz compression you have to use this command.
To uncompress the initrd file.
Now we only care about the init file, let’s open it.
The first line is important, the part dealing with the paths.
That’s the way how Clonezilla deals with paths, but we need to know how Parted Magic does.
So we need to do the same for the Parted Magic ISO file.
First we have to unmount the current Clonezilla ISO using
We’ll mount our Parted Magic ISO using the same way like we did before.
We’ll create another working directory for our Parted Magic initial ramdisk file.
Let’s switch into the newly created directory using cd (i won’t mention this simple command here.)
So now we want to uncompress the Parted Magic initrd file as well, it’s called initrd.img as well.
To check out which command to use, to uncompress the file, check out our previous steps.
In this case we should have a gzip compressed initrd file, so we use:
Here we check out our init file as well, also the first line like we did before.
Now you should notice some difference, it should look like that.
So what now? We will just take this like and replace it by the old one in the Clonezilla init file.
After having done this part just save the Clonezilla init file.
Now we have to compress our newly created initrd file.
Just switch into the initrdclonezilla working directory and perform this command.
Now we have got a new initrd deploying NFS root support.
So in case of our PXE Parted Magic directory we replace the existing bzImage64 file by vmlinuz file from Clonezilla.
And also our initrd.img file from Parted Magic will be replaced with our newly created new.img initrd file. But don’t forget to rename it to initrd.img.
Because of the difference of Clonezilla how to deal with squashfs files, we need to copy the SQFS file from our currently mounted Parted Magic ISO.
We need to create a directory called live inside of our Parted Magic PXE directory.
Now we copy the SQFS file into this directory doing:
Note: You may have to adjust the paths in your case. Common sense is necessary!
Now your grub.cfg or default file (in case of pxelinux) may look like this.
That’s just all you have to do to get Parted Magic booting properly on PXE systems.