0

I know how to get back a working file-system(FS), the usual way, by running

e2fsck -b alt_SB_no /dev/sdX

which will fix my FS.

I have an ext4 image-file that is corrupt - I want to patch in just the Super Block. I want to mount it via loop using an alternate super-block number. I DO NOT want to alter the image beyond a SuperBlock.

How do I do this?

0

The sb= mount option? (man page)

sb=n Instead of block 1, use block n as superblock. This could be useful when the filesystem has been damaged.

i.e.

mount -oloop,sb=123456 imagefile /mount/point

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.