LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux Deepin (https://www.linuxquestions.org/questions/linux-deepin-101/)
-   -   restore deepin bootloader after installing another linux (https://www.linuxquestions.org/questions/linux-deepin-101/restore-deepin-bootloader-after-installing-another-linux-4175539462/)

sehemy 04-12-2015 04:32 AM

restore deepin bootloader after installing another linux
 
Hi , I'm new to deepin and it works great but ,
I've just installed another linux distribution Today alongside with deepin which overridden the default sweet boot loader theme of deepin , so how to get it back without re-installing the whole OS ?

thanks

Head_on_a_Stick 04-13-2015 01:01 PM

Not familiar with Deepin but as it is based on Debian, I think you should boot up your Deepin system & run:
Code:

# apt-get install os-prober
# grub-install --target=i386-pc --recheck /dev/sdX
# grub-mkconfig -o /boot/grub/grub.cfg

Replace "X" (in "/dev/sdX") with the drive letter assigned to your main drive (use `lsblk` to list all attached drives & their sizes).

You should probably backup your MBR (to a file called "mbr.bak", located in your current working directory) before doing this:
Code:

# dd if=/dev/sdX of=mbr.bak bs=512 count=1
If everything goes wrong, you can restore it (from a live system) using:
Code:

# dd if=mbr.bak of=/dev/sdX bs=512 count=1
All of this is assuming you are not booting in EFI-mode.

You should check that you do not have any files under /sys/firmware/efi before you follow these instructions.

If you do have files in that directory, post back here for further advice ;)

marccc 04-30-2015 05:48 AM

wondering, did this work with deepin?

michael diemer 07-15-2016 02:31 PM

In case anyone is still wondering about this, I tried this and it worked:

sudo update-grub

then

sudo grub-install /dev/sda

Substitute sdb, sdg etc as needed. Whichever partition Deepin is on.


All times are GMT -5. The time now is 04:06 PM.