Adding windows to opensuse. Grub problem

Opensuse 12.1 was already installed. I copied the win7 partition using gparted. I swear I edited the grub menu correctly. I can’t boot into windows. Booting in opensuse is no problem.

Note this message from the fdisk -l: Partition table entries are not in disk order
The partitions are not in order. They go swap, linux root, windows, linux home.

This should be all someone needs to see my error.

Message when running grub:

rootnoverify (hd0,3)
savedefault
Error 15: File not found

Contents of the menu.lst file:

Modified by YaST2. Last modification on Sun Jun 24 00:49:48 PDT 2012

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
##YaST - generic_mbr
gfxmenu (hd0,1)/boot/message
##YaST - activate

###Don’t change this comment - YaST2 identifier: Original name: linux###
title Desktop – openSUSE 12.1 - 3.1.10-1.9
root (hd0,1)
kernel /boot/vmlinuz-3.1.10-1.9-desktop root=/dev/disk/by-id/ata-INTEL_SSDSA1NW160G3_CVPR138401E2160HGN-part2 resume=/dev/disk/by-id/ata-INTEL_SSDSA1NW160G3_CVPR138401E2160HGN-part1 splash=silent quiet showopts vga=0x317
initrd /boot/initrd-3.1.10-1.9-desktop

###Don’t change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe – openSUSE 12.1 - 3.1.10-1.9
root (hd0,1)
kernel /boot/vmlinuz-3.1.10-1.9-desktop root=/dev/disk/by-id/ata-INTEL_SSDSA1NW160G3_CVPR138401E2160HGN-part2 showopts apm=off noresume edd=off powersaved=off nohz=off highres=off processor.max_cstate=1 nomodeset x11failsafe vga=0x317
initrd /boot/initrd-3.1.10-1.9-desktop

###Don’t change this comment - YaST2 identifier: Original name: xen###
title Xen – openSUSE 12.1 - 3.1.10-1.9
root (hd0,1)
kernel /boot/xen.gz vga=mode-0x317
module /boot/vmlinuz-3.1.10-1.9-xen root=/dev/disk/by-id/ata-INTEL_SSDSA1NW160G3_CVPR138401E2160HGN-part2 resume=/dev/disk/by-id/ata-INTEL_SSDSA1NW160G3_CVPR138401E2160HGN-part1 splash=silent quiet showopts vga=0x317
module /boot/initrd-3.1.10-1.9-xen

###Don’t change this comment - YaST2 identifier: Original name: floppy###
title Floppy
rootnoverify (fd0)
chainloader +1

###Don’t change this comment - YaST2 identifier: Original name: other###
title win7

map (hd0) (hd0)

map (hd0) (hd0)

rootnoverify (hd0,3)
savedefault
makeactive
chainloader +1

This is the fdisk -l output:

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 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: 0x00092503

Device Boot Start End Blocks Id System
/dev/sda1 2048 4208639 2103296 82 Linux swap / Solaris
/dev/sda2 * 4208640 63023103 29407232 83 Linux
/dev/sda3 234194944 312578047 39191552 83 Linux
/dev/sda4 63023104 234194943 85585920 7 HPFS/NTFS/exFAT

Partition table entries are not in disk order

Is that how you installed Windows? By just copying a partition?

It won’t solve your problem (but avoid other problems): Don’t use makeactive!

Please use CODE tags around computer output: http://forums.opensuse.org/english/information-new-users/advanced-how-faq-read-only/451526-posting-code-tags-guide.html
It is now more or less unreadable.
And do not say “this is the fdisk -l output”, but copy/paste the line where the command is (including the prompt) together with output when copying/pasting. Then we can see ourselves what you did without you doing story telling.

And the message

Partition table entries are not in disk order

is just a remark ro draw attention to the fact that the order on the disk is 1, 2, 4, 3. Which is not a real problem, but may lead to human misunderstandings and thus to human errors.

On 2012-06-25 10:06, please try again wrote:
> Is that how you installed Windows? By just copying a partition?

Windows might complain later about that, but still, he is getting an error
from grub.

15 : File not found
This error is returned if the specified file name cannot be found,
but everything else (like the disk/partition info) is OK.

What file could it be?


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

/boot/grub/default.

https://bugs.archlinux.org/task/7770

@gariac,
remove “savedefault”!

On 2012-06-25 17:16, please try again wrote:
>
> robin_listas;2471180 Wrote:

>> What file could it be?
>>
> /boot/grub/default.
>
> https://bugs.archlinux.org/task/7770
>
> @gariac,
> remove “savedefault”!

ha! Interesting.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

Ok, the menu.lst entry is now reduced to just

###Don’t change this comment - YaST2 identifier: Original name: other###
title win7
rootnoverify (hd0,3)
chainloader +1

The output when booting to win7 is:
rootnoverify (hd0.3)
chainloader +1

BOOTMGR is missing
Press Ctrl+Alt+Del to restart

Obviously now I have a windows problem. Since I have a functional linux OS, is there any way to install the missing file?

Yes, now it’s a Windows problem. What about just installing Windows properly?

The partition is off a notebook. By some miracle, I do have media. [Most notebooks come without the DVD.] However, it would be far simpler to clone the windows partition to the SSD, then install opensuse than to deal with a windows installation. There must be close to a hundred security bug fixes on win7. Plus I would have to install all the software again.

But it would be better to learn how to do the repair from linux, if possible.

Incidentally, since I have the win7 partition on the old magnetic hard drive, can I just pull the required file from it?

On 2012-06-26 00:36, gariac wrote:
>
> Incidentally, since I have the win7 partition on the old magnetic hard
> drive, can I just pull the required file from it?

Mmm! Perhaps… I think that you need the bootloader, not a file. Why not
google the error message?

The new partition is bigger or smaller than the original?


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

I googled the error message before doing the post. There are technique to use rescue disks. I still have that rescue partition on the magnetic drive.

The new partition is bigger than the old partition by maybe 50megs. I sized it all up with gparted.

I just did a copy with gparted. I think I will wipe the windows partition on the SSD (technically unallocate I guess) and clonezilla the partition over from the magnetic drive. That doesn’t take much effort.

On many installs, the main (and large) Windows 7 NTFS partition is not the boot partition, but a much smaller hard disk partition showing up before the large Windows hard disk partition, its under 500 megabytes and as small as 128 megabytes in size. It will be marked active for booting and it will be configured to match the drive from where it was copied. In general, you must reinstall Windows when it is moved to a different hard drive and certainly a different computer. Some backup/restore methods do allow for a larger hard drive on the same computer, but nothing that allows what you are trying to do. You can take your personnel settings from the \users folder, but anything else will likely not work. Further, you should install Windows first and not last to have any success. I can bet you a hot dog lunch, you will not be successful with this setup in getting Windows to work without a reinstall. I would go a steak dinner, but some people do win the lottery or get struck by a meteor ever so often. I hope for the first over the latter myself.

Thank You,

On 2012-06-26 01:56, gariac wrote:
>
> I googled the error message before doing the post. There are technique
> to use rescue disks. I still have that rescue partition on the magnetic
> drive.

No, the rescue partition recreates windows as it was originally when you
bought the machine. It would resize to the full disk and destroy Linux in
the process.

>
> The new partition is bigger than the old partition by maybe 50megs. I
> sized it all up with gparted.
>
> I just did a copy with gparted. I think I will wipe the windows
> partition on the SSD (technically unallocate I guess) and clonezilla the
> partition over from the magnetic drive. That doesn’t take much effort.

These image utilities try to be clever: they copy only used sectors.
However, the boot sectors are not “used”, so they are not copied. Instead,
they try to reconstruct grub from their own media. Or something like that.

With ntfs and boot loader they work better, because they don’t try to be
very clever. If not, I would try a plain “dd”, but as it copies the exact
same size you have to expand it later to reclaim those 50 megs.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

At the risk of having to buy someone a hot dog, which given the international flavor of the internet could be in Helsinki or Kabul, I am running ghost4linux from the magnetic drive to the SSD. See ya in too many hours. At least they are not hours that require me to do anything other than wait.

Incidentally, doing some googling, I came across partclone.ntfsfixboot. It didn’t do me any good, but it might help the next person reading this thread.

I had run clonezilla to copy over the windows partition and it wanted to fiddle with the source drive. I forget the exact complaints it had about the NTFS partition, but since it was working, I sure don’t want to touch it.

I started from scratch. I did a ghost4linux copy. Nothing booted. I did a Clonezilla copy and everything booted. However, the opensuse got stuck after the splash screen. At that point I decided to “update” the opensuse. That didn’t fix the problem. So I did a fresh install of opensuse and now everyone boots. If you have to do a fresh install, opensuse trumps windows, at least for me, since nearly all the programs I run are found on repos. I have one that I have to compile.

I’m going to clonezilla the SSD to an external USB, then resize the /home directory. In theory, that directory has nothing to do with booting so it shouldn’t be an issue.

Incidentally, the Parted Magic CD has an “extras” section with boot repair tools. One of the tools (Plop boot manager) boots any partition.

On Mon, 25 Jun 2012 22:36:02 GMT, gariac
<gariac@no-mx.forums.opensuse.org> wrote:

>
>please_try_again;2471268 Wrote:
>> Yes, now it’s a Windows problem. What about just installing Windows
>> properly?
>
>The partition is off a notebook. By some miracle, I do have media.
>[Most notebooks come without the DVD.] However, it would be far simpler
>to clone the windows partition to the SSD, then install opensuse than to
>deal with a windows installation. There must be close to a hundred
>security bug fixes on win7. Plus I would have to install all the
>software again.
>
>But it would be better to learn how to do the repair from linux, if
>possible.

You cannot repair that from linux. You need a windows install disk and do
a boot repair. Then you will have to repair grub again. BTDT.

?-)