#Can't boot linux due to grub failing
209 messages · Page 1 of 1 (latest)
If you have a live USB, you could try reinstalling GRUB (assuming it's just a grub issue)
i have an arch live usb
What do i do now, bite the bullet?
i don't wanna lose all my data on my drive
when i turn secure boot this shows up and i just type "exit" and log on to windows
go into the livo iso, mount your partitions and try to reinstall grub
not too familier with that
- When i typing this the only 2 results where gpt1 and gpt5
and it said that they were fat formats
is this normal
would this corrupt my files
#18417 📣 1. Boot your PC into the ISO
2. Run:
lsblk -fs
-# this should show the available drives, partitions, their size and the FS on them. Use this to figure out what drive/partition your / is located on.
3. Run:
mount /dev/root_drive /mnt
-# replace /dev/root_drive with the path to your root partition you identified in step 2.
4. Run:
arch-chroot /mnt
-# this will let you puppeteer your system without actually booting it.
5. Run:
mount -a
-# this will try to mount everything configured in your systems fstab.
on my arch installation
all this is doing is putting you back into your system so that you can fix things
once you do it reinstall grub and then regenerate the config
i have a confession
don't remember my partition names
it is prob nvme0n1p5
fat 32 is prob it right?
nvme0n1p5 is your efi partition, nvme0n1p6 is your root partition and nvme0n1p7 is your swap
did you not make a home partition
you would mount the root like mount /dev/nvme0n1p6 /mnt
huh maybe the swap isn't even for linux since you have a windows partition right after it
nvm it's for linux
can you elaborate a little more
I did make swap and efi partitions
and root
yes
yes
so unless you don't have space for it normally you make a home partition which has all of your desktop and config files etc
without one everything is together
so this is my root where programs get installed
and inside is the home (which I have a separate parition for), where all of my other files live like games, dotfiles, etc
otherwise your root folder would be pretty cluttered with everything else
sorry if the explanation wasn't the best i gotta sleep...
Gn that you so much
Ic yes that do exist
hmm now i can't download grub, very interesting
it tells me that it can't find efi directory
You didn't mount
Mount your root and check the fstab for where you mount your esp
That's the root partition
ok and
.aw fstab
You don't download anything to install grub since you already have the grub package
what do i do then
... chroot
#18416 📣 1. Boot your PC into the ISO
2. Run:
lsblk -fs
-# this should show the available drives, partitions, their size and the FS on them. Use this to figure out what drive/partition your / is located on.
3. Run:
mount /dev/root_drive /mnt
-# replace /dev/root_drive with the path to your root partition you identified in step 2.
4. Run:
arch-chroot /mnt
-# this will let you puppeteer your system without actually booting it.
5. Run:
mount -a
-# this will try to mount everything configured in your systems fstab.
Once you've chroot'ed into your system, it's something like
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
this may look different depending on your setup and BIOS/UEFI
Just note that you'll need to mount not just your root partition, but also your /boot partition before running this.
It's basically the same process you went through to install Arch for the first time. You can use the part in the Arch wiki installation guide about mounting your / and /boot drives, and then skip to the part about installing grub on them.
Depends on the esp mount point
did u recently do a windows update(thats my first idea, so we know the cause)
my windows did update yes
i woke up and found it updating shit ass microsoft bro
i suspected that would be the problem but i had no proof
yep it prolly deleted your bootloader
thats why they say put windows on another ssd
A different drive is not necessary, separate ESPs for linux and windows is enough
hmm
so ill try mounting again and downloading grub
but if the same issue faced me ill talk to you guyz
You don't download grub, you already have it since you already installed grub once
You install grub onto the esp(and or boot partition depending on the mounts)
Neither because what
.
.aw grub
@novel spear can you tell me what to do
I read it tho
which part specially do you want me to pay attention to
it want me to mount to esp
then choose bootloader identifier (Grub)
grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB
what is target
efi directory i know it
it should be this drive {nvme0n1p5}
Check your fstab
mount -a mounts using it
Can also use lsblk -f in the chroot after mount -a
Yup
how to check my fstab and what afterwards
I ma still leaning linux , iam an absolute newbie so i am sorry bare with me
.aw fstab
Install grub
But it doesnt want to
it says efi directory could be found
after i did mount
by mount -a
like you said
Use the flag
mount /dev/nvme0n1p6 /mnt arch-chroot /mnt mount -a
flag?
Did you read the previous messages in this thread?
You've already been told the correct invocation
yes i have
and i followed all steps and all roads lead the the same problem
efi not found
.
But your command doesn't include what is in the UEFI section on the grub page?
back to this
again what is target
because idk what does than mean
i just cited the efi directory for it to download sense the entire code i understood nothing from
and you keep telling to check fstab
https://man.archlinux.org/man/grub-install.8.en#target x86_64-efi is correct
i
understand
nothing
what does these dasshes and slashes mean in the command
it explains the termnologies
that is good
In Linux, the forward slash (
/) is the root directory (the top-level, main directory of the entire filesystem) and the directory separator used to navigate file paths. Every file and folder on a Linux system is nested underneath this root /.
-- indicates an argument, and so does - but - is used for single letters usually
while -- are for long args
Long arguments, or "long options," are command-line flags prefixed with two hyphens (e.g.,
--file) that provide descriptive, human-readable instructions to programs, often serving as aliases to short, single-letter options (e.g., -f).
so
--
are used to say smth like
--target
which i intruprted as "oh so i set the target here"
or --boot-directory
"I set the boot partition here"
is the boot is the root right?
did everything as said
Mounted and installed grub successfully
and it still tells me , grub rescue
with target and boot directory and stuff
hmmm
efi
in /boot there is efi and grub
which one
or /boot only works?
teach me bro you are telling someone to read in another language, i might pick up a word here and there but i am still clueless
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
In chroot after mount -a
then exit and reboot
Rught?
IT WORKED
Hell yeaaahhh
@novel spear I love you 🫶
I learnt alott
cool