Jump to content

Reinstalling the boot loader [solved]


tapksa
 Share

Recommended Posts

Okay so first of all, hi, I'm new here.

 

So I got a new PC with a 120GB HDD (former was 18GB) and decided to try Mandriva Linux, but wanted to still keep Windows, just in case. So dual boot it was and so I installed Mandriva Linux One 2007 Spring and moved all my stuff on that partition. And then to the other OS. Well, I had problems with installing Windows XP Pro and therefore tried XP Home, and it worked fine.

 

At this point most of you reading must be thinking "idiot". 'Cause, later on, after noticing that accessing Linux now seemed impossible, I heard that I should have installed the OS's in the other order. And now I should do something like "reinstalling boot loader". I'm not that new with computers, but that really tells me nothing.

 

I think I have three options:

1) Doing the boot loader thing, no idea how (if possible and solves my problem, guiding would be appreciated)

2) Deleting Windows, then somehow accessing my stuff, moving it somewhere, deleting Linux, installing Windows, installing Linux, moving my stuff back.

note: I've heard it's somehow possible to make three partitions so that one partition would have my personal stuff there and I could then access those files from either OS. However I don't really need this, I just need Windows for some things (a few programs that don't run on Linux even with WINE).

 

3) Somehow accessing my stuff from Windows (If this is the only/best way, what program do I need?), moving it somewhere else and then starting everything all over again.

 

I'm sorry if you already have a similar thread - I tried to find one, but there didn't seem to be anything that would help. And after trying to solve this problem for 3-4 hours and asking help in various places, I'm actually quite frustrated and tired. If such thread exists, link please!

Edited by tapksa
Link to comment
Share on other sites

Welcome aboard. :)

 

Sadly, Mandriva ONE does not have the "recovery" option at the boot-menu, like e.g. Mandriva free, but nonetheless, you can recover your bootloader. All it takes is a bit of mouse-clicking and (in case that the graphical approach refuses to work) some typing of linux commands. (Don't be afraid, the command line ain't so complicated).

 

First of all, you should start the MCC (Mandriva Control Center aka. "Configure your computer"). There you have on the left hand menu the section: System start. Click on that and select to install grub on your harddisks Master boot record (most likely hda). Click continue twice. The system should now reinstall the bootloader. Check by rebooting the system. If that didn't fix it, go to the following section in the MCC:

 

Mount points. In the Central window there will be an icon for managing your partitions. Click on that. It will show you the layout of your harddrive. (I assume now that you have a / and a /home partition and no extra /boot partition). Note down, which partition is your / (=root) partition and which filesystem it has. Let's assume that the partition is named hda5 with an ext3 filesystem. Exit the MCC.

 

Open a terminal and log in as root user by typing "su". Now mount the main partition by typing

mount -t ext3 /dev/hda5 /mnt

 

adjust ext3 and hda5 to your systems settings. If no errors are reported, type

chroot /mnt

 

the system will ask you now for the root password of the Mandriva version you installed to disk already. Type it in. If no errors are reported, you are actively running the already installed Mandriva from within the terminal. Now restore the bootloader

 

grub-install /dev/hda

adjust hda if hda is not your main drive. The system should now reinstall the bootloader. Once that is done, type

exit

and

umount -t ext3 /dev/hda5

Now exit the terminal. The bootloader should work now.

Link to comment
Share on other sites

Just to clarify, arctic is describing how to restore grub, your linux bootloader, by booting from your mandriva one cd and using the tools there to reinstall grub to your mbr. Once you get grub restored and booting your current linux install, you can configure grub to also boot your windows installation.

Link to comment
Share on other sites

'Cause, later on, after noticing that accessing Linux now seemed impossible...

 

Did anyone notice that before offering help?

For using mcc the guy has to boot its Linux installation, but he does not know how to do it!

I also would like to be educated, by the way: Since I do not use One, I do not know if this CD is offering the option to boot an existing installation. Does it?

Edited by scarecrow
Link to comment
Share on other sites

I also would like to be educated, by the way: Since I do not use One, I do not know if this CD is offering the option to boot an existing installation. Does it?

No, it does not offer the option of booting an existing installation. You have to chroot into the box. The MCC is available in ONE, thus reinstalling the bootloader with the MCC might work, as the kernel in ONE should still be identical to that of the already installed system.

Link to comment
Share on other sites

Did anyone notice that before offering help?

For using mcc the guy has to boot its Linux installation, but he does not know how to do it!

I also would like to be educated, by the way: Since I do not use One, I do not know if this CD is offering the option to boot an existing installation. Does it?

No, sorry for making it so difficult. I meant that I can enter the installation - actually, the first post was posted using it.

 

And about your help, thanks, I'll try those tricks as soon as I get home.

 

 

EDIT

 

I followed Arctic's instructions carefully and everything works now. Thank you (all) a million times!

Edited by tapksa
Link to comment
Share on other sites

  • 2 months later...

Hi again everyone,

 

First of all, sorry for the double post. I didn't feel like making a new thread so I decided to bring this one up instead.

 

Pretty much the same thing again. I needed WinXP so decided to install it. However the empty partition I was planning to install Windows to wasn't the right type, so the installation failed. I did delete the formatted partition and create a new one, no use. I had planned to reinstall the boot loader from my Mandriva One Live CD like the last time (read the previous posts if you need the information) after the XP installation, but this time I lost the boot loader without really installing any OS. So here I am again, using the Live CD to ask for help.

 

The problem: After the Windows installation had failed, I restarted the computer. As you can guess, no boot loader, at least not one for me to use. No booting Mandriva. As I started the computer I got the error message "Error finding OS" or something like that. Obviously a boot loader problem(?).

 

Well, tried reinstalling the boot loader using the Live CD like last time. When I go to "Set up how your computer boots" it says "No bootloader found, creating a new configuration". Tried installing it once, same error. Tried installing the bootloader to boot /dev/hda1 (my mandriva partition with all my stuff on it) instead of /dev/hda. Nothing. And what surprised me was that I got the "no bootloader found" -message again.

 

A friend of mine suggested to:

a) try accessing my Home folder by mounting my /hda1/ -partition (~70GB of stuff) and moving the most important stuff to the other (WIndows) partition, which is 15GB, then formatting hda1 and starting all over again

I am not very willing to do this. I guess it's quite obvious why.

B) installing Mandriva One (or some another distribution) to the smaller partition and wishing the boot loader would work then

c) getting an external hard drive, mounting /hda1/ and moving stuff there (if this is possible, I could do this. It's just a bit too slow for me...)

 

I believe there is an easier way to get my bootloader working. I just don't know what it is.

 

I think I should not do anything before someone a bit wiser tells me what might harm my computer and what may help me.

And, to be honest, I'm in quite a rush. I need to get to my files. So if someone knows what to do, please help. I hate to be rude, but please be as fast as you can.

 

-Tapksa

Link to comment
Share on other sites

The windows cd is always useful to restore windows bootloader.In this particular case id would try :

 

1 - Try to restore windows to boot,just boot from the windows cd and using the recovery console,once in the command prompt just type:fixmbr and press enter.this sould be enough to boot windows.

2 - Try to install grub as described above by artic with the live cd and chroot to the mandriva installation.

 

I think that might help you out but supergrub disk is also a good idea. :)

 

Cheers...

Link to comment
Share on other sites

Whenever I have boot problems the fiirst thing I do is reach for my trusty 'Super Grub Disk', every home should have one! (fixes Windows boot problems as well!)

 

http://supergrub.forjamari.linex.org/

I was just gonna do that when...

 

The windows cd is always useful to restore windows bootloader.In this particular case id would try :

 

1 - Try to restore windows to boot,just boot from the windows cd and using the recovery console,once in the command prompt just type:fixmbr and press enter.this sould be enough to boot windows.

2 - Try to install grub as described above by artic with the live cd and chroot to the mandriva installation.

 

I think that might help you out but supergrub disk is also a good idea. :)

 

Cheers...

1. Don't have a windows installed, if that's what you mean ;) so nothing to recover.

2. Stupid me. I did't try that trick. And yup, it worked. Will remember next time.

 

Thanks again a million times. And I'm even on my schedule!

 

-Tapksa

Link to comment
Share on other sites

I was just gonna do that when...

I recommend you get a copy of Super Grub Disk anyway, it is a great tool to have around. There is a bug in Windows where 'fixmbr' doesn't work if Windows is pre-installed and you only have a recovery disk. You keep getting asked for the administrator password even when one hasn't been set. I know! I had that problem with my laptop, SGD fixed it.

Link to comment
Share on other sites

  • 1 month later...
Mount points. In the Central window there will be an icon for managing your partitions. Click on that. It will show you the layout of your harddrive. (I assume now that you have a / and a /home partition and no extra /boot partition). Note down, which partition is your / (=root) partition and which filesystem it has. Let's assume that the partition is named hda5 with an ext3 filesystem. Exit the MCC.

Hi guys, it's me again.

 

This time I'm fixing another computer. I'm now pretty familiar with reinstalling the bootloader (done it many, many times already) except for that this computer does have a /boot partiton in which the boot loader should be installed. And I don't know what to do differently this way. Instructions, anyone? Also I'm using One 2008 CD this time.

 

Thanks.

 

EDIT

Oh yeah, of course I got to also ask if I'm even supposed to do this: This computer seems to have a problem with booting Windows XP. I thought I'd try reinstalling the boot loader. Am I supposed to install GRUB or is GRUB for Linux only? Is there a boot loader that I should install to this PC anyway? You see, this PC doesn't have a Linux OS at all, only Windows, but well, I'm trying to fix Windows using Linux here. Smart or stupid? Possible or not? How?

 

Thanks again.

Edited by tapksa
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...