| |
HOWTO: Creating an additional partition when installing IPCop
For several reasons, it's recommended to use a dedicated partition for the Update Accelerator cache - but unfortunately, IPCop doesn't allow to choose your own partition layout during setup.
By default, the layout is fixed for a tiny boot partition, a moderate root partition and huge log partition. This may be appropriate for standard a firewall, but this design is disadvantageous for add-ons like the Update Accelerator.
Even though adding an extra harddisk may be an option for standard PCs, some small machines don't allow you to add a second harddisk due to lack of space.
This HowTo will show you the steps which are necessary to change the partition layout and creating an additional partition during IPCop setup.
Using the sfdisk command during IPCop setup |
Step 1:
Insert the boot media, boot your computer and wait for the first setup screen to appear. At the boot prompt type
vmlinuz fdisk
and press ENTER (figure 1).
Figure 1 (click to enlarge)
Step 2:
Continue with setup until the NOW FDISK screen appears (figure 2).
Figure 2 (click to enlarge)
Step 3:
Press ALT-F3 to switch to the BusyBox screen (figure 3).
Figure 3 (click to enlarge)
Step 4:
Calculate your space requirements. You need at least
- for the boot partition: from 16 to 32 MiB
- for the log partition: from 2 to 8 GiB, depending on the web proxy cache size
- for the root partition: from 2 to 4 GiB
The remaining disk space can be used for the cache partition.
The following example assumes you have a 40 GiB harddisk installed. The considerations are:
- 16 MiB for the boot partition
- 8 GiB for the log partition
- 2 GiB for the root partition
This keeps 30 GiB for the cache partition: 40 GiB - 8GiB - 2GiB = 30 GiB
Step 5:
Run the sfdisk command. At the BusyBox prompt type
sfdisk -uM /dev/hda << EOF
and press ENTER.
Each of the following lines represents the size of a single partition, in this exact order:
boot partition - 16 MiB with type Linux and set the bootable flag:
log partition - 8 GiB (8.000 MiB) with type Linux:
cache partition - 30 GiB (30.000 MiB) with type Linux:
root partition - all the remaning space with type Linux:
Enter these values, one per line. In the last line, type EOF to terminate the input (figure 4).
Figure 4 (click to enlarge)
Step 6:
Now press ENTER to write the new partition layout. (figure 5).
Figure 5 (click to enlarge)
To use a different layout, go back to step 5.
Step 7:
Press ALT-F1 to return to the IPCop setup screen and continue with the setup. After finishing the setup you have a free partition /dev/hda3 of 30 GiB for the update cache.
|
Keep the custom partition while setting up IPCop |
| If you have to reinstall IPCop and want to keep this additional partition, follow steps 1 and 2 as shown above. Hit OK as soon as the FDISK NOW screen appears. This leaves your partition layout untouched.
|
|