SOLVED how to restore mbr for mint debian edition?

Questions about Grub, the liveCD and the installer
Forum rules
Before you post please read this

SOLVED how to restore mbr for mint debian edition?

Postby scotty33 on Sun Dec 04, 2011 4:57 pm

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;

viewtopic.php?f=46&t=61066&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 scotty33 on Tue Dec 06, 2011 12:20 pm, edited 1 time in total.
scotty33
Level 1
Level 1
 
Posts: 33
Joined: Sat Aug 20, 2011 12:36 pm
Location: south wales uk

Linux Mint is funded by ads and donations.
 

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

Postby Oscar799 on Sun Dec 04, 2011 6:00 pm

Moved here from the main forum
Image
"Don't fix it if it ain't broken,don't break it if you can't fix it" Husse
Registered Linux User #511789
User avatar
Oscar799
Level 18
Level 18
 
Posts: 8838
Joined: Tue Aug 11, 2009 9:21 am
Location: United Kingdom

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

Postby xircon on Sun Dec 04, 2011 7:58 pm

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?)
Dell Inspiron N5010 / Core I5 / ATI Mobility Radeon HD5400, LMDE Tracking Sid & Cinnamon Desktop
"Ubuntu is an African word meaning 'I can't configure Debian'"
User avatar
xircon
Level 5
Level 5
 
Posts: 775
Joined: Sun Aug 01, 2010 7:59 am
Location: Sheffield, UK

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

Postby scotty33 on Tue Dec 06, 2011 9:11 am

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
scotty33
Level 1
Level 1
 
Posts: 33
Joined: Sat Aug 20, 2011 12:36 pm
Location: south wales uk

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

Postby spandey on Tue Dec 06, 2011 10:22 am

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.
Linux Mint 17 - Mate 64 Bit
spandey
Level 4
Level 4
 
Posts: 439
Joined: Sat Feb 20, 2010 1:23 pm

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

Postby itsme4401 on Tue Dec 06, 2011 10:26 am

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
itsme4401
Level 3
Level 3
 
Posts: 104
Joined: Sat Nov 27, 2010 4:12 pm
Location: Netherlands

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

Postby scotty33 on Tue Dec 06, 2011 12:19 pm

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
scotty33
Level 1
Level 1
 
Posts: 33
Joined: Sat Aug 20, 2011 12:36 pm
Location: south wales uk

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 4 guests