Partimage aborts
-
I’m having a new problem when trying to download an image to a host. Something is causing partimage to fail so the image never gets installed. The error message flashes by so fast it’s hard to stop, but I managed after several tries to <ctrl-s> the message. Then if found the fog download debug. Here is what is being reported.
[CODE]
Please wait… /usr/share/fog/lib/funcs.sh: line 22:
2326 Segmentation fault
2221 Aborted
partimage restore $2 $1 -f3 -b 2>/tmp/status.log- Performing Clean up (Stage 1) … Done
- Performing Clean up (Stage 2) … Done
- Backing up an replacing BCD … mv cannot stat
‘bcdstore/boot/BCD’: No such file or directory
cp: cannot create regular file ‘/bcdstore/boot/BCD’:
no such file or directory
Done - Changing hostname … Done
- Updating Computer Database Status
- Database Updated
- Task is completed, computer will now restart.
[/CODE]
I’m at a loss as to what the problem is… I’ll have more info later, but as best as I can tell it looks like partimage is doing a segmentation fault.
partimage-debug-log has this:
[CODE]
Main] main.cpp->main#392: /var/log/partimage-debug.log: Partition Image version 0.6.9 (DebugLevel 1 used, MainThread=2320)
[Main] main.cpp->main#394: =======================================================================================[Main] main.cpp->main#397: ==== Partition Image: compilation options used ====
-
Version is 0.6.9 [gcc 4.7.3].
-
Supported file systems:
- ext2fs,ext3fs,reiserfs-3.5,reiserfs-3.6,reiserfs,fat,fat16,fat32,ntfs,hpfs,xfs,jfs,hfs,ufs,raw
- Ext2fs support: internal code
-
Debug options:
- PARTIMAGE_LOG=/var/log/partimage-debug.log
- PARTIMAGED_LOG=/var/log/partimaged.log
- DEVEL DISABLED
- DEFAULT_DEBUG_LEVEL=1
-
Other options:
- CURRENT_IMAGE_FORMAT=0.6.1 (version of the image file format)
- PACKAGE_NETPROTOVER=PiMgNet001 (version of the network protocol)
- USERS MUST LOGIN
- PARTIMAGED_USERS=/etc/partimaged/partimagedusers
- SSL ENABLED
- CHEUID ENABLED
[Main] main.cpp->main#479: ENDIANESS=ENDIAN_LITTLE
[Main] main.cpp->main#634: action=RESTORE
[Main] imagefile.cpp->openReading#999: begin (/images/WIN764BITGEN/sys.img.000)
[Main] imagefile.cpp->openReading#1046: LEVEL [/images/WIN764BITGEN/sys.img.000]=-1
[Main] image_disk.cpp->openReading#385: ALREADY=0
[Main] image_disk.cpp->openReading#397: openReading[/images/WIN764BITGEN/sys.img.000]
[Main] image_disk.cpp->openReading#412: preopen successfull for /images/WIN764BITGEN/sys.img.000
[Main] image_disk.cpp->openReading#437: open
[Main] image_disk.cpp->openReading#438: file /images/WIN764BITGEN/sys.img.000 opened ok
[Main] imagefile.cpp->openReading#1086: PTHREAD_CREATE before
[Main] imagefile.cpp->openReading#1088: PTHREAD_CREATE after
[Main] imagefile.cpp->openReading#1116: THROW: -42
[Main] exceptions.cpp->CExceptions#88: openReading -> throws: -42
[Main] image_disk.cpp->close#274: close -> 0
[Main] image_disk.cpp->destroySpaceFile#454: DESTROY SPACE FILE []
[Main] image_disk.cpp->read#254: cid: 14336 ; m_qwTotal = 14336
[Main] image_disk.cpp->~CImageDisk#80: total written: 14336
[Main] image_disk.cpp->read#254: cid: 14336 ; m_qwTotal = 28672
[/CODE]ntfs-mount-output has this:
[CODE]
NTFS signature is missing.
Failed to mount ‘/dev/sda2’: Invalid argument
The device ‘/dev/sda2’ doesn’t seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
[/CODE]
fdisk-before:
[CODE]
Disk /dev/sda: 80.0 GB, 80026361856 bytes, 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x86308630
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 154738687 77265920 7 HPFS/NTFS/exFAT
[/CODE]
fdisk-after:
[CODE]
Disk /dev/sda: 80.0 GB, 80026361856 bytes, 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x86308630
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 154738687 77265920 7 HPFS/NTFS/exFAT
[/CODE]Just an addon note: I see if I manually run partimage under download-debug and select the image files for restore, and restore partition with image, partimage gives an error window that says:
INVALID COMPRESSION LEVEL FOR /images/WIN764BITGEN/sys.img.0000. <CANCEL>
Same with rec.img.0000 when trying to restore /dev/sda1 -
The image you’re seeing was it uploaded with 0.33 or 0.32? My guess is your 0.33 images got relabeled as “legacy” during an update. You can change the type yourself, but you need to enable something on the FOG Settings.
Go to FOG Configuration->FOG Settings->FOG_LEGACY_FLAG_IN_GUI and click the checkbox
Then go to the images and change it from partimage to partclone.
-
Hi Tom,
That would make sense that the images where relabeled during an svn update. I’m using 0.33b and update frequently. It started doing this a couple of days ago after one of the updates. I was able to force it to use partclone but I’m not sure what you mean “Then go to the images and change it from partimage to partclone.” Is there a way to convert and image from partclone to partimage format?
It looks like I just need to retake the image snapshot for the partimage to work.
One other small bug I caught that should be easy to fix. In my httpd logs error_log files, I’m seeing hundreds of entries that say;
[CODE]
[Tue Apr 01 17:23:35.795157 2014] [:error] [pid 6749] [client 192.168.1.20:57168] PHP Warning: date(): It is not safe to rely on
the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. I
n case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. W
e selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/fog/service/auto.reg
ister.php on line 58
[/CODE]This error/php warning is repeated over and over for several php code segments. I just add
date_default_timezone_set(“UTC”);
into /var/www/html/fog/commons/system.php or packages/web/commons/system.php in the svn source tree.
That keeps the log files nice and clean for meaningful errors. Here is the patch;[CODE]
— …/freeghost-code-svn/packages/web/commons/system.php 2014-03-31 16:45:40.003762314 -0400
+++ packages/web/commons/system.php 2014-04-02 16:00:12.994984922 -0400
@@ -16,6 +16,9 @@
define(‘PHP_COMPATIBLE’, version_compare(PHP_VERSION, PHP_VERSION_REQUIRED, ‘>=’));
define(‘BASEPATH’, DetermineBasePath());
define(‘SPACE_DEFAULT_STORAGE’, ‘/images’);
+// Set a default timezone for date functions.
+date_default_timezone_set(“UTC”);
+
// PHP: Version check
if (PHP_COMPATIBLE === false)
{
[/CODE]Thanks for your help Tom.
Best regards,
Chuck -
Tom is talking about the “Image Manager” field that shows up under an image definition after setting FOG_LEGACY_FLAG_IN_GUI to “1” or “checked”
-
[quote=“Chuck Sites, post: 24930, member: 22709”]Hi Tom,
That would make sense that the images where relabeled during an svn update. I’m using 0.33b and update frequently. It started doing this a couple of days ago after one of the updates. I was able to force it to use partclone but I’m not sure what you mean “Then go to the images and change it from partimage to partclone.” Is there a way to convert and image from partclone to partimage format?
It looks like I just need to retake the image snapshot for the partimage to work.[/quote]
That method would work (retaking the image), however what I’m referring to is just as BPSTravis stated. Because of the switch from Partimage, to Partclone, Chuck added a seamless (sort of) route to allow upgrading from 0.32 to 0.33 that still enabled the imaging of partimage images. Originally there was no way to change this especially for those of us who were already using 0.33 before this got implemented.
In the FOG GUI, under FOG Configuration->FOG Settings, there’s an option to allow us, the users, to set what type of image format an image is in. That’s set by “FOG_LEGACY_FLAG_IN_GUI” as either on, or off. It’s defaulted to be turned off and you won’t be able to (from the GUI) change what type of image it currently is. This flag just gives an additional option on the GUI that allows us to select what type of image it currently is.
[quote=“Chuck Sites, post: 24930, member: 22709”]—
One other small bug I caught that should be easy to fix. In my httpd logs error_log files, I’m seeing hundreds of entries that say;
[CODE]
[Tue Apr 01 17:23:35.795157 2014] [:error] [pid 6749] [client 192.168.1.20:57168] PHP Warning: date(): It is not safe to rely on
the system’s timezone settings. You are required to use the date.timezone setting or the date_default_timezone_set() function. I
n case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. W
e selected the timezone ‘UTC’ for now, but please set date.timezone to select your timezone. in /var/www/html/fog/service/auto.reg
ister.php on line 58
[/CODE]This error/php warning is repeated over and over for several php code segments. I just add
date_default_timezone_set(“UTC”);
into /var/www/html/fog/commons/system.php or packages/web/commons/system.php in the svn source tree.
That keeps the log files nice and clean for meaningful errors. Here is the patch;[CODE]
— …/freeghost-code-svn/packages/web/commons/system.php 2014-03-31 16:45:40.003762314 -0400
+++ packages/web/commons/system.php 2014-04-02 16:00:12.994984922 -0400
@@ -16,6 +16,9 @@
define(‘PHP_COMPATIBLE’, version_compare(PHP_VERSION, PHP_VERSION_REQUIRED, ‘>=’));
define(‘BASEPATH’, DetermineBasePath());
define(‘SPACE_DEFAULT_STORAGE’, ‘/images’);
+// Set a default timezone for date functions.
+date_default_timezone_set(“UTC”);
+
// PHP: Version check
if (PHP_COMPATIBLE === false)
{
[/CODE]Thanks for your help Tom.
Best regards,
Chuck[/quote]
r1418 released to fix the date.timezone thing. Only variant that I performed is to check whether this setting is already set or not. If it’s not set, then it sets the timezone to UTC, if it is set, it uses that value. Hope that helps. -
Cool. FOG_LEGACY_FLAG_IN_GUI worked very nicely. It’s a good option to have. Thanks Tom.