How to Reinstall GRUB | Repair Boot on Linux

Поделиться
HTML-код
  • Опубликовано: 27 янв 2024
  • In this video, I show you how to reinstall the GRUB bootloader when it breaks. This could happen if you are dual-booting Windows and Linux, and Windows overwrites GRUB with it's own bootloader, or if you did something to break GRUB and make your system unbootable.
    If the damage to your GRUB is only minor (e.g. a missing grub.cfg file), you can skip to 4:41.
    If you find this method confusing, here's an alternate method: • How to Reinstall GRUB ...
    Prerequisites:
    1. A Linux install media (any GRUB-based distribution with a live ISO should do)
    THAT'S IT!
    Commands to reinstall GRUB (from a live ISO):
    List devices and partitions: sudo fdisk -l
    Mount root partition: sudo mount /dev/sdXY /mnt (example: sudo mount /dev/sda3 /mnt)
    Mount boot partition (if applicable): sudo mount /dev/sdXY /mnt/boot (example: sudo mount /dev/sda2 /mnt/boot)
    Mount EFI System partition (if applicable): sudo mount /dev/sdXY /mnt/boot/efi (example: sudo mount /dev/sda1 /mnt/boot/efi)
    Reinstall GRUB: sudo grub-install --root-directory=/mnt /dev/sdX (example: sudo grub-install --root-directory=/mnt /dev/sda)
    Commands to boot from GRUB console:
    List devices & partitions: ls
    Set root partition: set root=[partition] (example: set root=(hd0,gpt3))
    Specify vmlinuz file and root partition: linux [vmlinuz file] root=/dev/sdXY (example: linux /boot/vmlinuz root=/dev/sda3)
    Specify initrd image: initrd [initrd image] (example: initrd /boot/initrd.img)
    Boot the system: boot
    *Don't forget to run "sudo update-grub" from within your Linux installation after doing this!*
    Other commands used in this video:
    List partition UUIDs: lsblk -o uuid
    Edit fstab file (from a live ISO): sudo nano /mnt/etc/fstab
    Join this channel to get access to perks:
    ruclips.net/user/drewhowdentec...
  • НаукаНаука

Комментарии • 90

  • @DrewHowdenTech
    @DrewHowdenTech  2 месяца назад +1

    If you find this method confusing, here's an alternate method: ruclips.net/video/FIAxzzE45Sg/видео.html

  • @alreaud
    @alreaud 3 месяца назад +2

    Excellent, thank you for your help. It's funny, my problem would have been resolved with "sudo update-grub", LOL! 🤷‍♂

  • @maxmeyer74
    @maxmeyer74 4 месяца назад +2

    Thank you fixed my problem 😊

  • @user-su4qi7dg7k
    @user-su4qi7dg7k 16 дней назад

    Thank you, bro. That help me a lot!😊

  • @dtcyhk
    @dtcyhk 4 месяца назад +2

    You are excellent !!

  • @marwanshamso1518
    @marwanshamso1518 Месяц назад +1

    Bro i really love you ❤❤ this worked for me ❤❤

  • @westonmook7280
    @westonmook7280 29 дней назад

    It worked! TY sm my parrot home was acting up.

  • @blueboy4625
    @blueboy4625 5 месяцев назад +3

    Great way of showing how to fix the mess of complexity that is grub. 😂

  • @jonathanedwardgoode
    @jonathanedwardgoode 3 месяца назад

    When I do ls (hd0, gpt5)/ (the partition that I installed the distro on) it just gives me, /efi , loader/ , *series_of_numbers_and_letters. Is there any advice you would recommend.
    I have a multiboot system with three linux distros, and I thought I could just switch a new one in for one of them, and then grub-update, but whenever I try to boot into it it just says "error: no such device, unknown file system, you need to load the kernel first"

    • @DrewHowdenTech
      @DrewHowdenTech  3 месяца назад +2

      Looks like that's your boot partition. Do you have your vmlinuz and initrd.img files in here? If so, "set root=(hd0,gpt5)", then, when specifying your vmlinuz and initrd.img files, use /vmlinuz and /initrd.img, respectively.
      NOTE: Your "root" under "linux /vmlinuz root=/dev/sdXY" needs to be set to the root partition of the distro that you want to boot; NOT your boot partition.

  • @AllanNguyen-e4v
    @AllanNguyen-e4v 3 дня назад

    In my boot file, there is no "vmlinuz", so i'm not entirely sure where to go from there. I've read on some forums of people saying to install "boot repair"? Any inputs or thoughts on what I should do?

  • @sianocelot
    @sianocelot Месяц назад +1

    tysm

  • @mabyes
    @mabyes 3 месяца назад

    Hi, 😊
    I followed from 4:41 , updated grub and after rebooting, the grub bash appeared. I didn't followed from 8:58 because you say: "if you are prompted to emergency mode" which is something I am not. I just went into the same window from 4:41 again.
    I tried reinstalling again but all that happens is that another partition is created with the same error.
    Do you have some advice or documentation that could kindly share, please? 🙏

    • @DrewHowdenTech
      @DrewHowdenTech  3 месяца назад +1

      What’s the output of “sudo update-grub”?

  • @mimeanalytics4331
    @mimeanalytics4331 5 месяцев назад +2

    Ah, I wish I watched that about a month ago when my Fedora crashed.

  • @luigiprovencher8888
    @luigiprovencher8888 Месяц назад

    Okay. So what are the commands if you have a separate boot partition like you would if you have installed LMDE6?

    • @DrewHowdenTech
      @DrewHowdenTech  Месяц назад

      When reinstalling GRUB, only difference is that, in addition to mounting your root and EFI System partitions, you also have to mount your boot partition at /mnt/boot (after mounting your root partition, but before mounting your EFI System Partition).
      When it comes to booting your system after reinstalling GRUB, here are the key differences:
      1. "set root=[partition]" is your boot partition, not your root
      *"root=/dev/sdXY" in the "linux" command is still your root partition!
      2. Your vmlinuz and initrd.img files are at the root of your boot partition (so you would use /vmlinuz or /initrd.img instead of /boot/vmlinuz or /boot/initrd.img)

  • @Dviih
    @Dviih 5 месяцев назад +1

    I’m not a grub hater but since I moved to systemd-boot I never had problems with bootloader and pretty much anything else since it used to be only grub to break sometimes

  • @wiltzie75
    @wiltzie75 4 месяца назад

    I can only boot to grub and I can successfully run set root=(partition) and when I get ls /. I see my drive. When I try to run linux /boot/vmlinuz I don't have anything in the /boot folder. Is there a way to fix this?

    • @DrewHowdenTech
      @DrewHowdenTech  4 месяца назад +1

      If you boot folder is empty, that means that you probably have a separate /boot partition. Set your root to that partition.
      NOTE: "root=/dev/sdXY" (when specifying your vmlinuz file and root partition) still needs to be your actual root partition.

  • @abinashdewri2682
    @abinashdewri2682 Месяц назад

    I have dual boot of windows and kali linux, and I'm not even able to open linux to do what u suggested. Whenever i select linux, grub enters rescue mode. But im able to open the windows partition. What should i do?

    • @DrewHowdenTech
      @DrewHowdenTech  Месяц назад

      You will need to use a Linux live media from here.

  • @REZAZIMohamedabdessamed
    @REZAZIMohamedabdessamed 3 месяца назад

    My root partition is /dev/nvme0
    In the last step, when I type "boot", the system tries to boot and it gives error: "Alert! /dev/nvme0 does not exist. Dropping to a shell!". In the given shell when I do ls /dev/, I can find my nvme0. What to do?

    • @DrewHowdenTech
      @DrewHowdenTech  3 месяца назад +1

      Are you sure you have the right ROOT (not boot) partition? You can check this with a Linux install media using a partition manager (such as GParted) or the "sudo fdisk -l" command.
      REMEMBER: You are specifying a PARTITION, not a device.

  • @old486whizz
    @old486whizz 5 месяцев назад +1

    So at 4:42, it would be far better just to do a couple of bind mounts, chroot into /mnt, then run the grub config/grub install command to get things to work on your reboot.. no need to muck about with anything else after

    • @DrewHowdenTech
      @DrewHowdenTech  5 месяцев назад +3

      You could also do that. I just wanted to show how to boot from the GRUB console (in case a user had only minor damage to their GRUB that didn't necessitate a full reinstall). As well, by the time I found that out, I had already tested this method and ensured that it works with all the major Linux distributions.

  • @danlarch3560
    @danlarch3560 2 месяца назад +1

    I followed all the steps and I still get put into a grub menu(no recovery mode). UUID is reset and still did nothing. Do you know what I have done wrong? OS is ubuntu.

    • @DrewHowdenTech
      @DrewHowdenTech  2 месяца назад +1

      You have to follow the instructions to boot with the GRUB command line.

    • @danlarch3560
      @danlarch3560 2 месяца назад

      @@DrewHowdenTech It was too far gone, I just wiped it completely, but thanks for the very helpful video!!

  • @ShreyPatel35
    @ShreyPatel35 Месяц назад

    After writing /boot/vmlinuz goot two files then i tried vmlinuz-6.1.0-21-amd64 root=/dev/sda2 then give putput as bad shrim signature what to do now ..any suggestions

    • @DrewHowdenTech
      @DrewHowdenTech  Месяц назад

      Go to your BIOS settings and disable secure boot.

  • @soundsandambientvideos380
    @soundsandambientvideos380 2 месяца назад +1

    How can you tell if you have a boot partition?

    • @DrewHowdenTech
      @DrewHowdenTech  2 месяца назад +1

      Check the output of "sudo fdisk -l". See if you have a much smaller "Linux Filesystem" (that's about 512 MB to 2 GB in size). If you don't recall creating it for some other purpose, it's likely a boot partition.
      You can check this by mounting the partition, and looking at it's contents--either through the command line, or graphically, if your live media has a GUI.

  • @nadooalaa1675
    @nadooalaa1675 3 месяца назад

    How can I know the root partition
    I tried something similar to yours but didn't work

  • @abdorouiss5279
    @abdorouiss5279 3 месяца назад

    I am running a dual bootable windows and ubuntu. Sometimes when I boot my system it gives me Grub so i had to reboot again again untill it runs.
    Is this method gonna work ? Thank you

    • @DrewHowdenTech
      @DrewHowdenTech  3 месяца назад +2

      Do you get the GRUB menu with your Ubuntu and Windows options?

    • @abdorouiss5279
      @abdorouiss5279 3 месяца назад

      Ubuntu

    • @DrewHowdenTech
      @DrewHowdenTech  3 месяца назад +1

      Does your GRUB menu show a "Windows Boot Manager" entry?

  • @sulaksana1626
    @sulaksana1626 16 дней назад

    hi currently i am facing this problem but i use pop os can i use the same way and is pop os use vmlinuz too ?

    • @DrewHowdenTech
      @DrewHowdenTech  16 дней назад

      Pop!_OS doesn’t use GRUB, but instead something called systemd-boot, so I don’t think this method will work, but you can try it anyway.

    • @sulaksana1626
      @sulaksana1626 16 дней назад

      @@DrewHowdenTech ohh, i use dual boot win and pop os, yesterday i switched to win via bios but then when i am back to pop os the gnu grub rescue appears, i want to try with initrd like your vid but the problem i don't know my linux kernel version and how to check linux kernel in the gnu grub rescue, i have try use tab auto complete but it's doesn't work

    • @DrewHowdenTech
      @DrewHowdenTech  15 дней назад

      If it says “grub rescue” and not just “grub”, you will need to reinstall GRUB using a Linux installation media.

  • @Ruiz.Senior
    @Ruiz.Senior 6 дней назад

    I haven't de efi folder, should I create it?

    • @DrewHowdenTech
      @DrewHowdenTech  6 дней назад

      If you don’t have an EFI System partition, no.

  • @antiherosandwich
    @antiherosandwich 4 месяца назад +1

    My problem is that my "boot/" is in my @/ subvolume, so it fails when i do your "linux /boot/vmlinuz" - is there are way to go about that?

    • @DrewHowdenTech
      @DrewHowdenTech  4 месяца назад +1

      What is the output of “sudo fdisk -l”.

    • @antiherosandwich
      @antiherosandwich 4 месяца назад +1

      @@DrewHowdenTech I'm using the second method since my screen only showed "Grub" - no the live environment.

    • @DrewHowdenTech
      @DrewHowdenTech  4 месяца назад +1

      Okay, what’s the output of “ls”?

    • @antiherosandwich
      @antiherosandwich 4 месяца назад +1

      @@DrewHowdenTech ls lists my partitions. My root partition is (hd1,gpt2). But when i do "ls (hd1,gpt2)/" ....it shows the folders of "@/ and @home/" - these 2 folders are my Fedora subvolumes... and the "boot/" folder is inside the "@/" for me, (unlike yours that is directly outside disk and can be accessed with "linux /boot/vmlinuz" - for me, i can't do that command because my boot is inside that @/ subvolume.

    • @DrewHowdenTech
      @DrewHowdenTech  4 месяца назад +1

      Then you would set root to “(hd1,gpt2)/@/”.

  • @wonderful9492
    @wonderful9492 Месяц назад +1

    hi, that is an excellent video. one superficial comment, is watching the vid full screen, the shell commands put near the low edge of the video are obscured a bit by the RUclips video controls! I think it would be better to keep shell commands higher up in the video!
    I will watch the alternative method later, as I want to reconstruct a dual boot for win10 + win11 + Linux_mint, starting from a reformatted EFI partition.
    where I have watched another vid about doing the win10 + win11 loading, where I will do that first, then try to do the Linux mint loader.
    now one bit which puzzled me in this video here, is where he talks of a boot partition versus a root partition, where I am not 100% sure which I will have!
    the partition I wish to construct a triple boot loader for win10, win11, Mint, is called "EFI system partition" on GParted on Mint, and is about 100MB, where it is created when I install win10 or win11 to a brand new drive. but I then will reformat that to the same FAT32, and use bcdboot to make it a loader for each win OS partition. I tried this making it a loader for 4 windows installs, win10 + win11 on the same disk, and win10 + win11 from another disk.
    the plan then is to try and put a LInux boot loader to this also, which possibly loads as a different bootloader
    there is a little bit of confusion, so any clarification would be appreciated.

    • @DrewHowdenTech
      @DrewHowdenTech  Месяц назад

      Use the "sudo fdisk -l" command to figure out if you have a /boot partition.
      If you have a second "Linux Filesystem" that's about 512 MB to 4 GB in size, that's probably a /boot partition.
      If you're still unsure, mount your root partition, then do "ls /mnt/boot". If it doesn't output anything--meaning that your /boot directory is empty--you have a separate /boot partition.

    • @wonderful9492
      @wonderful9492 Месяц назад

      @@DrewHowdenTech thanks for the reply, I have made a note and will have to experiment a bit, I am going to install the cinammon edge Linux Mint, and I want to be able to reconfigure different ways.
      earlier when I installed Linux Mint 21.1 after installing win10 and win11 to a disk, the UEFI boot menu showed a windows loader, and a loader called Ubuntu,
      where if I booted with the windows loader, I just got the windows installs, although if I went through the links something like "change default OS", I eventually got to the ubuntu option from the windows options,
      on the linux side, if I booted from the Ubuntu bootloader, I got Linux Mate, and an option for windows where clicking that continues the boot to the windows loader with the windows installs.
      I was wondering where that ubuntu bootloader is situated? is it on a partition, or is it on the disk outside the partitions in some metalevel area of the sectors?
      I know that if I do a sector by sector copy, that everything works like the original disk, so everything is there at the sector level.
      now I got painted into a corner, and have been reinstalling everything from scratch, and from a video on Windows, I can reconstruct the windows loader from scratch, by loading the windows 10 installer, selecting repair, then troubleshoot and getting to the command prompt.
      from that if I run diskpart, then "list vol", the partition which appears on Linux GParted as "EFI system partition" at the left of the drive, which is about 100MB and FAT32, say it is volume 8, and say letter X isnt in use, and say the other windows OSes are on T: U: V: W: where I study on GParted earlier to be really sure what is where, including the commands so far and then further commands that is:
      diskpart
      list vol
      sel vol 8
      assign letter=X
      exit
      C:
      format X: /fs:fat32
      bcdboot T:\windows /s X: /f UEFI
      bcdboot U:\windows /s X: /f UEFI
      bcdboot V:\windows /s X: /f UEFI
      bcdboot W:\windows /s X: /f UEFI
      where I have reformatted the bootloader partition and then constructed it from scratch to load 4 windows OSes here, which can be on different disks, in my case 2 on the same disk as X: and 2 on another disk,
      if I reboot now with the loader for the disk with X, I get to a windows bootloader with W, V, U, T with the last one as the default OS. each windows install might use totally different drive letters, those are only meaningful for the session, not afterwards or before.
      if I now install Linux, this will probably extend the arrangement, where I might get an Ubuntu bootloader, and can either boot to that and then on to the above windows, or I can go via the windows loader of the disk of X,
      but the problem is if I want to rejig the windows bootloader later, the reformatting might get rid of the Ubuntu loader, so I need to be able to reconstruct a bootloader for Linux, last time I installed Linux Mint 21.1, but this time I will install cinammon edge,
      I dont know if this makes sense to you?
      right now I have 4 installs of windows, with win10 + win11 on one disk, and win10 + win11 on the other disk, the latter disk is scratch installs to experiment with, and I am going to install Cinammon edge to the latter disk, but as an experiment I want to redo the bootloader of the latter disk from scratch by the MO mentioned earlier for the windows side with 4 windows OSes like in the example above, and I then need a bootloader for cinammon edge, which is why I was watching your video, and I meanwhile watched your other video. Linux installs to whatever partition I select, but I think there must be other stuff going on for the bootloader, not sure where!
      also I dont know if I can give the linux volume for bcdboot above, or is that too optimistic?
      I think with your 2 videos, /mnt will be the partition I install Linux to, and the "EFI system volume" probably /mnt/boot/efi
      I noticed that in your vid here it says "os-prober will be executed to detect other OSes...." but in your alternative video, it says os-prober will not be executed to ....!
      so maybe the MO here is better, as it will deal with say windows OSes.

    • @DrewHowdenTech
      @DrewHowdenTech  Месяц назад

      I think you could include Linux in bcdboot. I would personally prefer to use GRUB.
      You may need to add the “GRUB_DISABLE_OS_PROBER=false” line to your /etc/default/grub file. If you selected the “install alongside” option when installing Linux, this should be done automatically.

    • @wonderful9492
      @wonderful9492 Месяц назад

      @@DrewHowdenTech
      ok, cool! will try that!
      apologies for the delay in replying, but I was doing major backups before the experiments, and then did the Linux Mint 21.3 cinammon edge install, the try without installing DVD takes a long time to load, redid it as BDR, and also took at least 15 mins! but on installing, it loads super fast.
      now I have taken photos of the partition structure before and after installing Cinammon edge from both GParted and the installer, as I dont know where to paste screengrabs to with Gparted and not sure if I can do screenshots during installation, so I go old school with a camera!
      where I started with a blank disk, and then installed win10 to the leftmost partition, where the installer puts 2 partitions automatically to the left of it, then installed win11, according to GParted I get partitions thus:
      EFI system partition fat32 100 MB boot,esp
      Microsoft reserved partition unknown filesystem 16MB msftres (=Microsoft reserved)
      Basic data partition ntfs 309.85GB 118.29GB used, msftdata (=Microsoft data)(64 bit win10 install)
      unlabelled ntfs 546MB 457.85MB used, hidden diag, according to the windows desktop this is a recovery partition
      Basic data partition ntfs 310.5GB, 62.25GB used, msftdata (64 bit win11 install)
      I now via the earlier diskpart, bcdboot, format instructions, reformat the EFI system partition, and reconstruct it as a new bootloader for these win10 + win11 installs, and also a further 2 from the other disk.
      I now go to install cinammon edge, which I think took about 54 minutes to do,
      with this I have to select a partition to install to, and also select "Device for boot loader installation" and this shows all disks and partitions as options, eg it will say have /dev/sda as well as /dev/sda1 /dev/sda2 etc.
      so I decided to play it safe and create a new partition for the boot loader which was 100MB, and 102400MB for the Linux install, both ext4 filesystem, and consecutive to the above list of partitions,
      I also have to give a mount point, guessing now I put a fictional /myboot for the boot loader which was /dev/nvme1n1p6 and a fictional /mylinux for the install partition which is /dev/nvme1n1p7
      but the installer gives an error message "no root file system is defined", reading this from my photos!
      so I redid the install partition mount point as /
      and left the bootloader one as /myboot
      and then continued the installation, and no problem, and the PC's UEFI bootlist now has a boot loader called
      "ubuntu (M2_3 : Samsung SSD 990"
      (no closing bracket!)
      and if I select that, Linux Mint boots super fast in less than a minute from the grub menu.
      now I dont know if you can make sense of that, and whether my naming the bootloader partition as /myboot means I have to mount other than the /mnt or /mnt/boot/efi given in your vids?
      I have done a sector backup of the entire disk via dd and gzip, namely:
      sudo dd if=/dev/nvme1n1 | gzip -c >> /media/mint/somedrive/backup.gz
      so I can experiment without risk,
      the plan is to do the earlier diskpart and bcdboot etc things again, and to try the linux as a further option with bcdboot,
      but I dont know which partition I should give bcdboot?
      /myboot or / above?
      where you say you prefer to use GRUB, I would like to go bothways! I prefer the Linux shell, as it has all kinds of sneaky tricks eg treating disks and partitions as if they were files eg the dd command above,
      ie a grub loader and also a windows loader,
      just so I can deal with any circumstance, and also out of curiousity.
      on the GRUB side, if I reformat the EFI system partition again, and then put win10 + win11 + win10 + win11 + Linux, will the ubuntu loader be unaffected because I designated a partition /myboot for the boot loader?
      also if instead I had put a disk for the bootloader rather than a partition, eg say
      /dev/nvme1n1
      for the bootloader,
      would reformatting the EFI system partition disrupt the ubuntu loader?
      as mentioned I am trying to understand things both ways, both from the Linux side, and from the Windows side, and from the Linux side the bootloader at the disk and also instead the bootloader at a partition.
      I am kind of winging it, guessing a lot and relying on error messages, and ultimately relying on a sector backup if things go to pot!
      some weeks ago experimenting, I put 2 Linux Mint 21.1 installs with bootloader at the disks, and noticed that the grub loader had both installs there to select from.
      now later on as an experiment I deleted one of those 2 installs, and noticed that the grub boot no longer worked, where I think I got a grub> menu, not sure if I photographed it.
      if I follow the MO in your video where there is more than one Linux install, will the GRUB menu show both the way it does if I install directly?
      if not, is there an MO to get both?
      would maybe the os-prober fish out all the Linux installs and put them on the reconstructed GRUB menu.
      apologies for asking so many questions!

    • @DrewHowdenTech
      @DrewHowdenTech  Месяц назад

      Linux always stores it's boot files in /boot. /myboot means nothing to Linux! So if you use /myboot as a mount point during installation, it will just leave that partition untouched, and place your boot files in /boot, on your root partition.
      Linux also stores boot files on your EFI System Partition (in addition to the /boot directory). It has to in order for it to be bootable on a UEFI system. So yes, reformatting your EFI System Partition will disrupt Ubuntu.
      If you install multiple Linux distributions the way I did in that video, yes, GRUB should should give you options for both distros as well as Windows.

  • @geetchavan9749
    @geetchavan9749 Месяц назад

    Hey it is showing that there is vmlinuz file not found what to do currently i am using ubuntu

    • @DrewHowdenTech
      @DrewHowdenTech  Месяц назад

      Are you sure you set the right partition as your "root?" What is the output of "ls /"?

    • @geetchavan9749
      @geetchavan9749 Месяц назад +1

      @@DrewHowdenTech actually when I have installed ubuntu my laptop was glitching and some files haven't downloaded properly i think i need to reinstall it

    • @DrewHowdenTech
      @DrewHowdenTech  Месяц назад +1

      That’s probably it.

  • @kiddo2002
    @kiddo2002 4 месяца назад +1

    Buddy i am stuck with Parrot OS installation on Live USB
    Please make a separate video on it

    • @DrewHowdenTech
      @DrewHowdenTech  4 месяца назад +2

      This method should work on Parrot OS as well.

    • @kiddo2002
      @kiddo2002 4 месяца назад

      @@DrewHowdenTech Not working Buddy

    • @DrewHowdenTech
      @DrewHowdenTech  4 месяца назад +2

      Where are you having trouble?

    • @kiddo2002
      @kiddo2002 4 месяца назад +1

      @@DrewHowdenTech Grub can't read files in USB
      But when i open usb in windows... every needed file is present there

    • @DrewHowdenTech
      @DrewHowdenTech  4 месяца назад +2

      Are you having trouble with the Live USB itself?
      This video is meant to cover INSTALLED versions of Linux. If you are having trouble getting a live media to boot, I would suggest remaking it.

  • @sumayaali689
    @sumayaali689 2 месяца назад

    When I do (hd0,gpt3)/ it says unknown filesystem

  • @nadooalaa1675
    @nadooalaa1675 3 месяца назад

    When I try to enter linux /boot/vmlinuz it says that it is not found what should I do

    • @nadooalaa1675
      @nadooalaa1675 3 месяца назад

      I am dual booting my device if that helps

    • @DrewHowdenTech
      @DrewHowdenTech  3 месяца назад +1

      What is the output of "ls /"?

    • @nadooalaa1675
      @nadooalaa1675 2 месяца назад

      The same as the video , i think i messed up in the sda3 part

    • @DrewHowdenTech
      @DrewHowdenTech  2 месяца назад

      Does it show a "boot" directory?

  • @cybernit3
    @cybernit3 2 месяца назад +1

    I installed Ubuntu 24.04 and I rebooted then only gets to GRUB Rescue screen. I tried to list the root directory
    grub> ls (hd1,gpt2)
    error: unknown filesystem
    I run Windows 11 on hd0 and Ubuntu on hd1. So, I tried booting into Windows 11..then switch to run Ubuntu... then stopped working; I think Microsoft Windows deliberately corrupts GRUB for Linux.
    From the GRUB Rescue I tried:
    set prefix = (hd1,gpt2)/boot/grub
    set root = (hd1,gpt2)
    insmod normal
    normal
    Ok, it doesn't boot up Ubuntu and just return to GRUB rescue prompt... grub>
    I just wanted to try out this new Ubuntu, and I am frustrated.
    Thanks if anyone can help...

    • @DrewHowdenTech
      @DrewHowdenTech  2 месяца назад +3

      As stated in this video, if the prompt says “grub rescue” and not just “grub”, that means that your GRUB is broken beyond repair. In that case, you will need to reinstall GRUB entirely, using a live ISO (as shown in this video), THEN boot with the GRUB prompt.
      If you find this method confusing, read the pinned comment.

    • @cybernit3
      @cybernit3 2 месяца назад +1

      @@DrewHowdenTech Well this morning I saw your videos and tried this recent 2nd method by Tryout ubuntu then mount and then chroot. But I couldn't even mount my SSD gives me NTFS is invalid error. So I thought just try reinstall Ubuntu 24.04 LTS and it seems it works. The 1st time I installed Ubuntu I then booted into Windows 11 and used disk part which showed me very old partition list; I assume this is maybe why it corrupted the new ubuntu ssd. I also tried Windows Disk Management (newer one) and it showed the new Ubuntu paritions. That is maybe one reason Windows corrupted the SSD. Or when I select boot from the bias but didn't swap the Ubuntu and Windows SSDs boot priority.
      I tried doing some tests; just boot into Windows and Ubuntu, and doesn't seem to corrupt. I am also concerned if I do a Windows Update it might ruin the Ubuntu SSD.
      Thanks for teaching about chroot fix method, might come in handy in the future.

  • @texmex6083
    @texmex6083 Месяц назад

    I did this and I got unknown filesystem

    • @texmex6083
      @texmex6083 Месяц назад

      And it's a endeavorOS installation and dual booting on separate drives

    • @DrewHowdenTech
      @DrewHowdenTech  Месяц назад

      I would be curious to see how the drive and its partitions show up in GParted, but you may have a corrupted filesystem.
      It’s also possible that you simply selected the wrong partition. Run sudo fdisk -l again.

  • @aastharawat0409
    @aastharawat0409 3 месяца назад

    I am stuck at black screen grub menu from 2 days straight after watching this tutorial. i hit the same command in ubuntu terminal ( sudo rm -rf /boot/grub , then (reboot) ) and in [ grub> linux /boot/vmlinuz ] , it is displaying [ error : file' /boot/vmlinuz' not found. ] .........I even tried [ grub> linux /boot/vmlinuz-linux]

    • @DrewHowdenTech
      @DrewHowdenTech  3 месяца назад +2

      That part of the video was me BREAKING my GRUB, to illustrate what scenario this video was meant to cover. I specifically said "you don't want to do this" as I was running it (in my virtual machine, for what I hope are obvious reasons).
      At this point, as shown in this video, nothing you do on that screen will do much of anything--since you just deleted your bootloader--so you're gonna have to follow the instructions in this video to completely reinstall GRUB, starting at 1:53.

  • @MrBobWareham
    @MrBobWareham 2 месяца назад

    If I could get into Linux Mint then I would not need to repair grub but that is the problem grub is damaged so I cant get in to repair!!

    • @DrewHowdenTech
      @DrewHowdenTech  2 месяца назад +1

      You need to use a Linux install media to reinstall GRUB.

  • @Muhaiminul_coding_club
    @Muhaiminul_coding_club 17 дней назад

    holllllllllllllll