Contributions Thread

Installation issues, feature requests, help, etc.

Moderators: Curtis8, A_Null

Posts: 3
Joined: Thu Jan 20, 2011 4:43 pm

Extended Partitions

Postby rbcf_ping » Tue Jan 25, 2011 5:45 am

Does anyone know if the code below using sfdisk to deal with extended partitions and associated partition table was ever incorporated into PING? Or, was some other method of dealing with extended partions implemented?

[quote][by DevX » Fri Apr 25, 2008 8:34 am

I've been working with ping for a while, and i'm trying to automate the process and make it so it writes directly to a DVD. Once i get that completed or to a working stage I will share my findings. For the time being i wanted to share something.

When i was working with ping and trying to back up to a samba share i wouldn't be able to create a new image because simple the options was not there. Here is the patch diff.

Code: Select all

-- 2008-04-25 09:22:08.000000000 -0400
+++ 2008-04-25 09:21:58.000000000 -0400
@@ -2215,7 +2215,9 @@
# able to create a new image etc. So, let's add the special directories
# if he has forgotten to create them.
-if($SRC =~/dos/)
+# Also give the user the option to create a new image on SMBFS share
+if($SRC =~/smbfs/ || $SRC =~/dos/)
foreach my $S ("Blank_Local_Admin_Passwd", "Create_New_Image")

Also another issue i encounter was dealing with extended partitions. I manage to get arround that by adding something like the following to export the extended partition table information. The following code is not tested thoroughly.

Code: Select all
LOG(" * Backuping extended Partition table [/dev/$P]\n");
if(! -e "$SRC/$New_Image/$HDD.sf")
my $cmd = "sfdisk -d /dev/$HDD > $SRC/$New_Image/$HDD.sf";
LOG(" Cmd: [$cmd]\n");
my $out = `$cmd`;
LOG(" Out: [$out]\n");


Due to lack of time i had to implement an ugly hack to have this work for me.

Code: Select all

LOG(" * Restore Extended Partitions [/dev/$F]\n");
my $cmd = "sfdisk /dev/$F < $FF.sf";
LOG(" Cmd: [$cmd]\n");
my $out = `$cmd`;
LOG(" Out: [$out]\n");

I hope this is helpfull to someone, any feedback or questions are appreciated./quote]

Posts: 1
Joined: Tue Mar 29, 2011 7:49 am
Location: FL

Re: Contributions Thread

Postby rmorrison100 » Tue Mar 29, 2011 7:52 am

Thanks. It really helps a lot a beginner like me.

Return to “PING / General Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest