Hello,
I was running Mint 13 MAYA from partition /dev/sda2. This was dual booting with XP on /dev/sda1.
I installed AV linux from the live CD onto /dev/sda6. During the install I told it NOT to install GRUB in the MBR but it ignored me and did it anyway.
Now of course the grub on the MBR only points to the /boot/grub/grub.cfg on the /dev/sda6 partition and I have no menu entry for MINT.
AV linux does not have the redo-mbr command.
I would like to keep MINT as the main boot for the machine; I would like to insert the AV linux boot instructions back into the MINT (/dev/sda2) grub.cfg
a) How do I modify the MBR so that it points back to the /boot/grub.d on the /dev/sda2 partition?
b) is there a clean way to do this? (i.e. copy the /etc/grub.d/10_linux stuff from AV and put it into the /etc/grub.d/ on the MINT partition, then run update-grub?
Thanks for the help.
(I can boot from the MINT live CD if that helps, but I do not want to have to re-install MINT if I can avoid it.)
pgmer6809
How to Recover MINT 13 Grub
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
How to Recover MINT 13 Grub
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: How to Recover MINT 13 Grub
Boot the Mint cd and follow these steps
* Open a terminal and type
* Now, you need to remember which device listed is your linux distribution, you said Mint was, /dev/sda2 . Now we need to mount the filesystem to /mntCode: Select all
sudo fdisk -l
* Now mount the rest of your devicesCode: Select all
sudo mount /dev/sda2 /mnt
* Now chroot into your systemCode: Select all
sudo mount --bind /dev /mnt/dev
*Code: Select all
sudo chroot /mnt
When that is done you need to run update-grub to create the configuration file.
*Code: Select all
update-grub
To install GRUB 2 to the MBR, next you need to run grub-install /dev/sda
Code: Select all
grub-install /dev/sda
Linux Mint 21.1 Cinnamon
Re: How to Recover MINT 13 Grub --chroot fails
Thanks for the reply. I think I see what you are trying to do. But my 'chroot' command fails.
I mount the sda2 partition then issue the mount --bind cmd they work ok.
But the chroot cmd fails. It gives the message: "Cannot run command /bin/bash. Exec Format error'
It does this no matter what cmd I give it. E.g. chroot /mnt /bin/bash, or chroot /mnt /bin/sh or chroot /mnt /bin/echo
but if I just do a chroot / or chroot / /bin/bash etc. it works ok.
there is something else I need to do after I mount /dev/sda2 onto /mnt.
(I tried mounting my home partition on /mnt/home eg mount /dev/sda8 /mnt/home) but that has no effect.
Any other advice please?
pgmer6809
I mount the sda2 partition then issue the mount --bind cmd they work ok.
But the chroot cmd fails. It gives the message: "Cannot run command /bin/bash. Exec Format error'
It does this no matter what cmd I give it. E.g. chroot /mnt /bin/bash, or chroot /mnt /bin/sh or chroot /mnt /bin/echo
but if I just do a chroot / or chroot / /bin/bash etc. it works ok.
there is something else I need to do after I mount /dev/sda2 onto /mnt.
(I tried mounting my home partition on /mnt/home eg mount /dev/sda8 /mnt/home) but that has no effect.
Any other advice please?
pgmer6809
Re: How to Recover MINT 13 Grub -- SOLVED
Hi,
The orginal post describing how to use chroot to regenerate the grub files, works perfectly.
My problem came from booting from a 32bit install dvd but the os on the partitiion being chrooted to was 64 bit. This is what generated the Exec Format error.
(as it says in the ARCHlinux help wiki, this error usually indicates that the architectures to not match.)
when I booted with the correct DVD the procedure worked perfectly.
Thank you very much
pgmer6809
The orginal post describing how to use chroot to regenerate the grub files, works perfectly.
My problem came from booting from a 32bit install dvd but the os on the partitiion being chrooted to was 64 bit. This is what generated the Exec Format error.
(as it says in the ARCHlinux help wiki, this error usually indicates that the architectures to not match.)
when I booted with the correct DVD the procedure worked perfectly.
Thank you very much
pgmer6809
Re: How to Recover MINT 13 Grub
Sorry I neglected to mention that. I kind of assumed you'd be using the same media as the install...when I booted with the correct DVD the procedure worked perfectly
Linux Mint 21.1 Cinnamon