Grub is gone and I automatically boot into windows

I week ago I installed opemSUSE on the second partition of my hard drive on my laptop. I partitioned it perfectly so I would have the space I wanted for windows and Linux on my laptop when I installed windows.
It was working fine yesterday. Now, today, I wanted to see if I could get files from windows to Linux, so I opened up the windows partition on Linux. I didn’t transfer or modify a single file because I didn’t want to mess up everything else. Then, when I tried to boot into windows, a black screen pops up with diagonal colorful lines across the screen and nothing happens. It wouldn’t boot.

To fix this, I popped in the windows CD to repair it and windows works now! However, Now, the openSUSE boot loader is gone and it won’t boot into SUSE. Is there a way to fix this? I want to have both systems. Is this just not possible without ****ing up my system?

Thanks,
Ben

It should be fixable.

More information is needed:

  1. What version of opensuse?
  2. What version of Windows?
  3. Is this a UEFI system?
  4. If not UEFI, then where did you install grub2 (for booting)?

Couple other things if Win8 did you turn off fast boot??

Also perfect to you may not be perfect to other always show us. In Linux fdisk -l will list the partitioning

I learned a long time ago that the only way to WIN the WAR with Microsoft
and Windows WANTING to "fix " a perfectly good and WORKING install of GRUB

it not to even play Microsoft’s game

install grub on it’s own /boot partition
and let Windows have the MBR on the FIRST drive

but you did not

so every time you need to “fix” windows with the install disk you will have
REPLACE Microsoft boot loader with grub

just reinstall grub

and disable secureboot

You don’t need a boot partition you install grub to the partition that has the /boot directory. If you choose or need a separate boot partition then yes that is where you install gurb. You can put generic MBR code in the MBR and or leave MS MBR code then you have to flag the partition you want to boot. Note this is all for the MBR boot mode.

For EFI you use grub2-efi but you don’t say where it goes because EFI boot is different. EFI boot goes to a special FAT format EFI boot partition that we mount as /boot/efi. The boot code for each OS goes into a directory in that partition. This does not use MBR code any more whether in the MBR or in the bootable partition. But in all cases you don’t use the same Linux /boot partition for all the Linux OS’s The boot partition is completely optional in most cases. Main case when it is not optional is if you are setting up an encrypted file system then the stuff in /boot have to be in a separate non-encrypted partition.

On 2015-04-16 04:16, gogalthorp wrote:
> The boot
> partition is completely optional in most cases. Main case when it is not
> optional is if you are setting up an encrypted file system then the
> stuff in /boot have to be in a separate non-encrypted partition.

Yep. Or using LVM.

There have also been some reports with problems re hibernation that get
solved by using a /boot partition. Reiserfs is one (very slow boot on
thaw), and btrfs had a problem that I don’t remember if was solved.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Sorry for no specifying.

Windows 7
openSUSE 13.1
grub was automatically installed with openSUSE 13.1 so I don’t know about the boot systems.

How would I reinstall Grub at this point?

For that, we need you to boot with the install DVD, but do not click on Install.

(Plug a USB key into the machine, as well, to copy some readouts onto)

Instead, 3rd item down should be “Rescue System”. Click on that and wait for it to load.

It will stop with the line

Rescue login:

Type (without the quotes) “root” then press Enter.

You will now see the prompt, probably in a red font:

Rescue:~#

Do

fdisk -l

That should give you the information to tell if your USB key is sda, sdb, sdc or whatever.

If you have not changed the format on the USB key, it is probably formatted to vfat.

Now, mount the USB key:

mount -t vfat /dev/sd**X** /media/

NOTE that where I use the red X, you should replace that X with the correct letter you found just above this for your USB key.

Now, do

fdisk -l > /media/fdisklist
parted -l > /media/partedlist

and

gdisk -l > /media/gdisklist

Post the contents of those files here between code tags. To use code tags in the message editor on this forum, simply look at the three rows of icons above the message window. On the 2nd row, 3rd from the right, is the “#” symbol. Click on that, and your cursor will be blinking between two code tags in the message window. Now, simply paste the output.

We can then help you with re-installing Grub.