1

I want to install Debian on an external hard drive but I'm not sure if this could corrupt the file system. I would like you to explain to me if there is any modification to be made to the operating system to avoid this, or else, the things that I have to take into account to prevent the file system from corrupting.

I would also like you to add the commands to test the file system and the bad sectors.

2

A USB disk is treated pretty equivalently to an IDE or SATA disk in this respect. As long as the OS is shut down cleanly then blocks will be flushed and I/O completed. So it's safe from an OS perspective.

Note that cheap USB flash drives may not survive, because the cheap ones aren't designed for high activity. But a hard drive connected via USB should be fine.

The OS automatically detects if the disk wasn't cleanly dismounted and will check the filesystem. It can also be configured to periodically check (see /etc/fstab and man 5 fstab) on reboots.

A disk can be checked for bad blocks with the badblocks command. Be carefuly about using it on a disk that's in active use, except in read-only mode

  • Thank you very much for this interesting information, it is amazing what one learns when an answer is well-grounded. I'll take a look at fstab and badblocks to learn more about it. Thank you for taking the time to answer me and especially understand the language that I translated with the translator, in many cases, I am not sure that I am using the correct terms. If you think it necessary, correct my question so there are no errors in your language. – MarianoM Nov 9 '18 at 4:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.