Score:0

Repair disk from live CD

mk flag

I have a PC which do no boot for disk problems, when starting I see messages like ...

  • bulk update request IO error, dev sda, sector (some number)
  • Buffer IO Error on dev sda (I cannot copy & paste the exact message since it remains for too few time) many times, and then last with:
Free initramfs and swith to another root fs:
chroot to NEW_ROOT, delete all in /, move NEW_ROOT to /
...

(initramfs) [a prompt with some command, I can use ls and cd, but I do not find any usefull file]

It's not the first time it appens, in the past I booted from live CD (usb to be onest) and lauched a fsck or some similar command by the graphical interface and everything turn to work for some weeks. Now from the live CD, if I use the disk utility I see the disk, with 2 partition, the EFI which seems ok, and the other with Linux SO, which has 1696 damaged sectors, if i run the file system check (from disk) I get this message:

Error checking filesystem on /dev/sd2: Process report exit code 8: e2fsck 1.46.5 
e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/sda2 (udisk-error-quark, 0)

If I try to repair it the message is almost the same (error repairing, instead of error checking) I've tried also sudo fsck /dev/sda2, but the result is almost the same:

fsck.ext4: Attempt to read block from filesystem resulted in short read while trying to open /dev/sda2
Is it possibile that this is a zero size partition?

Now I do not need to recover the full SO, I just like to have a check if there are some data to save, extract them and then I think I will throw away that old PC. It's not mine, so I do not know exaclty where can be the data to save. Is there a way to execute a disk check that will allow me to have a look to that disk? If it's a dangerous command that can event destroy some file, it doesn't matter ... I just want to recover something. I also thought to re-install Ubuntu, but I'm not sure that option will preserve the old data.

Thanks in advance for any help

hu flag
Usually, repairing disks requires expensive equipment, which is far beyond the means of an avarage user. That said, if the disk woks, you can sometimes try to repair a filesystem. This is what fsck does, and it looks like the disk in question does not work. To avoid data loss in the future, backup all important data.
guiverc avatar
cn flag
If you have a *failing* disk; disk checks (`fsck`) where data is written is **not** want you want to do.. You want to avoid using the disk until you know it's health (ie. use drive's SMART capability), then create a plan. Concentrate on reading data & getting data off; write or change data only if necessary (*each write can reduce chance of getting data off successfully*). No OS/product/release is mentioned & I see nothing on-topic in this question though; SE *Unix & Linux* covers Linux and your question is not even linux but about hardware as I see it.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.