Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hey there, yesterday I installed Deepin and it completely wrecked my GRUB menu. Up until then I had Windows 10 installed in one partition and Bunsenlabs on the other without any issue. I installed Deepin on the Bunsen partition and choose to install GRUB on /dev/sda, and now I don't have any grub whatsoever so I'm stuck in a bootloop.
Unfortunately Deepin doesn't have a live CD, and I don't have a second computer in order to flash something like Grub Repair or another distro, so my question is if it's possible to do something from within Deepin's install command line (which I can access through Ctrl+alt+f). Also the installation doesn't give out much info so I'm not exactly sure why is it failing.
and comment out any lines with hidden in them and run update-grub
There is no file like that, but I do have a /etc/default/grub.d folder with some cfgs on it. Not sure if I should make a file with that name. Also I don't have the update-grub command.
Miss-read your first post. General directions on how to fix:
mount the deepin partition at /mnt
mkdir /mnt/boot/efi if it doesn't exist
mount the efi partition at /mnt/boot/efi
mount --bind /dev /proc /sys /run to /mnt/dev /mnt/proc /mnt/sys /mnt/run
chroot into /mnt
grub-install /dev/sda
update-grub
exit
unmount everything reboot
There are several how-to instructions on the web that give detail instructions on how
to re-install grub by chrooting into the system
Last edited by colorpurple21859; 09-14-2022 at 10:14 PM.
It matters how you installed Deepin. Most Win10 installations are done in UEFI mode. When this is true, Linux needs to be installed in UEFI mode as well. Is that what you did? If you did, directing Grub to /dev/sda was a big mistake. We can only guess what you did, and guessing usually isn't very helpful. Output from fdisk -l or parted -l would help. If either show you have an ESP partition, then the best way forward will probably be to start over installing Deepin, but this time ensuring its installer boots in UEFI mode. There are usually two ways to do that. 1-go into UEFI BIOS setup and disable legacy booting. Legacy booting may be labeled CSM. Booting only in UEFI mode per BIOS setup will ensure Deepin won't boot in legacy mode. The other way is to use your BBS hotkey during POST to bring up the BIOS' own boot menu, where you should be able to select booting Deepin in either UEFI mode or in legacy/CSM mode, and would need UEFI, unless Windows is not installed in UEFI mode.
Having a Legacy install of Deepin with an EFI install of windows will require you to access the BIOS firmware on boot to change systems. Grub legacy will not boot an EFI install of windows on the same drive.
The fact that you have no /etc/default/grub or grub.cfg file would indicate that the install of Grub was not successful so I would agree that the first steps to take are suggested above, post the output of fdisk -l or parted -l and mount the efi partition and post its contents by following the commands suggested in post 6 above. All these require root (sudo) permissions.
You may need to reinstall in EFI mode as suggested if you have no entry for Deepin in the efi partition.
No, Windows is not installed in UEFI mode, I should of have said that. Everything is on MBR mode. Also I don't see anything regarding these modes at installation, it didn't make me chose. Maybe it's installing on UEFI mode instead of MBR? How could I know that?
The part about mounting the efi partition can be skipped.
Quote:
Maybe it's installing on UEFI mode instead of MBR? How could I know that?
When grub-install is run it will display the mode. To force grub to install in mode different of boot mode:
Code:
grub-install --target=i386-pc /dev/sda
for bios mode or use x86_64-efi for uefi mode. If booted in bios and install grub in uefi mode will get a no nvram error and wont' have a boot option in the uefi firmware/bios bootloader, however if have the option to boot from file in firmware/bios will allow to boot in uefi mode.
Last edited by colorpurple21859; 09-15-2022 at 06:44 AM.
The part about mounting the efi partition can be skipped.
I have no grub-install nor update-grub commands. What I do have is grub-editnv, file, ftest, glue-efi, kbdcomp, macbless, menulst2cfg, mk*.*, mount, probe, render-label, script-check and syslinux2cfg.
If you have not chroot into the system you won't have any of these commands.
based on our fdisk output:
Code:
mount /dev/sda5 /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
mount --bind /run /mnt/run
chroot /mnt
grub-install --target=i386-pc /dev/sda
update-grub
exit
reboot, if don't have grub-install run
Code:
apt install grub-pc
before running grub-install
Went through the steps and everything seem to go ok, it found both the Deepin and Windows partition and it gave no errors. However after rebooting my PC still doesn't find any where to boot. I went into the bios just to make sure I'm using CSM and I am. Changed it to UEFI just to see what the happens but it's the same.
Also for what is worth I found I can boot into a Deepin desktop by just removing a parameter on the USB boot menu, so maybe that could make things easier? I'm not sure what to try though.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.