I bought a new laptop last December, equipped with a 256 GB Crucial M4 SSD

I installed Linux Mint on it and it worked well, except for the "unpacking PACKAGE" during updates that were quite slow. That was not really such an issue and everything else was fine. About 6 month afters, now in June; I want to install Debian Wheezy on it, so I created a bootable USB stick and start the installation.

Everything seemed to go fine up until the "Installing the base system" part, when debian start to unpack every package. It has been 20 minutes in this step, and it's not blocked but it seems to go really slowly (> 20 seconds for unpacking bash, for exemple).

I have tested both AHCI and IDE mode. I am installing using LVM and ext4.

I have tested an hdparm -Tt /dev/sda, and got performance expected for my drive

# hdparm -Tt /dev/sda
Timing cached reads:   15718 MB in  2.00 seconds = 7859.40 MB/sec
Timing buffered disk reads: 759 MB in  3.00 seconds = 253.12 MB/sec

I tried a smartctl --all /dev/mydrive and didn't find a "reallocated" line

I tried the dd command to create/copy/... a large temp file, I didn't write the number down but there were in range of what to expect.

It seems like a random write issue of something similar, but I don't know how to investigate further.

I would like to find a way to test if the drive is defective, or if I configured something wrong, I can't find much on the internet ...

Thanks for any help

1 Answer 1


Try disabling the "barrier" option on your filesystem. You can find more info on barrier here, simply put it improves data integrity at the cost of some performance, but sometimes it gets excruciatingly slow.

If your slow partition is mounted to /, you can try to do a temporary remount with barrier disabled by doing:

mount -oremount,barrier=0 /

Try to do whatever it is that was slow, and see if it improved.

If that fixed the problem, you need to edit your /etc/fstab file to make the change permanent after reboot, by adding barrier=0 to the mounting options for this partition.

/dev/sda    /       ext4    relatime,[...your current options...],barrier=0      0       1

Leave everything else as-is if you don't know what it does.

Now, if you are doing a fresh install of Debian, you cannot disable the barrier option in the filesystem configuration screen (there are lots of options to enable/disable for ext4, but not barrier), so what you need to do is:

  • run the "expert install"
  • do every step up to and including setting up the partitions and filesystems
  • the next step ahead of you at this point should be "install base system", do not run it, instead use "start a console shell"
  • run mount -oremount,barrier=0 /target (/target is where the target filesystem is mounted after filesystem setup)
  • type exit to leave the shell, and now you can install the base system, and run the other steps after that
  • after the install is finished, your computer will reboot, because you only temporary re-mounted the change is lost but now you can edit the fstab in your newly installed system to set barrier=0
  • remount one last time and your done !
  • Thank you! This helped to improve write speed on a hard drive tremendously from 3.5 MB/s to 25 MB/s. Unfortunately that's still a factor 4 away from what I achieve with the same hard drive on a different computer, but better than nothing.
    – erik
    Mar 26, 2021 at 21:09
  • OH MY GOD! I can't stress enough how much time I spent on this! big LIKE
    – Adam Katav
    Jan 14 at 1:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .