• 0 Posts
  • 22 Comments
Joined 3 days ago
cake
Cake day: June 7th, 2025

help-circle













  • nanook@friendica.eskimo.comBanned from communitytoLinux@lemmy.mlSudden emergency
    link
    fedilink
    arrow-up
    2
    arrow-down
    2
    ·
    3 days ago

    @Attacker94 The boot block pointing to grub is what gets overwritten, grub itself in /boot/efi doesn’t. You can fix either though with either boot repair or boot from a usb thumb drive, mount the partitions on /mnt and subdirectories,mount --bind /dev /mnt/dev, /dev/pts /mnt/dev/pts, and then mount --rbind /proc /mnt/proc and /sys /mnt/sys, cp /etc/resolv.conf to /mnt/etc/resolv.conf, chroot to /mnt, and then grub-install /dev/sda or whatever the drive is. Not a big deal. And this only happens if you install Windows AFTER you have installed Linux.






  • nanook@friendica.eskimo.comBanned from communitytoLinux@lemmy.mlSudden emergency
    link
    fedilink
    arrow-up
    2
    arrow-down
    4
    ·
    3 days ago

    @just_another_person @Rubanski On most modern systems neither Windows nor Linux is going to hurt each other’s boot record because usually on a dual boot system you’re going to launch grub out of the boot block which is going to them find and mount the UEFI partition which is a fat-32 partition usually mounted on /boot/efi by Linux, and then grub is going to continue from a directory within /boot/efi, windows similarly will have a directory there, and grub if it finds both will present a menu at boot. Since both use separate directories on this UEFI System partition, one should not interfere with the other unless the partition is too small and you run out of disk space. I usually size my EFI partition at 512MB and that’s always been more than sufficient for multiple operating systems. If you re-install WIndows, it will overwrite the boot block with it’s own boot loader, but restoring it with grub will you back to where you were. If you are a real glutton for punishment, you can setup the Windows boot loader to chain load grub, this works as I have actually done it, more as a matter of curiosity than anything else. But I prefer to use Grub as the first boot loader as it’s faster and less prone to exploding.


  • nanook@friendica.eskimo.comBanned from communitytoLinux@lemmy.mlSudden emergency
    link
    fedilink
    arrow-up
    5
    arrow-down
    2
    ·
    3 days ago

    @Rubanski If it’s booting into emergency mode, there are usually one of three issues, kernel is corrupt, a file system can not be mounted read/write, and this can be because of file system corruption or in the case of mdraid, because a raid device failed to self-assemble, or initramfs is broken. The easy way to fix most of these is to use an automated utility called boot repair, you download the ISO then burn to a thumb drive, then when you run into this kind of problem boot off the thumb drive. I’d start by trying to determine which of these it is, if you get into emergency mode then you at least have a shell prompt, try typing dmesg to see if there are any errors relating to the kernel, then check if all of the partitions are mounted and if they are all mounted read/write. If one or more is mounted read only this usually means that the automatic fsck found errors it can not fix and needs a manual run, in which case try fsck -f -y /dev/sdxx or /dev/nvmexnxpx, which ever the case may be (hard drive verses SSD). If this was the issue after the fsck successfully repairs the file system you should be able to boot successfully. If not, and nothing kernel related shows up in dmesg, then probably your initramfs has gotten hurt. In this case since you are new to Linux, boot repair is the easiest way to fix it. You can also fix manually but that is more complex, however if you need instructions on how to do this let me know and I will elaborate. Even doing so manually though requires another bootable Linux media, does not have to be boot repair, a popos install USB will also do.