Next Previous Contents

## 5. Running partimaged

## 5.1 Where does partimaged save images?

The path is the one you choose with partimage in "Image file to create/use" on first screen. 2 cases: 1. If you entered absolute path (name starts by a '/'), it will be used as it. 2. You entered a relative path (name starts by anything else than '/'). The path will be related to the one you started partimaged from. If you only gave image filename, the path will be the current directory (where you started partimaged).

## 5.2 Partimaged says "Write access is denied". What's wrong?

partimaged switched to 'partimag' user for security reasons but ion your system, this user can't write in the directory you choose to save images. You have to change permissions of the directory. Man chmod and chown can help you here.

## 5.3 How do I generate certificate/key file for SSL support

First: run

- openssl req -new -x509 -outform PEM > partimaged.csr
- openssl rsa -in privkey.pem -out partimaged.key
- openssl x509 -in partimaged.csr -out partimaged.cert -signkey partimaged.key

Then, put partimaged.key and partimaged.cert into appropriate directory and chmod them 0600

## 5.4 How to run partimaged in chroot environment

- Create a etc subdirectory in the chroot directory and put files in it:
  - /etc/ld.so.conf
  - /etc/ld.so.cache
  - /etc/passwd
  - /etc/shadow
  - directory /etc/terminfo
- Create a lib subdirectory and put files into it:
  - /lib/libc.so.6 and its linked file
  - /lib/ld-linux.so.2 and its linked file
  - /lib/libnsl.so.1 and its linked file
  - /lib/libnss_compat.so.2 and its linked file
- Create a dev subdirectory and run mknod tty c 5 0 in it.
- If needed, also put partimagedusers, partimaged.key and partimaged.cert into appropriate location.

If partimaged --chroot {your directory} doesn't fail, you'll be able to run partimaged as daemon into chrooted environment with `partimaged -D --chroot {your directory}'

Next Previous Contents