Partitions in Linux
[...]
Repairing Linux Partitions
Short read while trying to open partition
If e2fsck fails to write the main superblock If the superblock got corrupted because it's on a bad sector e2fsck will finish the run, attempt to update the superblock, and give you the following error message:
fsck.ext4 -fy /dev/sdb3 complains:
Error writing block 1 (Attempt to write block from filesystem resulted in short write)
Obviously, the main superblock isn't updated and the whole e2fsck run is in vain.
So I run sudo mke2fs -n /dev/sdb3 to find out where the superblocks would have been written, as the -n switch prevents any actual writing.
This is what I get:
Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872
Next, I pick one position (the first) and run:
sudo fsck.ext4 -yf -b 32768 /dev/sdb3
Alternatively, I might have run:
mount -o sb=32768 /dev/sdb3 /media/francisco/sdb3_mount_point
Dedicated /home partition
In Linux, the /home directory is used to store user data and preferences.
This directory contains one subdirectoy for each user account. Say your username is john, your home directory is /home/john, your downloads are in /home/john/Downloads, your documents in /home/john/Documents, your Firefox bookmarks somewhere in /home/john/.mozilla and so on…
By giving /home its own dedicated partition, you separate the user data from the rest of the operating system.
The advantage is that you can wipe the operating system and replace it without affecting the user data.