Product Documentation

Knowledgebase

Previous Topic

Next Topic

IoT and FairCom Edge Help

In This Chapter

Core Files on the Raspberry Pi

Backing up the Raspberry Pi

Previous Topic

Next Topic

Core Files on the Raspberry Pi

For Raspbian on Raspberry Pi, core dumps are disabled by default. This was done to save disk space on limited size SD cards, but it can be annoying if you are developing a program and need to run down a difficult crash.

To verify that core dumps are disabled you can use the ulimit command. ulimit -c will display the current core dump file size limit. Typically, it will be 0, meaning no core files at all.

You can enable core dumps in a particular terminal window using the same ulimit command. ulimit -c unlimited will enable core dumps for programs run within that terminal window until it is closed or until the Pi is restarted.

Enabling Core Dumps for the Entire Machine

If you want to enable core dumps for the entire machine you will have to edit the /etc/security/limits.conf file. Look for a line similar to the following:

#* soft core 0

Change that line to the following:

* soft core unlimited

You will have to edit the file as a superuser. One way to do this is via nano:

sudo nano /etc/security/limits.conf

Use the arrows to move the cursor, make your changes, then hit Control+o return to save your changes and Control+x to exit.

Note: If you turn on core files for the entire machine, keep in mind any program that crashes for any reason will generate a core file and you may have to go find them and delete them if they start stacking up.

Previous Topic

Next Topic

Backing up the Raspberry Pi

It can take quite a while to get a Raspberry Pi set up and configured just the way you like. It would be nice to be able to easily back up the SD card to avoid having to do all the setup again for a second Pi or in the event that you have to reformat the card and start over.

If your Pi is up-to-date, it will have an SD Card Copier utility you can use for to make a quick and easy backup. This utility is located in Raspberry Menu > Accessories.

Connect a second storage device using a USB SD card reader or a USB thumb drive. Be sure this device is at least as large as the SD card you are copying.

Run the utility and specify the following:

  • Set the Copy From Device to the device you booted from, which will have a name similar to /dev/mmcblk0.
  • Set the Copy To Device to the second storage device.

Click Start and the utility will duplicate the card you are booted from to the card or drive you connected.

TOCIndex