Guys, The HDD of my old lappy is dying. I'm running Fuduntu on it and how can I mark them so it won't be used in future?
Code: Select All sudo e2fsck -cfpv /dev/sxxx If you don't know the name of your disk Code: Select All fdisk -l your best doing it from a live cd it may take some time depends on disk size ect.
meknb Thanks for your reply, I've tried running those command from a kali liveusb on my old lappy Code: Select All e2fsck: Bad magic number in super-block while trying to open /dev/sda3 /dev/sda3: The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device> Then I tried "mke2fs -n -S /dev/sda3" Code: Select All mke2fs 1.42.5 (29-Jul-2012) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=0 blocks, Stripe width=0 blocks 1802240 inodes, 7197184 blocks 359859 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=0 220 block groups 32768 blocks per group, 32768 fragments per group 8192 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000 What to do after these steps? I can't seem to run e2fsck but from within fuduntu, there's a program called "testdisk" I ran these it shows about 394 bad sectors, will running these test disk marked them?
I've only ever used testdisk to recover lost partitions myself. Your problem looks like a bad superblock try Code: Select All sudo fsck.ext4 -v /dev/sda3 change the ext4 to whatever your filesystem is. That will tell you if your superblock is corrupt.If it is. Then find superblock backups Code: Select All sudo mke2fs -n /dev/sda3 this will give you block number of your backup Then restore superblocks Code: Select All sudo e2fsck -b block_number /dev/sda3 use one of the block numbers from your backup. Then you could Code: Select All sudo e2fsck -cfpv /dev/sda3 after a reboot with some hope.
meknb Thanks for the detailed explanation. My old lappy somehow can't reboot yesterday but luckily it can be formatted. I end up installing "xubuntu" and its running well now. Hopefully it stays that way...keeping my fingers crossed