Help - Search - Members - Calendar
Full Version: Making a new Plugin
UBCD4Win Forums > Main Forum: UBCD4Windows - Support > Suggestions & Requests
Deamon_Knight
I'm trying to create a new multiboot plugin for Parted Magic.

http://partedmagic.com

The latest version is 3.0 and has changed pretty significantly, but is pretty useful and featured for 45MB. I'm basing my idea here off the Plugin PCuser created for UBCD4win (Thanks Again!), however I have discovered I have less idea of how UBCD4win plugins work than I though.

PCcusers old plugin:

CODE

; Created by pcuser

[Version]
Signature= "$Windows NT$"

[PEBuilder]
Name="!Multiboot: Parted Magic (1.8.7) <Press CONFIG>"
Enable=0
config=CONFIG_PMAGIC.cmd

[WinntDirectories]
a="isolinux",2
b="BCDW",2

[SourceDisksFiles]
files\isolinux\initrd.gz=a,pmagic.gz,1
files\isolinux\bzImage=a,pmagic,1
files\isolinux\isolinux.bin=a,,1
pmagic.ini=b,,1
files\PMAGIC=30000,pmagic,1

[Append]
BCDW\BCDW.INI,pmagic_bcdw.ini


I guess I'm hung up on exactly what:

[WinntDirectories]
a="isolinux",2
b="BCDW",2

[SourceDisksFiles]
files\isolinux\initrd.gz=a,pmagic.gz,1
files\isolinux\bzImage=a,pmagic,1
files\isolinux\isolinux.bin=a,,1
pmagic.ini=b,,1
files\PMAGIC=30000,pmagic,1


is doing.

I take it that we are renaming the Kernel "bzImage" to "pmagic" and moving it to the isolinux directory, and doing the same thing with the ramdisk "initrd.gz" , but I'm not sure what is being done with pmagic.ini or "files\PMAGIC=3000" as that doesn't appear to be a file. I also don't understand what , for example "a,,1" means at the end of these lines.

My guess is that, as above the ramdisk & kernel are moved so to the isolinux directory, but how do I move the rest of the files to somewhere that the ramdisk and kernel will know what to do with them?

Thanks in advance!
pcuser
The entire plugin protocol is explained HERE

QUOTE
I take it that we are renaming the Kernel "bzImage" to "pmagic" and moving it to the isolinux directory, and doing the same thing with the ramdisk "initrd.gz"


Yes, you're right on the money wink.gif

QUOTE
but I'm not sure what is being done with pmagic.ini or "files\PMAGIC=3000" as that doesn't appear to be a file.


PMAGIC is a directory found in the root of the cd, 30000 (not 3000) is a directive telling the builder to place it in the root of the output folder.

QUOTE
I also don't understand what , for example "a,,1" means at the end of these lines.


files\isolinux\isolinux.bin=a,,1

is the same as:

files\isolinux\isolinux.bin=a,isolinux.bin,1

It copies isolinux.bin to the isolinux directory (which is found at the root of the cd as defined by a="isolinux",2). and the ,1 tells the builder that this file is required.
Deamon_Knight
I thought I had it but now I'm stuck. I get the Parted magic program to load but end up at bash console rather than a gui.

Here is my pmagic.inf

CODE
; Created by jay

[Version]
Signature= "$Windows NT$"

[PEBuilder]
Name="!Multiboot: Parted Magic (3.0) <Press CONFIG>"
Enable=1
config=CONFIG_PMAGIC.cmd

[WinntDirectories]
a="isolinux",2
b="BCDW",2
c="pmodules",3
d="pmodules\scripts",3

[SourceDisksFiles]
files\bzImage=a,pmagic,1
files\initrd=a,pmagicrd,1
files\isolinux.bin=a,,1
pmagic.ini=b,,1
files\pmodules\pmagic.7z=c,,1

[Append]
BCDW\BCDW.INI,pmagic_bcdw.ini


My Pmagic.ini (formatting exempted)

CODE
[MenuItems]
:Return ; <Return to boot menu>
/isolinux/isolinux.bin ; Normal ; Boot Parted Magic using the default settings, Loads to RAM ;

pmagic noapic initrd=pmagicrd root=/dev/ram0 init=/linuxrc keymap=us livecd vga=791 sleep=0 quiet

ramdisk_size=25000

;/isolinux/isolinux.bin ; skip-toram ; Run from RAM ; pmagic noapic initrd=pmagic.gz root=/dev/ram0

init=/linuxrc ramdisk_size=100000 skip toram
;/isolinux/isolinux.bin ; skip-xvesa-toram ; Run from RAM and use Xvesa ; pmagic noapic

initrd=pmagic.gz root=/dev/ram0 init=/linuxrc ramdisk_size=100000 skip xvesa toram
;/isolinux/isolinux.bin ; skip-xvesa ; Use Xvesa ; pmagic noapic initrd=pmagic.gz root=/dev/ram0

init=/linuxrc ramdisk_size=100000 skip xvesa
;/isolinux/isolinux.bin ; lowmem ; Select for computers with less than 128 MB of RAM ; pmagic

noapic initrd=pmagic.gz root=/dev/ram0 init=/linuxrc ramdisk_size=16384


and my pmagic_bcdw.ini

CODE
;\BCDW\pmagic.ini ;Parted Magic - SubMenu ; ^ Parted Magic


Any Suggestions?
cdob
Patrick added ISO file support at SamK's request, thanks.
Parted Magic kernel mount ISO file at boot now.
http://partedmagic.com/phpBB3/viewtopic.php?f=11&t=151
http://www.boot-land.net/forums/index.php?...ost&p=38026


PartedMagic.inf
CODE
; PartedMagic.inf
; PE Builder v3 Plug-in INF for PartedMagic 3.0

[Version]
Signature= "$Windows NT$"

[PEBuilder]
Name="!Multiboot: PartedMagic 3.0"
Enable=1

[WinntDirectories]
a="pmagic",2

[SourceDisksFiles]
files\pmagic-3*.iso=a,pmagic-svn.iso,1
files\grldr=30000,,1
files\menu.lst=30000,,1

[Append]
BCDW\BCDW.INI,partedmagic_bcdw.ini


partedmagic_bcdw.ini
CODE
grldr; grldr PartedMagic; ^ An Open Source Partitioning Program;
Add a empty line.

files\menu.lst
CODE
color black/cyan yellow/cyan
timeout 0

title Start PMagic
find --set-root /pmagic/pmagic-svn.iso
map /pmagic/pmagic-svn.iso (hd32)
map --hook
root (hd32)
configfile (hd32)/grub4dos.lst
Deamon_Knight
Well, I think I know what the problem on my end is but I don't know how to solve it.

It looks like Pmagic.7z is being copied to root rather than to /pmodules/

I just don't know why this would be. I'm also not sure, but I thought there were problems including multiple linux builds in ISO format on one Multiboot cd, so I'm not sure if the ISO solution helps us.
Deamon_Knight
Nope, I've just been starting at this too long. pmagic.7z is in /pmodules/, but I'm still ending up at the command line.
pcuser
QUOTE
Well, I think I know what the problem on my end is but I don't know how to solve it.

The problem is that you're using a plugin for the wrong version. I rebuild the pmagic.inf file in each new version so it matches the current file/folder structure and then change pmagic.ini to match the current syslinux.cfg file.

QUOTE
Patrick added ISO file support at SamK's request, thanks.
Parted Magic kernel mount ISO file at boot now.

YES, YES, YES!!! I hope it helps to get the snowball rolling!

One of my first linux based multiboot plugins (KNOPPIX?) used this method (I modified initrd so it would find the iso and mount it as a loop device then continue booting from there) and I've been hoping for it to catch on ever since. I think multibooting this way is by far the best way to go.

I wish ALL linux distros would take the initiative to do this and make it a standard.


QUOTE
I just don't know why this would be. I'm also not sure, but I thought there were problems including multiple linux builds in ISO format on one Multiboot cd, so I'm not sure if the ISO solution helps us.


I would question your information source and ask them how it failed.
Deamon_Knight
PCuser, I though that, say, including an ISO of Ubuntu and an ISO of Pmagic and using BCDW to load them would not work. I'm more than willing to admit I could be wrong because I'm lost at this point. I thought I was rebuilding the pmagic.inf and pmagic.ini ! mellow.gif. Looks like the solution is use cdob's suggestion, use BCDW to load the pmagic ISO and then Grub4dos takes over?
pcuser
QUOTE
PCuser, I though that, say, including an ISO of Ubuntu and an ISO of Pmagic and using BCDW to load them would not work

Usually it doesn't work but the author of PMagic added support for booting it this way.
Deamon_Knight
Cool, thanks guys, I'll do it that way then. Can I ask though, shouldn't it be possible to load Parted Magic with isolinux? Iso/syslinux is part of the Parted Magic ISO, I'm really not sure where I went wrong trying to make this plugin.
Deamon_Knight
Finally got it working. With some help from Patrick on his forum I found I had screwed the directories up.

Here it is, For Those who are intrested

Pmagic.inf
CODE

; Created by jay

[Version]
Signature= "$Windows NT$"

[PEBuilder]
Name="!Multiboot: Parted Magic (3.0) <Press CONFIG>"
Enable=1

[WinntDirectories]
a="isolinux",2
b="BCDW",2
c="modules\pmagic\pmodules",3
d="modules\pmagic\pmodules\scripts",3

[SourceDisksFiles]
files\bzImage=a,pmagic,1
files\initrd=a,pmagicrd,1
files\isolinux.bin=a,,1
pmagic.ini=b,,1
files\pmodules\pmagic.7z=c,,1

[Append]
BCDW\BCDW.INI,pmagic_bcdw.ini


pmagic.ini (formatting exempted)
CODE
[MenuItems]
:Return ; <Return to boot menu>
/isolinux/isolinux.bin ; Normal ; Boot Parted Magic using the default settings, Loads to RAM ; pmagic noapic initrd=pmagicrd root=/dev/ram0 init=/linuxrc keymap=us livecd vga=791 sleep=0 quiet ramdisk_size=25000 directory=/modules

/isolinux/isolinux.bin ; Alternate Grahpics ; Use Xvesa, try if XORG fails ; pmagic noapic initrd=pmagicrd root=/dev/ram0 init=/linuxrc keymap=us livecd vga=791 sleep=0 quiet xvesa ramdisk_size=25000 directory=/modules

/isolinux/isolinux.bin ; Safe Graphics ; Safe Graphics mode if all else fails ; pmagic noapic initrd=pmagicrd root=/dev/ram0 init=/linuxrc keymap=us livecd vga=normal sleep=0 quiet ramdisk_size=25000 directory=/modules


CODE
;\BCDW\pmagic.ini ;Parted Magic - SubMenu ; ^ Parted Magic


Thanks!
pcuser
Thanks for sharing your successfull results with us and I'm glad to see that you got it working. Have you tried the new iso boot method yet?
Deamon_Knight
I haven't yet tried the ISO solution, I've been rechecking my plugin. It works now but I think I have a typo in my menus. Any idea how to tell if one Linux distro or another will boot with the ISO method?
cdob
QUOTE (Deamon_Knight @ Aug 18 2008, 10:48 PM) *
Any idea how to tell if one Linux distro or another will boot with the ISO method?

Currently none Linux distro support ISO file boot method. Ask the distributor for support.
Parted Magic 3.0 is the only exeption so far.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.