Jump to content
OMRON Forums

Backing up and/or cloning filesystem


KEJR

Recommended Posts

Hello, I know that there are many programs that can create an image of the linux filesystem, and we are thinking of using that methodology for cloning Power PMAC CPU cards to some set standard when they come in from shipping. This would include a handful of software packages we install, modification to some init scripts, etc. This image might also be updated over the years as new linux programs are added, etc. Is this a valid approach? Should we include a backup/cloning of the boot block of NAND flash that contains the linux kernel? Alternatively does Delta Tau provide a backup/resore of the entire filesystem, including PMAC and linux software (including user changes to scripts, installed debian packages, etc). My concern is dealing with how a multitude of different machines will be administered over the years and how we will deal with complete system backups (including Non PMAC related stuff). If we could take a spare PPMAC cpu, image it with our customizations, and upload the machine specific files we would be happy in the event of a CPU problem. Thank you, KEJR
Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Backing up or cloning the system is a valid approach. This is actually how we restore the disk before shipping the product. This will be a feature in a future IDE release but at the moment you must do it by hand. To backup your system to an sd card you would do something like the following: tar cfz /media/disk/disk.tar.gz --exclude=/media/disk/disk.tar.gz / /.readonly An important note on the kernel. The linux kernel is actually not loaded from the disk. It is stored in the NOR flash that is soldered on to the PowerPMAC CPU along with the bootloader. The kernel can be backed up with the command: cp /dev/mtd0 MyKernelBackup and restored with the command: flashcp -v MyKernelBackup /dev/mtd0. You can see how our NOR flash is configured with the command: cat /proc/mtd
Link to comment
Share on other sites

Thank you, Backing it up and/or cloning with Tar will suffice for now. In the future it will be great to point the IDE to an archive file and have it do a full filesystem restore. One thing that is essential for us is that the kernel and Debian system can be held static for a decent period of time. That is to say that we wouldn't want to upgrade our software every time a library changes for some minor feature we wouldn't use. I would imagine that at some point in time Delta Tau will upgrade to a future version of Debian, but it would be nice to keep our installations the same until some point of our choosing (within reason). So it sounds like by using the above approach, (or the IDE in the future) we can maintain our installations on a version that we decide and manage updates on our machines when we choose. If so, this is great. Thanks again, KEJR
Link to comment
Share on other sites

  • 11 months later...
Guest DavisG
If you need to image your ppmac drive: 1) Go to: http://www.winimage.com/download.htm and download the correct version of the program (30 day trial) 2) Pull ppmac out of the rack and pull the mezzanine board off of the ppmac 3) Connect to the micro usb on the mezzanine board 4) Wait for the drive to appear in My Computer, and note which drive it is (in my case it was drive E:) 5) Make sure that you can read the ppmac drive first with explorer and open WinImage 6) Go to the Disk menu item and choose the drive letter which was added (in my case E:) 7) Go to the Disk menu item and pick Creating a Virtual Hard Disk image from physical drive 8) Check the Include non removable hard disks box and the Create Fixed Size Virtual Hard Disk radio button 9) Pick the disk which matches your ppmac memory size (~1 GB on mine (988,xxx KB)) and click the OK button 10) Pick the directory on your pc hard drive and name the file and click the OK button 11) When finished you can choose the partition to view. To restore: Note that most mezzanine cards have a write protect switch which by default is set to protect (switch toward the nearest edge). To restore you need to unprotect the system by setting the switch into the other position then connecting the USB cable. 1) if not already done download WinImage 2) Pull ppmac out of the rack and pull the mezzanine board off of the ppmac 3) Connect to the micro usb on the mezzanine board 4) Wait for the drive to appear in My Computer, and note which drive it is (in my case it was drive E:) 5) Make sure that you can read the ppmac drive first with explorer and open WinImage (if already open got to the File menu item and choose New - choose the standard 1.44 MB option) 6) Go to the Disk menu item and choose the drive letter which was added (in my case E:) 7) Go to the Disk menu item and pick Restore a Virtual Hard Disk image from physical drive 8) Check the Include non removable hard disks box and the Create Fixed Size Virtual Hard Disk radio button 9) Pick the disk which matches your ppmac memory size (1 GB on mine) and click the OK button 10) Pick the directory on your pc hard drive and name the file and click the OK button If you need to change the IP address the hard way: 1) Pull ppmac out of the rack and pull the mezzanine board off of the ppmac 2) Connect to the micro usb on the mezzanine board 3) Wait for the drive to appear in My Computer, and note which drive it is (in my case it was drive E:) 4) Go to the drive's \etc\network directory in Explorer 5) Open the Interfaces file with notepad 6) edit the staticaddress IP address to what you need 7) edit the gateway IP address to what you need (including matching the staticaddress if you do not have a gateway) 8) save the file If you need to go back to an earlier configuration: 1) Pull ppmac out of the rack and pull the mezzanine board off of the ppmac 2) Connect to the micro usb on the mezzanine board 3) Wait for the drive to appear in My Computer, and note which drive it is (in my case it was drive E:) 4) Go to the drive's \ppmac directory in Explorer 5) MAKE SURE YOU HAVE A DIRECTORY usrflash.x (where x is the value of the config number you want to go back to )!!!!!! 6) rename the file usrflash (no .x) to usrflash.x1 7) rename usrflash.x (where x is the value of the config number you want to go back to ) to usrflash 8) rename the file usrflash.x1 to usrflash.x When finished put the mezzanine board back on, the ppmac back in the rack, and power up. You should be able to ping and talk to the ppmac.
Link to comment
Share on other sites

  • 3 years later...
Has anyone had success creating a disk image with the "Backup" tool of recent IDEs? I just tried the IDE version 1.7.0.53, unsuccessfully. I want a complete disk image including the kernel, so I selected "Disk Image" tab. The first thing I tried was backing up to a local SD drive. It started off promsing: the kernel was written there and then "dd if=/dev/sda ..." started. The sda drive has two partitions of 6.5 GB and 1 GB, while the SD card partition is 30GB, so there was plenty of space. Things went fine until the output file hit the 4GB mark, when "dd" failed complaining "file too big". I presume this requires either a different file system (the SD card is vfat) or maybe the system is just missing large file support. Anyway, there is also an option to back up to network, so I tried that. From my windows machine, I created a shared drive and successfully mounted it on the delta tau by hand (using smbmount). I was able to write files there. But the Backup tool in the IDE is apparently unable to mount it (I double-checked the user name and password several times). This turns out to be due to my password containing some characters that make the shell unhappy. I'll change the password and try this again. Has anyone succeeded in obtaining a Disk Image to SD card? I'd appreciate some hints! My next idea is to try reformatting the SD card with an ext4 filesystem and see if I can write it there.
Link to comment
Share on other sites

An update to previous post: after changing my password, I was successful in performing a backup to the network drive. But the restore fails. As noted before, the disk is about 7.5GB, so the "fullImage.bin" file is also around that size: [code] # ls -l /media/shared/PowerPmacDiskImage/ total 7835521 -rwxrwSrwx 1 root root 8019509248 2014-09-25 09:41 fullImage.bin -rwxrwSrwx 1 root root 4063232 2014-09-25 09:29 uImage.bin -rwxrwSrwx 1 root root 63 2014-09-25 09:29 VersionInfo.txt [/code] The restore process attempts a sanity check that appears to fail because the file is larger than 32 bits: [quote] Stage 1 of 7: Sanity check (for space) before we do the actual disk image 8019509248 Error occured during host file size calculation with error message: Value was either too large or too small for an Int32. [/quote] Has anyone successfully done a Disk Image backup / restore ?
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...