Now in my experience (I had fixed GRUB on another PC with these commands less than a week ago) GRUB was supposed to be working again.
Windows started.
I decided to try again, but this time I was in a hurry… So instead of setup (hd1) I told it to use hd0. Guess what? Error 22.
After a little googling (Se7en has no fixmbr command) I was able to make Windows boot again with:
bootsect /nt60 ALL /mbr
(AFAIK this tells Windows to write again its boot code on every NTFS partition and then update the MBR)
Finally I got Seven running again, but I have no clue whatsoever on how to get GRUB back, since it is so kind to behave in a totally different way than it always used to.
Are you sure the hd boot order hasn’t changed? Some people pull the power on hd’s when they reinstall windows or mess with the bootloader. If you do the boot order changes.
Yes, 3 phisical harddisk as I wrote in my first post.
@caf4926: before I mess everything up,
should I do this from Gparted?
Do I have to remove the boot flag on the other harddisks?
hd1,1 is sdb2 right?
After that on which disk should I give setup?
Before I installed Se7en, these values where the same
(I remember DATA was the BOOT disk because I had messed up with XP boot files and it took me 2 days to fix it)
There are two possibilities (for each disk):
Either there is a bootloader installed in the MBR (Grub or another one) and the bootflag becomes irrelevant.
Or it has a generic bootcode (like WIndows systems) and the partition which has the bootflag will be booted. Notice that this partition can in turn have a bootmanager (such as Grub) in its bootsector.
(hdX, 1) is indeed sdX2 in Legacy Grub notation (only). In Grub2 (used by Ubuntu and Fedora 16), (hdX, 1) is sdX1.
But you can not be sure that hd1 is sdb, because these kernel devices are generated at boot time and the order in which they appear may vary. You should not think in terms of sda, sdb, sdc.
Notice that it’s possible that the disk which is called “sda” during (any) Linux setup appears as “sdb” when you reboot. So it can sometimes get very confusing.
OK. Then all you have to do is to reinstall Grub if you booted from Grub in MBR before or reset the bootflag on the partition which had Grub in its bootsector (most likely your Linux root partitition if it’s a primary one or the extended partition if your root partition is a logical one).
I suggest you boot from a Linux live CD, open a root terminal and post the output of
fdisk -l
and the output of
findgrub
if I can find the URL of the latest version of this script - since I never bookmark anyting. Give me 5 minutes.
OK, from a linux live CD, open a root terminal and download this file in /tmp.
I don’t know if wget is on the live CD. But if it is, it would be as easy as:
cd /tmp
wget [noparse]http://www.unixversal.com/linux/openSUSE/findgrub-3.5.1.tgz[/noparse]
Otherwise use firefox.
Then extract the archive in /tmp (it contains only 2 files):
tar -xvzf findgrub-3.5.1.tgz
If you didn’t open a root terminal but a normal terminal, become root now:
# Modified by YaST2. Last modification on dom dic 18 10:16:52 CET 2011
# THIS FILE WILL BE PARTIALLY OVERWRITTEN by perl-Bootloader
# For the new kernel it try to figure out old parameters. In case we are not able to recognize it (e.g. change of flavor or strange install order ) it it use as fallback installation parameters from /etc/sysconfig/bootloader
default 0
timeout 8
gfxmenu (hd2,1)/boot/message
###Don't change this comment - YaST2 identifier: Original name: linux###
title openSUSE 12.1
root (hd2,1)
kernel /boot/vmlinuz-3.1.0-1.2-desktop root=/dev/disk/by-path/pci-0000:00:11.0-scsi-1:0:0:0-part2 resume=/dev/disk/by-path/pci-0000:00:11.0-scsi-1:0:0:0-part1 splash=silent quiet showopts vga=0x31a
initrd /boot/initrd-3.1.0-1.2-desktop
###Don't change this comment - YaST2 identifier: Original name: windows 1###
title windows 1
rootnoverify (hd0,0)
chainloader +1
###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- openSUSE 12.1
root (hd2,1)
kernel /boot/vmlinuz-3.1.0-1.2-desktop root=/dev/disk/by-path/pci-0000:00:11.0-scsi-1:0:0:0-part2 showopts apm=off noresume nosmp maxcpus=0 edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x31a
initrd /boot/initrd-3.1.0-1.2-desktop
fdisk -l
Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
58 heads, 56 sectors/track, 601454 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000b6a02
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1953523711 976760832 7 HPFS/NTFS/exFAT
Disk /dev/sdb: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000792b9
Device Boot Start End Blocks Id System
/dev/sdb1 2048 4208639 2103296 82 Linux swap / Solaris
/dev/sdb2 4208640 488396799 242094080 83 Linux
Disk /dev/sdc: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xc2290fbc
Device Boot Start End Blocks Id System
/dev/sdc1 * 2048 488396799 244197376 7 HPFS/NTFS/exFAT
findgrub
Find Grub Version 3.5.1 - Written for openSUSE Forums
- reading MBR on disk /dev/sda ...
- searching partition /dev/sda1 (NTFS) ... --> Windows7/Vista Loader found in /dev/sda1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can add the following entry to /boot/grub/menu.lst :
###Don't change this comment - YaST2 identifier: Original name: WindowsBootLoader###
title Windows on /dev/sda1
rootnoverify (hd0,0)
chainloader +1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- reading MBR on disk /dev/sdb ...
- skipping partition /dev/sdb1 (swap)
- reading bootsector /dev/sdb2 (LINUX) ...
- reading MBR on disk /dev/sdc ...
- searching partition /dev/sdc1 (NTFS) ...
********************************************************************************
WARNING: /boot/grub/device.map not found.
Displayed BIOS device mapping may be incorrect!
********************************************************************************
findgrub -m
Find Grub Version 3.5.1 - Written for openSUSE Forums
--- DEVICE.MAP: sda is ata drive hd0
--- DEVICE.MAP: - /dev/sda
--- DEVICE.MAP: - /dev/disk/by-id/ata-Hitachi_HDS721010DLE630_MSE5215V0AKS1L
--- DEVICE.MAP: - /dev/disk/by-id/scsi-SATA_Hitachi_HDS7210_MSE5215V0AKS1L
--- DEVICE.MAP: - /dev/disk/by-id/wwn-0x5000cca37cc4ce51
--- DEVICE.MAP: - /dev/disk/by-path/pci-0000:00:11.0-scsi-0:0:0:0
--- DEVICE.MAP: => sda might be BIOS drive hd0
--- DEVICE.MAP:
--- DEVICE.MAP: sdb is ata drive hd1
--- DEVICE.MAP: - /dev/sdb
--- DEVICE.MAP: - /dev/disk/by-id/ata-MAXTOR_STM3250820AS_9QE2BXPD
--- DEVICE.MAP: - /dev/disk/by-id/scsi-SATA_MAXTOR_STM32508_9QE2BXPD
--- DEVICE.MAP: - /dev/disk/by-path/pci-0000:00:11.0-scsi-1:0:0:0
--- DEVICE.MAP: => sdb might be BIOS drive hd1
--- DEVICE.MAP:
--- DEVICE.MAP: sdc is ata drive hd2
--- DEVICE.MAP: - /dev/sdc
--- DEVICE.MAP: - /dev/disk/by-id/ata-MAXTOR_STM3250820AS_5QE3HKKH
--- DEVICE.MAP: - /dev/disk/by-id/scsi-SATA_MAXTOR_STM32508_5QE3HKKH
--- DEVICE.MAP: - /dev/disk/by-path/pci-0000:00:11.0-scsi-2:0:0:0
--- DEVICE.MAP: => sdc might be BIOS drive hd2
--- DEVICE.MAP:
********************************************************************************
- reading MBR on disk /dev/sda ...
- searching partition /dev/sda1 (NTFS) ... --> Windows7/Vista Loader found in /dev/sda1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You can add the following entry to /boot/grub/menu.lst :
###Don't change this comment - YaST2 identifier: Original name: WindowsBootLoader###
title Windows on /dev/sda1
rootnoverify (hd0,0)
chainloader +1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- reading MBR on disk /dev/sdb ...
- skipping partition /dev/sdb1 (swap)
- reading bootsector /dev/sdb2 (LINUX) ...
- reading MBR on disk /dev/sdc ...
- searching partition /dev/sdc1 (NTFS) ...
********************************************************************************
WARNING: /boot/grub/device.map not found.
Displayed BIOS device mapping may be incorrect!
********************************************************************************