LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook
User Name
Password
Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind).

Notices


Closed Thread
  Search this Thread
Old 11-26-2022, 02:17 PM   #1
hedonus
LQ Newbie
 
Registered: Nov 2022
Posts: 2

Rep: Reputation: 0
installed windows and it killed grub, now nothing is loading


Hello

I generally run Garuda on my laptop (Framework DIY Edition), but for school I need to use the Unity3D engine. So I installed Windows alongside Garuda. and it ate up my GRUB. so I tried to reinstall Grub. I tried deleting Windows' bootloader and reinstall GRUB to the unallocated space, it did not work.

I am currently on a linux mint live disk. i ran Boot-Repair and it gave me this

http://sprunge.us/Yd6R1k

Any and all help would be appreciated. I know i dun goofed, and I'm at my wits' end. Thank you in advance.
 
Old 11-28-2022, 11:58 AM   #2
mrapathy
Member
 
Registered: Nov 2005
Distribution: Slackware,Debian
Posts: 366

Rep: Reputation: 66
install windows then install linux. you should have a boot menu in bios. sometimes f8 or f10 can bring this up. whats the laptop manufacture and model. do you have uefi or legacy bios?
 
Old 11-28-2022, 01:46 PM   #3
bodge99
Member
 
Registered: Oct 2018
Location: Ashington, Northumberland
Distribution: Artix, Slackware, Devuan etc. No systemd!
Posts: 368

Rep: Reputation: 66
Rescue Grub Flashdrive for UEFI or Legacy.

Hi,

I personally don't really like Boot-Repair and prefer to use my own methods. I've reposted this from another forum.. Yes, it is my post!!
You can create this flashdrive using a Linux Mint live system. Once your system has booted, you can use the normal system tools to repair your Grub installation. All you need is the UUID of your Linux filesystem and the full filenames of your kernel & initrd.
Note: if your system doesn't use an initrd, then you'll need to use the partition UUID (instead of the filesystem UUID) on the kernel load line in your grub.cfg. Just ask here if you need specific details.


Rescue Grub Flashdrive for UEFI or Legacy.


Useful for those who dual boot with Windows.

Typical Uses: For when your computer now only boots into Windows. You cannot boot Linux.
Or, you have managed to damage your EFI partition contents.
It might be an idea to create a flashdrive **before** any Windows update borks Grub..

This creates a simple flashdrive boot device. Allows a booting choice of either using your system's 'grub.cfg' or a direct kernel boot.

It's often easier to fix Grub problems from within a running system.

Install UEFI and Legacy Grub to a flashdrive
:

Format a flashdrive to fat32 and set the 'boot' and 'esp' flags. Note: Don't use GPT here. Use Gparted for everything.

I'll assume here that your flashdrive is seen as 'sda'. Use 'fdisk -l' to check.

Install UEFI & Legacy Grub:

EDIT: You may need to install these Grub packages into your Live system.. These will be lost on a reboot!!

Code:
sudo su
mount /dev/sda1 /mnt
grub-install --boot-directory=/mnt/EFI/boot --efi-directory=/mnt --target=x86_64-efi /dev/sda
grub-install --boot-directory=/mnt/EFI/boot --target=i386-pc /dev/sda
sync
exit
sudo xed /mnt/EFI/boot/grub/grub.cfg
Copy & paste the following sample 'grub.cfg':
You'll need the filesystem UUID of your Linux installation and the full filenames of your kernel & initrd.

You can create a text file containing these using:

Code:
blkid > myFilenames.txt
ls /boot/vmlinuz* >> myFilenames.txt
ls /boot/initrd* >> myFilenames.txt
Copy & paste the required UUID, kernel and initrd names. I recommend that you use the full kernel/initrd name, just in case the local kernel & initrd symlinks are incorrect. There is an entry here which should help when you've forgotten to update this 'grub.cfg' after upgrading your kernel.
The full kernel and initrd file names are similar to: 'vmlinuz-5.11.16-051116-generic' and 'initrd.img-5.11.16-051116-generic'.

Sample 'grub.cfg' using an example UUID and kernel/initrd names.

Code:
menuentry "Boot using the system's grub.cfg." {
    search --set=root --fs-uuid e8ab7adf-e4b4-43cc-8c43-bbef6d53f6f1
    set prefix=($root)/boot/grub
    configfile $prefix/grub.cfg
}

menuentry "Direct kernel boot." {
    search --set=root --fs-uuid e8ab7adf-e4b4-43cc-8c43-bbef6d53f6f1
    linux /boot/vmlinuz-5.11.16-051116-generic root=UUID=e8ab7adf-e4b4-43cc-8c43-bbef6d53f6f1
    initrd /boot/initrd.img-5.11.16-051116-generic
} 

menuentry "Direct kernel boot. Kernel & initrd symlink" {
    search --set=root --fs-uuid e8ab7adf-e4b4-43cc-8c43-bbef6d53f6f1
    linux /boot/vmlinuz root=UUID=e8ab7adf-e4b4-43cc-8c43-bbef6d53f6f1
    initrd /boot/initrd
}
Save and exit.

Unmount the flashdrive with:

Code:
sudo umount /mnt
This should be enough to boot your system.

Bodge99.

Last edited by bodge99; 11-28-2022 at 02:01 PM. Reason: Clarification
 
Old 11-28-2022, 03:49 PM   #4
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,355

Rep: Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591Reputation: 1591
Boot the live linux mint, with gparted format nvme0n1p1 to fat32 and flag esp, delete the window partitions nvme0n1p3 and nvme0n1p4. Afterwards close gparted reboot and reinstall windows in the empty space.
After installing windows reboot the live linux mint iso and open a terminal
Code:
sudo mount /dev/nvme0n1p5 /mnt
sudo mkdir /mnt/boot/efi
sudo mount /dev/nvme0n1p1 /mnt/boot/efi
sudo grub-install --boot-directory=/mnt/boot --efi-directory=/mnt/boot/efi --target=x86_64-efi --bootloader-id=garuda
sudo grub-install --boot-directory=/mnt/boot --efi-directory=/mnt/boot/efi --target=x86_64-efi --removable
exit and reboot. You should be able to boot into linux in uefi mode.
Boot Garuda in uefi mode, mount the efi partition to /boot/efi and run update-grub to add windows to the grub boot menu

Last edited by colorpurple21859; 11-29-2022 at 09:26 AM.
 
Old 11-28-2022, 04:07 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Note this is a duplicate thread - sure to lead to even more confusion. Reported for possible merging.
 
Old 12-06-2022, 04:58 PM   #6
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602

Rep: Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

https://www.linuxquestions.org/quest...0/#post6394570
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
When They Killed JFK They Killed America-Paul Craig Roberts cousinlucky General 11 05-15-2016 10:02 PM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
tried to delete linux partition. restart grub loading stagel1.5. grub loading, please aknntharnld Linux - Newbie 8 12-04-2009 06:51 PM
GRUB Loading starge 1.5... GRUB Loading please wait ERROR 21 davidjames Linux - Newbie 2 03-03-2008 10:01 AM
find history of a job killed by "kernel: Out of Memory: Killed process" poulacou Linux - Server 3 09-20-2007 04:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Laptop and Netbook

All times are GMT -5. The time now is 06:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration