Accessing a disk marked Id=42, Type=SFS

I recently had a memory failure on a dual boot system (Windows 7/ OpenSuSE 12.3) running on an AMD 8120 system. I sent the machine out to the local big box computer store (Fry’s) to be diagnosed, and though the returned machine would now POST, it would not boot. I have two disks, sda (Windows) and sdb(OpenSuSE), and it was a older, MBR, Grub2 setup, no UEFI. So I believe the boot sequence would have been to access the MBR on sda, which would direct to /boot on sdb for the next stage of GRUB. What happens is that I get the Welcome to GRUB splash, but then nothing but a blinking cursor (with no Grub> prefix on the line). I then put my 12.3 install DVD into the drive on the machine and started up the Rescue system. After logging in as root I immediately ran both fdisk -l and parted -l. Both returned the correct partition table for sda showing the various Windows partitions. But each also returned a single line for sdb, showing a single partition spanning the entire 2 TB disk, with an ID of 42 and a Type of SFS. At this point I attempted to mount what I knew to be the previous file system on sdb, sdb1=Swap, sdb2=/, sdb3=/opt. sdb4=/home, i.e.

mount /dev/sdb2 /mnt
mount --bind /dev /mnt/dev
chroot /mnt
mount /proc
mount /sys
mount -a

Other than the last command returning errors for attempts to mount the Windows partitions, this effort succeeded, and I was able to see directories, and list text files. I verified that /boot contained a grub2 directory with a grub.cfg file.

It appears to me that the immediate boot problem is the partition table on sdb, and that its designated ID and file Type are stopping Grub2 from executing its next stage, which would bring up the OS menu. Can anyone suggest how I would go about changing the partition table, or unmasking the partiition structure that is clearly still there on sdb?

I am used to doing my own partitioning on install using YAST2, but have never used either fdisk or parted other than for the kind of listing I described.

Any advice appreciated. I am a bit reluctant to return the machine to Fry’s, since something they did produced this problem to begin with!

Laurence Keefe

Too late to say. But never send your machine to some random place full of spackers.

It certainly sounds like they nuked your install.

If you have to hand a live CD/DVD for any Linux distro, boot it and use gparted to look at your HDD’s
But you kinda already told us I know. sdb sounds like it got blasted.
There are possibilities to undo that but it’s no walk in the park and is fraught with issues.
Hopefully you had a backup
And remember 12.3 is end of life

Ah, sorry
You managed to access the file system and you think perhaps the disk ID is the issue?

Possibly testdisk can help then

It is worse than that. You have some random junk on sdb (or may be on sda as result of “repairing” it) that gets executed and computer hangs. If you ever manage to recover disk content you will need to reinstall bootloader again.

Yes, I was able to access the file system on sdb by the sequence of mount commands I originally listed. I confess I was puzzled by that since how would mount recognize the partitions if both fdisk and parted could not Why would mount even know that sdb2,sbd3, sbd4 existed? In one of my rescue sessions I also ran

grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/sda

and received no error returns, so I assumed (possibly wrongly) that any trashing of grub2 on the MBR on sda would have been corrected. As part of that process I did receive a message that the Windows bootloader had been correctly identified.

How reliable an indicator of partition sizes is the file /proc/paritions? Is this a possible basis for rewriting the parition table on sdb?

I have some backups of sdb, but none that cover the last month’s work. If I had to I could trash the disk and use the last backup to restore most things, but I would rather not loose the last month’s work. Since I can access the file system using the Rescue system, can I copy some of the more recent files off onto a USB stick?

Yes, I know 12.3 is no longer supported. I was waiting for 13.3 to upgrade, but it never showed up, so my plan had been to wait until LEAP 42.1 in about a month, when this problem occurred.

Your sdb was apparently converted to Windows Dynamic disk. Linux does recognize it and presents volumes as “partitions”. I’m not exactly sure about GRUB support, but I believe it should recognize it as well.

In one of my rescue sessions I also ran

grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/sda

So if you now boot from sda you get just blinking cursor?

How reliable an indicator of partition sizes is the file /proc/paritions? Is this a possible basis for rewriting the parition table on sdb?

It just shows directly information from kernel. Assuming conversion to dynamic disks was complete correctly, it should show original sizes. But Linux cannot modify or change such “partitions”. So undoing it and replacing with normal MBR would make sense.

Since I can access the file system using the Rescue system, can I copy some of the more recent files off onto a USB stick?

Yes, of course. It looks like grub has problems with accessing dynamic disks, which is another argument to undo it.

Dynamic disk seem to be proprietary Windows stuff nothing but Windows supports it.

/proc is a virtual directory anything in it is just an interface to some process. In Linux and Unix all things are files

Yes, after the (apparent) GRUB2 install I get the Welcome to Grub splash, then only the blinking cursor. At this point I am working on copying files created since the last time I backed-up my home directory, in anticipation of doing a new install (13.2) and re-formatting my sdb disk altogether. The message I am getting here is that recomposing the partition table on my sdb is probably not possible.

Recommend

Download, and burn to a CD gparted live
http://gparted.org/livecd.php

Boot to gparted live and let it scan your disks and identify.
Depending on what it finds, gparted live might be able to fix your partition problems on the fly.
If an on the fly repair isn’t possible, then you can probably clone your disk (or copy the contents of sdb since it appears that you’ve succeeded in mounting) to an external storage, wipe and re-create your sdb partitiions properly and copy the files back into the re-constructed partitions.

At least… knock on wood so far you don’t appear to have lost your data to the point you need to recover data (if I read your post correctly).

Good Luck,
TSU

Thanks for the gparted suggestion, I will try it and see what happens. So far I haven’t figured out how to do the file copying I mentioned in the previous post. I cannot find the USB stick after it has been inserted into the machine. Under 12.3 such devices mount under /var/run/media/<user-name>. Where would they mount in the rescue file system? Does the rescue system even have the ability to mount such a device, and then copy to it after I have mounted the existing file system on sdb2 through the mount sequence I previously showed (but without the chroot and subsequent commands?)

You can do a fdisk - l with the USB plugged in. I’m not sure that a USB will auto mount if in a live system (which live system???)

I am delighted to report success, I am able to boot to both my 12.3 and Windows 7 installations, and I see no loss of files. The key was not the gparted application itself on the LIveCD, but rather another utility called TestDisk also included there, and accessible from a terminal window brought up under the LIveCD. gparted initially showed the same single disk-spanning partition, but did immediately find the file systems on what was sdb2,sdb3 and sdb4. Unfortunately, it could only identify them, not access them for data copying or listing of characteristics for editing. TestDisk, on the other hand, first identified the single sdb partition as Window2000 Dynamic SFS, but the QuickSearch option (which is the default) produced what certainly looked to be the old partition table. Comparing against TestDisk output on another dual boot system I have with 12.3 and Windows 7, the primary lack in this notional partition table was the marking of all the partitions as Primary (sdb1,sdb2,sdb3,sdb4, I have no need for an extended partition). I made this editing change, wrote the new partition table, crossed my fingers and restarted … and the machine still wouldn’t boot past the Grub2 splash and the blinking cursor. So I fired up the 12.3 rescue system, did the mount procedure and then resinstalled grub2 on /dev/sda. The configuration step produced a number of repeated error messages

ERROR: opening path /mounts/instsys/sys/block
ERROR: failed to discover devices

but ultimately completed with

No volume groups found
Found Windwos 7(loader on /dev/sda1)
done

I then performed the install, and received no errors. At this point I rebooted, and Grub2 went to the OS menu, and I have booted into both 12.3 and Windows 7, although there were some rather long pauses for both systems as some consistency checks were performed on the disks, the first time.

My thanks to you all for your assistance. And now to perform a backup…

Laurence Keefe

I’d like to warn you that if this happened spontaneously you may want to run smartctl on the drive since that could be an indications of disk failure :open_mouth: