cannot boot opensuse 11 from boot.ini after replacing disk 0 with different partitioning

Hi again people.

I got your help in another thread over the last few days. I changed from GRUB to XP boot.ini to boot windows and opensuse 11 so that ALL BOOT STUFF was on disk 0 (/dev/sda). I cloned this noisy hard drive to a new one of the same size, but a different brand.

INSTEAD OF 2 PARTITIONS ON THE OLD DISK 0 (a small DELL FAT one, and then a large NTFS C: partition), the new cloned disk 0 has ONLY 1 PARTITION (the NTFS C: partition).

XXClone free version worked very well (I am very impressed). When I replaced disk 0 (sda) after the xxclone, I can boot XP on disk 0, and Windows 2000 on disk 1 (sdb). Immediately prior to replacing disk 0 with the cloned drive, I could boot opensuse 11 on disk 1 (sdb). Now, when I try to boot opensuse 11 from my boot.ini, I just see the word GRUB, and nothing happens.

My opensuse 11 disk was not live (I could not boot from it). I have an opensuse 12.1 disk that can boot, and when I go into its repair option, and enter fdisk -l, I see /dev/sda having just /dev/sda1 as a FAT16 partition (the only partition shown), instead of the NTFS partition that this drive really has. Also, at the bottom of the fdisk -l output, I see the phrase “partition table entries are not in boot(I think this waa the word?) order”.

I suspect that my opensuse 11 does not know about my repartitioning of disk 0 (only one partition instead of 2), and thinks that the only partition on disk 0 is the old FAT partition somehow.

Also, I may want to upgrade to opensuse 12.1 eventually (I hate seeing all those error messages when it tries to read “repositories?”. I was going to upgrade to opensuse 12.1 in a later step, but am open to suggestions. I want to keep the boot.ini multiboot technique whatever I do.

Thanks.

Two more things:
when I boot from the opensuse 12.1 CD to get to repair mode:

  1. the message at the bottom of the output of fdisk -l said “partition table entries are not in disk order”
  2. the du command says “cannot read table of mounted file systems”

So strictly speaking, openSUSE does not support using the Windows boot.ini file to startup. Also, the openSUSE grub loader can be used to load any Windows version at which point, any entries in the boot.ini file will be selectable if you wish. In your present setup, where you have the boot.ini file loading a openSUSE partition, you might want to reinstall openSUSE to that same partition and making sure grub is installed into that partition and not installed into the MBR and after a successful installation of openSUSE, change the default active partition back to Windows. While openSUSE supports booting Windows, if you want to have multiple copies of Windows along with openSUSE, consider using the openSUSE grub menu to load all of Windows versions OR load openSUSE entirely on a separate hard drive and leave your main one for Windows to use. Also, never use NTFS or FAT partitions for the openSUSE root / or /home partitions as they will not work and use the suggested default of EXT4 for all openSUSE partitions (except for swap).

Thank You,

In your other post , I did have a brain freeze.

Did you follow nrickert advice on using sda ?
It is possible that the next stage of ‘grub’ was imbedded into sectors 1 to about 60 on the first track of old disk, and it would not have been transferred to the new hdd. It can be corrected but will let others respond to this possibility , in case I am way off again.

This is a true mess. I guess you know by now, but you should never have done this like you did. I suggest you try a Gparted LiveCD to see what can be fixed, but to be honest, I don’t see how this can be fixed.

Completely stupid!

Thanks guys.

I did the nrickert /dev/sda thing, and it worked perfectly with my old drive 0 (prior to cloning it). I could boot opensuse 11, as well as 2 windows os’s. I have used a similar dd to boot.ini technique in the past with redhat.

However, the old disk 0 was partitioned differently than the new clone disk 0 because the original had a fat partition (the usual DEll thing) prior to the C: partition. The new clone disk 0 has only the C: partition. I think that what happened is that the partition info that opensuse 11 has about my drives made it unable to boot without that small Dell fat partition present (mtab, fstab ???). I suspect this because the message at the bottom of the output of fdisk -l said “partition table entries are not in disk order”, because fsdisk shows the only partition on sda as being fat (it is NOT, it is NTFS), and because the df command yields “cannot read table of mounted file systems”

Thus, MAYBE if I used partition magic or something to put back that small FAT partition linux would boot as well.

Anyway, I use opensuse mostly for DB2 experiments (I do DB2 DBA work). So I could just install opensuse 12.1 now. THE REASON I WANT TO USE BOOT.INI INSTEAD OF GRUB AS HIGH LEVEL BOOT MANAGER IS SO THAT I DO NOT HAVE TO HAVE MY SECOND DRIVE (DISK 1) PRESENT IN THE PC IN ORDER FOR BOOTING TO OCCUR AT ALL TO ANY OS). My 3 linux partitions are only on disk 1 (second drive). And my understanding is that the GRUB code is on one of these 3 linux partitions.

So I could try partition magic, I could install opensuse 12.1 (but still do a dd thing to boot.ini so that disk 1 (second drive) is removable), or maybe (if it is possible) do something with the opensuse 12.1 live disk repair?

Thanks.

I perfectly understand that you want to be able to remove your second disk and still boot Windows. An that’s also the right thing to want and to do. I would never advise anyone to only rely on an OS installed on the second HDD in order to boot another OS installed on another disk. But what makes you think that you need boot.ini to achieve this goal? You’re making your boot situation much more complicated as it is in reality.

You can not load a bootsector from a file and expect that it will find the stage2 of grub at the same offset (same postion on disk) on another HDD - althoug it would work if you clone a disk sector by sector with dd on another disk of exactly the same size. Is that what you did?

That’s what Grub stage1 is looking for. Where is stage2. It looks for its address “hardcoded” in its bootsector (a file if you’re chainloading it with boot.ini). When was this address written there? As you installed stage1 of Grub in this bootsector (certainly not as you copied the bootsector to a file with dd). If you boot from MBR, it will take another way. It will use stage1.5 to read the filesystem. Thus it will be able to find stage2 even if it has moved, such as after cloning, repartitioning (depends how) or even after a brutal fsck. That’s why booting from MBR is a lot safer. stage1.5, as mentioned earlier by LostFarmer, is written on the first track, in the sectors directly following the MBR. Where are these sectors gone now?

Anyway I already said in your other thread that I won’t interfere anymore - and I realize that I shouldn’t have. After all … all we need is love … and fun, isn’t it? So if it makes you happy to boot (actually “chainload”) Linux from Windows and rely on a file - that probably contains wrong information now - stored on a ntfs partition to boot Linux - while you could boot Windows either from Linux (if second HDD is connected) or on its own (if second HDD is not connected) without having to change anything in BIOS and make your life easier by applying a much more simpler and safer method… that’s fine. You have the right of a complicated life.

Yes. Boot from live CD. Install Grub from command line in MBR on your Linux HDD, give this disk boot prioprity in BIOS. I won’t say it will solve all problems, since I haven’t seen your /etc/fstab. menu.lst, etc, and I don’t know if you did clone the disk correctly … humm … and now we have another problem: openSUSE by default use disk IDs in /etc/fstab and other files … while it is safer to use partition UUIDs - which never change when you clone hard disks.* … See how life can be hard some time! Don’t make it worse by booting from WIndows!

Anyway … if you were mounting by partition UUIDs or labels, you could clone a disk, reinstall Grub in its MBR (if necessary - not always) from a live CD, and use this Grub to boot Linux and WIndows. When you remove this disk, just boot Windows as if you had never had a second HDD. It’s as simple as that.

  • Maybe some cloning software can handle that. I have no idea. That’s not very difficult to implement, so I would guess the feature exists.

A few more words:

What you want to do with boot.ini is possible* - and not very difficult either. I didn’t say it was not possible. I just said it would be stupid, specially if you insist of using this method “whatever you do” (whenever you update to openSUSE 12.2, you will certainly have fun with Grub2 in a VBR of the second hard disk loaded from boot.ini). I have no doubt that you will get it to work. But you need to dd a valid boot sector containing Grub stage1 (that you will have to reinstall) pointing to the right offset of the next stage. And you’ll have to edit /etc/fstab and menu.lst to use UUIDs or labels. It will work and you will be able to boot Linux. If it stops working one day, check the filesystems on Linux, reinstall Grub, dd the boot sector in a new file (with the same name as the one you’re using now) and copy this file to your Windows C partition.

  • however last time I set up a system to use boot.ini - must have been 15 years ago - it was not possible to boot Linux if it was not on the first HDD (on the same HDD as boot.ini), but it seems not to be the case anymore.

In the other thread, you said that you installed ‘grub’ to sdb. If that is correct, you can use ‘dd’ and overwrite the sda file that boot.ini uses. Do that with any live linux cd or change the boot order in the bios and boot into sdb linux. Or use a MS windows hdd editor, read the sdb MBR and over write the non working file.

MS’s ‘diskprobe.exe’
Tinyhexer.exe
or many more.

Or install grub4dos in XP–would say the best option. Basically it is an independent grub legacy.

LostFarmer, (I will reply to please_try_again) in a moment.

I tried the dd thing with /dev/sda, /dev/sdb, /dev/sdb4, /dev/sdb5, /dev/sdb6, and /dev/sdb7 a few days ago, and only sda worked to boot opensuse 11.

I installed grub4dos into boot.ini menu, but need to find where vmlinuz is to try it.

Thanks.

please_try_again,

I originally, prior to this whole thing (I thought) had Grub installed on my MBR on my first disk.

I am trying to understand what you are saying. I think you are saying:

  1. that the dd copy thing for boot.ini causes Grub stage 1 (within the dd’d file?) to look for a disk address (or some kind of sector offset) which even though it is on my second disk, is no longer valid because my 1st disk is not identical to what it was when I did the dd?

  2. In all the excitement perhaps I am not remembering the experiment correctly, but I thought I tried to boot without the second drive (prior to cloning first disk) and I neither saw the Grub boot menu, nor did Windows boot. Maybe you were saying that if I did the windows repair fixmbr thing to my 1st drive, that then Windows would have booted, but then after cloning first disk and reattaching second disk, I did not understand how I could get linux back at all.

You told me earlier(in prior thread) that the Grub menus was in /boot/grub/menu.lst (on my second disk). So I felt that indeed I needed both drives to boot any OS.

  1. that this whole dd method will be more difficult starting with opensuse 12.2 (Grub2, VBR, etc.).

I wanted(want) some technique of boot menu where windows will boot regardless of whether 2nd drive is installed or not. I understand that this would have been easier (with Grub) if I’d had a linux partition on my 1st drive.

Anyway, my mtab and fstab seem to not reflect my current reality.

If I install opensuse 12.1 fresh to my existing second drive linux partitions, won’t I be back to the 2 disk config I had for 4 years (since my install of opensuse 11), where if I remove second disk I will be unable to boot anything?

And is there not software on the opensuse 12.1 disk that can interrogate my hardware and rebuild fstab and that stuff without a full install?

When you put grldr into the boot.ini and select it, most of the time it will search for a menu.lst file and use it. I do not think it needs to be on the same hdd. If you placed the one in the downloaded file to C:\ , remove it (you can put it there after booting to linux,and putting the correct info in it), it should find the one on the linux partition.

From the grldr grub , you can use the auto-complete function when in the command mode.
root (hd—tab , will list all hdd’s
root (hdx,–tab, will list all partition on hdd x
ls (hdx,x)/ ‘directory’ - will list files in the directory
cat (hdx,x)/boot/grub/menu.lst --will display menu.lst, if it is there.

remember grldr is based on grub legacy not grub 2, so hdd partitions start at ‘0’ not ‘1’

dd doesn’t cause anything. dd just copy the given number of sectors from a source (usually a hard disk) to a destination (in this case a file). You just have to copy a valid boot sector (meaning you might have to reinstall Grub on the cloned disk) rather than using the one you previously saved from the original.

It’s a different problem and has nothing to do with the fact that you have Linux on the second drive or not. It just means that your Windows boot is broken. You should remove the second drive and fix the MBR and/or Windows bootsector on your 1st drive, then never install Grub on this drive.

If the second drive is connected and has boot priority, you will be able to select Windows from Grub menu. If your second drive is not connected, than the control will be passed to the active partition of the first drive and you will see boot.ini (or not if it includes only a single boot entry). In both cases, you will be able to boot Windows, whether the second HDD is present or not, either from Grub or directly. I think it’s what you want. Of course, you may also add Linux to boot.ini and even boot in circle if you have fun with it. But more seriously, using only boot.ini (whatever you do) is the wrong approach.

dd is not more difficult. Having Grub2 in a partition bootsector is tricky and in my experience doesn’t last very long. It is also discouraged by Grub2 devs and requires to be installed with the --force option. I read that the openSUSE team is planing to do that in order to preserve the MBR (according to the old openSUSE boot philosophy). It was already wrong in the past and it will continue to be wrong in the future. What else can I say? There are political and not just technical reasons involved. Though it has the big advantage of using a generic MBR, and Windows loves that. This is what makes openSUSE the most Windows friendly Linux distro… but search the forum and ask Ubuntu dualbooters how they feel about the generic MBR boot approach! One can not please everybody.

It was clear from your first post.

You don’t understand. You don’t need a linux partition on your 1st drive and I never suggested that you should create one. Your situation is pretty common. Many users dual boot Windows an Linux on different hard disks in any order. Only a very few of them use Windows to boot Linux (with boot.ini). The method dates back from the 90’ (before Grub was used on Linux as the default boot manager) and we are in 2012 … aren’t we? :frowning:

Not surprising. I explained you why in my previous post.

You can install as many versions of Linux as you like on as many HDDs as you have, as long as you don’t write anything to the MBR of your Windows drive. To achieve exactly what you want you should always use the advanced setup (“Create parition setup” + "expert mode). Muti booters are experts from a Linux setup point of view. If you accept the default setup, you’ll end up with a mess. Also if you intend to clone hard disks, simply choose “mount by UUID” in the fstab options for each partition (including the swap partition) during setup. OpenSUSE’s default mounting by disk IDs is not appropriate for cloning hard disks. I wish they would change this default some day.

I must have written scripts to do that already. But it’s not very complicated. If you post your /etc/fstab and the ouptut of **fdisk -l **and blkid, we will be able to modify your /etc/fstab (as well as /boot/grub/menu.lst).

Next time you install (any) Linux, make sure you mount all your partitions by UUID! (see the 2 pictures below)


Which is a good reason to not start using it today.

@LostFarmer, look at the smiley in place of drive C in your post. It tells everything about the method. lol!