AMD64 fix

If you want to contribute to Partimage, please post there

Moderator: feffer

Post Reply
MacLeod
Posts: 2
Joined: Tue Sep 04, 2007 1:30 pm

AMD64 fix

Post by MacLeod » Tue Sep 04, 2007 8:10 pm

Hi,

I fixed the current 0.6.6 distribution of partimage for compilation on AMD64 (aka x86_64). The following patch fixes:
  • the DWORD and QWORD typedef to the C99 types (uint{32,64}_t)
  • the printf format strings for [DQ]WORD with the C99 portability macros (PRIx64)
  • the direct dump of struct tm to disk by using fixed size members and an alias structure
  • one sizeof(DWORD)=sizeof(void*) assumption
  • and finally the infamous "compiler compatibility" warning (4!=8)
During the compilation on newer (and 64bit) gcc I spotted some minor warnings and fixed those here

The patched version compiles well both on 32 and 64bit machines (x86 little endian for now...). I didn't gave it much testing, but except of the timestamps and the final CRC the image file created with the 32bit version was the same (cmp -l) as the one from the 64bit version. A restore also went well (ext3 10GB partition with 1.5 GB used). If you have a test suite I could give it a more elaborate testing.
Please give it a try, feedback appreciated.

Regards,
Andre.

fdupoux
Site Admin
Posts: 26
Joined: Sat Feb 21, 2004 12:12 pm

Post by fdupoux » Fri Sep 07, 2007 5:35 pm

Thanks for your patch. I would be glad to merge it to partimage-0.6.7 but first I must be sure it does not introduce bugs.

It's possible to have a program at runtime with a program that compile with no problem. We need to be sure an image made with an x86 machine will be restored successfully on x64 and the files are the same on the filesystem. Since there are different size for integer types on different architectures, there could be this kind of problem.

Unfortunately I have no amd64 machine to test it. If several users can test this patch and confirm a filesystem saved on x86 can be restored successfully on x64, and the file contents are the same (md5) then this patch can be merged in a future revision. And we must also test the other way: an image saved on x64 must restore successfully on x86.

fdupoux
Site Admin
Posts: 26
Joined: Sat Feb 21, 2004 12:12 pm

Post by fdupoux » Sun Sep 16, 2007 7:40 pm

I just released partimage-0.6.7_beta1 with this amd64 fix merged:
http://sourceforge.net/project/showfile ... ge_id=6269

superwopguy
Posts: 2
Joined: Fri Feb 15, 2008 2:04 pm

Post by superwopguy » Fri Feb 15, 2008 2:12 pm

Can someone please provide the binary version for a x86_64 version of partimage.

I love partimage. I only want to use partimage, but now I find myself searching for other solutions.

I have to keep constant backup of a centOS 5.1 x86_64 server. I cannot reboot this server and load up system rescue CD everytime i need to back it up. Therefore I need a working copy of partimage on the operating system.

Please tell me exactly how i can do this myself if it is not already done.

Thanks,
Vince

Post Reply