Recover label, wrong magic number

Is there a way to recover label?
I could install (sparc) Solaris again, but it would take a lot of time.

Hi, try this:

newfs -N /dev/cX... (this will provide you all the superblock copies)

and then:

fsck -b "one of the numbers" /dev/cX...

1 Like

well I've tried all of them and each time got same error
"BAD SUPER BLOCK: MAGIC NUMBER WRONG"

I figure that you did the process with the correct command (it was an error from my side). The correct one is:

fsck -o b="one of the numbers" /dev/cX...

If the affected filesystem is not / or /var or /usr, you can try to rebuild it with newfs and restore from backup, if the problem is located in one of them, well, I'm afraid that you must to reinstall and restore.

I see. well there is some progress. the problem was bad 'partition table'

I don't understand why the 'format' command and Solaris install process use different default slice layout?

so I have restored the old 'partition table', but now fsck complains about unreadable sectors and such.

system tries to boot and then reboots.

probably my last attempts with fdisk,format and fsck damaged the slice.

Hi again, the restore of the slice layout has deleted the data, this is because the partitions have changed. Due the new / partition start now in the same block the system can start to boot but no more than this. At this point there is no more to try, except a reinstallation, so I hope that you have a correct restore data.