SOLVED how to restore mbr for mint debian edition?

Archived topics about LMDE 1 and LMDE 2
Locked
scotty33

SOLVED how to restore mbr for mint debian edition?

Post by scotty33 »

Hi

I created 2 partitions or volumes? on my hard disc,, was running xp pro on one and mint debian edition 32 bit on the other, no problems for a few months, suddenly, the xp stopped being an available boot option in the 'grub loader' i think the screen is called?
I thought it would be a smart move to reinstall XP pro, now realise this has killed off the mint boot info, not so smart after all...

found a thread with directions how to reinstall grub to hopefully make mint bootable again, the thread is here;

http://forums.linuxmint.com/viewtopic.p ... 6&start=20

the part I followed here:

Re: Boot problem with dual system

Post by lauren on Fri Dec 03, 2010 6:41 am
Hi riki!
You need the same medium you used to install LMDE; if you had burned a CD and don't have it, you must burn a new one.
The suggestion after having checked the download with md5sum and burning an image of LMDE:
1. Boot to the Live Desktop LMDE
2. Open a terminal and type:

Code: Select all
sudo mkdir /mnt/sda1

then:

Code: Select all
sudo mount /dev/sda1 /mnt/sda1

afterwards:

Code: Select all
sudo grub-install --root-directory=/mnt/ /dev/sda


3. Reboot, in the Grub menu choose your Mint Debian
4. Open a terminal and run:

Code: Select all
sudo update-grub


lauren


The result here:

mint@mint ~ $ sudo mkdir /mnt/sda1
mint@mint ~ $ sudo mount /dev/sdal /mnt/sdal
mount: mount point /mnt/sdal does not exist
mint@mint ~ $ sudo mount /dev/sda1 /mnt/sda1
mint@mint ~ $ sudo grub-install --root-directory=/mnt/ /dev/sda
/usr/sbin/grub-probe: error: cannot find a device for /mnt//boot/grub (is /dev mounted?).
mint@mint ~ $ sudo mount
aufs on / type aufs (rw)
tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
udev on /dev type tmpfs (rw,mode=0755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620)
/dev/sr0 on /live/image type iso9660 (ro,noatime)
tmpfs on /live/cow type tmpfs (rw,noatime,mode=755)
tmpfs on /live type tmpfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
cgroup on /dev/cgroup/cpu type cgroup (rw,cpu)
/dev/sda1 on /mnt/sda1 type fuseblk (rw,allow_other,blksize=4096)
mint@mint ~ $ sudo mkdir /mnt/sda2
mint@mint ~ $ sudo mount /dev/sda2 /mnt/sda2
mint@mint ~ $ sudo grub-install --root-directory=/mnt/ /dev/sda
/usr/sbin/grub-probe: error: cannot find a device for /mnt//boot/grub (is /dev mounted?).
mint@mint ~ $ sudo grub-install --root-directory=/mnt/ /dev/sda2
/usr/sbin/grub-probe: error: cannot find a device for /mnt//boot/grub (is /dev mounted?).

You can see I discovered my mint is actually on sda2, but no joy when typing this in..

please help?!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Oscar799
Level 20
Level 20
Posts: 10419
Joined: Tue Aug 11, 2009 9:21 am
Location: United Kingdom

Re: Please help? how to restore mbr for mint debian edition?

Post by Oscar799 »

Moved here from the main forum
Image
xircon

Re: Please help? how to restore mbr for mint debian edition?

Post by xircon »

That should work, boot from LMDE CD go to terminal:

Code: Select all

su
mount /dev/sda6 /mnt   <<<< change this line to your LMDE partition note space after 6
grub-install --root-directory=/mnt /dev/sda <<<< space after /mnt

reboot

then 

sudo update-grub
Type this exactly, note the spaces, no added trailing "/". This definitely worked for me, my LMDE partition is sda6, change to match yours (sda2?)
scotty33

Re: Please help? how to restore mbr for mint debian edition?

Post by scotty33 »

Thanks for all the suggestions and help, I could not get anywhere with
"su
mount /dev/sda6 /mnt"

typing su prompted for a password, I was running from the live dvd, so the password I set for my mint install was not working.

I ended up following a tutorial, I Copied and pasted the instructions from this tutorial : http://community.linuxmint.com/tutorial/view/245 into terminal substituted sda2 and sda where necessary, now have mint back, so Thank You all for your patience and understanding.
I now need to figure out how to restore the XP boot into grub? will post back if I find something, Thanks Again
spandey

Re: Please help? how to restore mbr for mint debian edition?

Post by spandey »

Once you got Mint back just logon into Mint and open a termnal

Code: Select all

sudo update-grub 


Reboot. You will get your XP back.
itsme4401

Re: Please help? how to restore mbr for mint debian edition?

Post by itsme4401 »

First post "The results here: line 2 reads
mint@mint ~ $ sudo mount /dev/sdal /mnt/sdal
sdal: SDAL; it should be sda1 SDA1, SDAone. Hope this helps (too)this
scotty33

SOLVED Please help? how to restore mbr for mint debian editi

Post by scotty33 »

spandey wrote:Once you got Mint back just logon into Mint and open a termnal

Code: Select all

sudo update-grub 


Reboot. You will get your XP back.
You are a genius!, wish I'd asked this in the first place...

andrew@hal ~ $ sudo update-grub
[sudo] password for andrew:
Generating grub.cfg ...
Found Debian background: linuxmint.png
Found linux image: /boot/vmlinuz-2.6.32-5-686
Found initrd image: /boot/initrd.img-2.6.32-5-686
Found Microsoft Windows XP Professional on /dev/sda1
done


Thank you all, much appreciated! :D
Locked

Return to “LMDE Archive”