[solved]Linux is gone from boot

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
godsotherhand

[solved]Linux is gone from boot

Post by godsotherhand »

I had Linux Mint installed on my desktop..
For games, i installed windows7, doing the following:
created bootable usb with Gparted on it to shrink my partition (left 40GB for my windows).
Installed windows in the 40 GB partition without touching the linux partition.
But my windows now deleted my linux boot file or w/e it uses to know what to boot..
so it boots dirrectly into windows.
only now i found out that you need to save a file and then restore it using the LiveCD..
But without having that file in the 1st place, how can i recover my linux mint installation? or what should i do?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
wayne128

Re: Linux is gone from boot

Post by wayne128 »

godsotherhand wrote:I had Linux Mint installed on my desktop..
For games, i installed windows7, doing the following:
created bootable usb with Gparted on it to shrink my partition (left 40GB for my windows).
Installed windows in the 40 GB partition without touching the linux partition.
But my windows now deleted my linux boot file or w/e it uses to know what to boot..
so it boots dirrectly into windows.
only now i found out that you need to save a file and then restore it using the LiveCD..
But without having that file in the 1st place, how can i recover my linux mint installation? or what should i do?

Your linux is not gone, it is still in the partition.

When you install Windows, windows OS will overwrite MBR with its own boot loader, that explains why it boot only to windows.

In order for you to boot Linux OS, you either use another Live CD that can boot any partition, or just use Live CD of the Linux OS, boot computer, then follow the grub2 documentation, reinstall grub.

https://help.ubuntu.com/community/Grub2

go to this section:
Reinstalling GRUB 2

There may be times when a user needs to either move or reinstall a GRUB 2 installation. GRUB 2 needs to be reinstalled when a user is presented with a blank screen with only the word "GRUB", no prompt, and no ability to enter commands. This often happens when the MBR of the booting device is altered and GRUB 2 is removed, such as when Windows is installed after Ubuntu. Additionally, if a user cannot boot into an operating system at all, even using the rescue mode mode, a complete reinstallation of GRUB 2 may be necessary.

Reinstalling from LiveCD
godsotherhand

Re: Linux is gone from boot

Post by godsotherhand »

doing so will not get me to the same place, only looking for a way to bring back windows instead..right?
User avatar
Roken
Level 5
Level 5
Posts: 737
Joined: Fri Nov 19, 2010 4:55 pm
Location: Newport, S Wales

Re: Linux is gone from boot

Post by Roken »

Grub will boot Linux and Windows, whereas the Windows MBR will only boot Windows (Without a lot of work). Re-installing grub will give you the option of booting either at startup.
Kernel Linux Tex 5.12.14-zen1-1-zen, XFCE
Arch
Dual GTX1070 8Gb
AMD Ryzen 1800X
32Gb RAM
godsotherhand

Re: Linux is gone from boot

Post by godsotherhand »

ok, now only linux will boot... also i can see the partition in linux..everything about the hdd is weird now...it says 160gb is system reserved..
I was carefull and did use the right partition, the biggest one(roughtly 100 GB).
what can i do now...?
wayne128

Re: Linux is gone from boot

Post by wayne128 »

check your partition first with
sudo fdisk -l
sudo parted -l print

also, check the grub configuration file
cat /boot/grub/grub.cfg
godsotherhand

Re: Linux is gone from boot

Post by godsotherhand »

sorry, my fault. i didnt see it. it works ok now. sorry bout that.
But now i got a question. on the bootloader, i get two versions of linux mint.. is that normal?
i get:
linux mint 10 64-bit, 2.6.35-29-generic
linux mint 10 64-bit, 2.6.35-29-generic -- recovery mode
linux mint 10 64-bit, 2.6.35-22 generic
linux mint 10 64-bit, 2.6.35-22 generic -- recovery mode
windows 7


why 22 and 29?
wayne128

Re: Linux is gone from boot

Post by wayne128 »

godsotherhand wrote:sorry, my fault. i didnt see it. it works ok now. sorry bout that.
But now i got a question. on the bootloader, i get two versions of linux mint.. is that normal?
i get:
linux mint 10 64-bit, 2.6.35-29-generic
linux mint 10 64-bit, 2.6.35-29-generic -- recovery mode
linux mint 10 64-bit, 2.6.35-22 generic
linux mint 10 64-bit, 2.6.35-22 generic -- recovery mode
windows 7


why 22 and 29?

That is normal.
Older kernel is 2.6.35.22
Newer kernel is 2.6.35-29.

Usually you keep them, run new one, if something not working, go back to run old one to confirm if that is due to new kernel problem
godsotherhand

Re: Linux is gone from boot

Post by godsotherhand »

ty all for the help :D
Locked

Return to “Installation & Boot”