help! messed up bootloader and maybe partition :-(

Hi
I need help. I’ dual booting with W7 (laptop). this morning I decided to update W7 installation with the service pack1. the installation required to make one of the window partition active. so I first made C as active but this didn’t allow SP1 to install. I then made one of the hidden partitions as active.

SP1 installed ok but upon reboot I got grub error 22.

using the W7 disk I managed to restore the Windows bootloader (I’m writing from W7) but I’m unable to restore the suse bootloader.

do I need to change something in the partitions?
can you please point me in the right direction?
thanks
FT

P.S. I managed to find a Knoppix CD. From Gparted it says that the space where I have Suse is unallocated!

Since you managed to make two of your Windows partitions active, would you manage to make them inactive then? You just have to turn off the bootflag for these partitions and make the Linux partition containing Grub stage1 active (either the third primary if any or the extended one).
You can do that with gparted, fdisk, sfdisk … or findgrub -a. gparted is probably easier for you.

Sorry. I overlooked that. If it’s true, that doesn’t look good. Knoppix should have network support. So you should be able to run firefox from Knoppix or another live system. Then you could open a terminal, type

fdisk -l

and post the output here, so we can see how your partitioning looks like.

here is the output

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x16721672

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1530    12288000   27  Unknown
/dev/sda2            1530        1543      102400    7  HPFS/NTFS
/dev/sda3   *        1543       14633   105148148+   7  HPFS/NTFS
/dev/sda4           14634       60801   370844460    f  W95 Ext'd (LBA)
/dev/sda5           21122       60801   318729568+   7  HPFS/NTFS

sda4 contains unallocated space where I had / and home

It looks bad. Who did remove your partitions? Windows? Did you have that NTFS partition (sda5) before ?

yes windows made all this mess.
the partitions there are all ok. only the unallocated space is the problem. before being unallocated I had / and home.
basically windows saw the linex partitions and blasted them…nice

And did you have the last NTFS partition before? It’s important.

yes, it was there before

Then we can not fix it. You have to reinstall openSUSE, maybe wait one week for 11.4 final release.
If you could describe exactly what you did, it might help others not to make the same mistake. Do you think you could possibly have made a mistake or was it all Windows fault?

as I said I only changed the active partition. Not sure if I made a mistake…
I admit I’m no expert but the only place where windows should stay is inside a nice virtual machine where the only thing it can harm is itself…
thanks for your help anyway!

Do you have an* fdisk -l* output (or similar) that describes the situation before yyou started thius ill fated adventure?
Then we could at least compare to what you have now to see if we can any favourable comment.

By activating the hidden partition, you probably booted the recovery system and … that was it.

Absolutely true (although it won’t hurt the host but could still harm the rest of the world as soon as it gets online.)

hi
no unfortunately I don-t have it.

as last hope I started testdisk from knoppix and this programme can see -after a deep and extremely long search- the lost partitions. they are listed as deleted!
I’m reading the test disk manual so I can chance a recovery…it’s my last desperate act before I start a weekend of computer frustration…

Waow ! If you are able to read the geometry of these partitions (start sector and number or sectors), that would do it. Didn’t you have a swap partition too? That would make 3 partitions.

  • I have to take a look of that testdisk from knoppix when I get some time.

Compare the addresses with the addresses of the hole you have now (starting at 14634 end ending at 21121). As you say you had / and /home and I guess Swap, Check if your tool saw three partitions there. You must create there sda6, sda7 and sda8. You could also first remove sda5 and then create sda5, sda6, sd7 and sda8 (this last one with the addresses of the now sda5) in the “correct” sequence. Remember that as long as you are only using something like fdisk, you are only writing in the partition table (and it’s extensions for the extended/logical ones) and thus as long as you recreate the correct start/stop addresses in there, the file systems on those partitions will not get touched.

After you recreated the correct partition, do not forget to check if partition numbers are different from earlier. Those partition numbers are used in /boot/grub/menu.list and in /etc/fstab.

yes, I can see 3 partitions / home and swap. I can even navigate my files in / and home from inside testdisk. I think I need to rewrite the partition table using testdisk -all explained in the website- and keep my fingers crossed.
if this works I might need to reinstall or fix the bootloader as I had to restore the windows bootloader…I’ll keep you posted. I had to restart the scan of the disk as I made a mistake :wink:

Wishing you success. I am off tonight, but the others will help you when needed. Better ask when in doubt, because these are tricky operations.

ok, the partitions are back with all my files

with fdisk -l I get

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x16721672

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        1530    12288000    7  HPFS/NTFS
/dev/sda2            1530        1543      102400    7  HPFS/NTFS
/dev/sda3            1543       14633   105148148+   7  HPFS/NTFS
/dev/sda4           14634       60802   370852492+   f  W95 Ext'd (LBA)
/dev/sda5           14634       15938    10481664   83  Linux
/dev/sda6           15939       16200     2096120   82  Linux swap / Solaris
/dev/sda7           16200       21121    39534592   83  Linux
/dev/sda8           21122       60801   318729568+   7  HPFS/NTFS

but from fstab I have

/dev/disk/by-id/ata-WDC_WD5000BEVT-22A0RT0_WD-WX71A1055508-part7 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-WDC_WD5000BEVT-22A0RT0_WD-WX71A1055508-part6 /                    ext4       acl,user_xattr        1 1
/dev/disk/by-id/ata-WDC_WD5000BEVT-22A0RT0_WD-WX71A1055508-part8 /home                ext4       acl,user_xattr        1 2
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
/dev/sda3 /mnt/winC	ntfs-3g defaults 0 0
/dev/sda5 /mnt/winE	ntfs-3g defaults 0 0

this meand that the partition names/numbers are not as they were before…
what should I do next?

Edit the /boot/grub/menu.lst file and the /etc/fstab tiles and correct.

If you could get the script I posted here
Displaying partitions infos from hal daemon

an run it with halinfo -uV, it would show everything we need to edit your /etc/fstab. You might have to reboot knoppix since you modified the partition table but try without rebooting first.

If copying/pasting the code, saving in a file, make it executable, etc sounds too complicated … you can do the following in a terminal:

su -l
cd /tmp
wget  http://www.unixversal.com/linux/openSUSE/halinfo20.tgz
tar -xvzf halinfo20.tgz
chmod 755 halinfo 
./halinfo -Uv

and post the output.