-2

How to install and execute e2defrag on KuBuntu?

http://launchpad.net/e2defrag

From the link:

Utility for offline defragmentation of ext[234] filesystems.

This poor ancient package used to be known as the defrag packge but was removed from Debian and hence Ubuntu due to it not having had a maintainer in many years and suffering from bit rot. I am rescuing it from the bit bucket.

Alex S
  • 165

1 Answers1

2

You don't mention which version of Ubuntu you are using but packages are only available for 14.04 through 15.10 at this time as it's been almost 2 years since the PPA has been updated. Since 14.04 is the only one of these currently supported, I'm providing instructions for that version.

For 14.04

Run the following commands in a terminal

sudo add-apt-repository ppa:dpmva1/ppa
sudo apt-get update
sudo apt-get install e2defrag

EDIT from man page:

Note  that  unlike  the  fsck  program,  defrag MUST NOT be run on a mounted file system device
       (unless invoked with the -r (readonly) option, which is always safe).  Also note  that  if  you
       defragment  a  partition  containing  a bootable kernel image and are using lilo ( grub doesn't
       care unless you have it installed in the partition using blocklists instead of the MBR  ),  you
       will  have to reinstall the boot loader for that image (since the location on disk of the image
       may have changed).

       Remember, if defrag fails to complete for any reason (including  power  glitches,  kernel  bugs
       etc.), you will be left with a terminally sick, and possibly completely unreadable, filesystem,
       so backup any valuable data before you start.

Installation tested on 14.04.5 I have no reason to expect the point release is relevant.

Elder Geek
  • 36,752