Jump to content

fubared MBR - debian etch dual boot


tomfmason

Recommended Posts

I got a new laptop a little while ago. It came with vista home premium on it. I really don't like vista(even less than xp) so I figured I would setup a dual boot and if I got everything working correctly I was going to remove windows. This is the first time that I have tried to setup a dual boot with debian. I have done it with ubuntu before but not debain.

 

I must have done something wrong during the initial install that completely fubared my MBR.  I don't have a vista restore cd but I have a really old xp cd. I figured that I could get into the restore console with it but I when I do it asks for an Admin password that I don't know. I am the only user on the system and I *know* what my password is but it keeps telling me that it is incorrect. I tried my password, no password and 123456.. None of which worked. So I decided to try to fix it through grub. Below is the process I used:

 

 

I entered the debian dvd and when I got to the network dialog I hit alt f2 which brings up BusyBox(the built in shell). Then I did fdisk -l to see my partitions.

# fdisk -l

Device       Boot       
/dev/sda1                 
/dev/sda2                
/dev/sda3                
/dev/sda4               
/dev/sda5               
/dev/sda6   *          
/dev/sda7            

 

/dev/sda5 is the root partition, /dev/sda6 is the boot partition and /dev/sda7 is swap.

 

From BusyBox I did

 

mount /dev/sda5 /mnt

chroot /mnt

 

Which dropped me into the root for the debian install. I then loaded grub and tried to setup the MBR like this:

 

grub

grub -> root (hd0,5)

grub -> setup (hd0)

 

That completes without any errors but when I reboot I am still unable to get grub to boot. It just searches for other bootable media. I don't have a cd burner on my other system but I am going to go buy a usb flash drive and try http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD-ROM.html . I have really bad connection or I would download a live cd. Well, I downloaded the DSL(damn small linux) iso and will try it if the grub booter doesn't work.

 

At this point I am pretty much lost. I don't want to write over the windows install as I have a few things I still need access to. Any other suggestions would be greatly appreciated.

 

 

Link to comment
Share on other sites

Um... what? I'm pretty sure you mis-read something.

 

And, Tom, when you say that you "loaded grub", what do you mean? And did you have /boot mounted at the time you were running "root (hd0,5)", "setup (hd0)", etc., in grub? If not, I think that might have something to do with it.

Link to comment
Share on other sites

And, Tom, when you say that you "loaded grub", what do you mean?

 

by entering "grub" at the command prompt the grub command shell environment will be loaded.

 

And did you have /boot mounted at the time you were running "root (hd0,5)", "setup (hd0)", etc., in grub? If not, I think that might have something to do with it.

 

Yes I did.. I left that out last time. Here is what I did

 

mount /dev/sda5 /mnt

mount /dev/sda6 /mnt/boot

chroot mnt

grub

grub>root (hd0,5)  #/dev/sda6

grub>setup (hd0)

grub>quit

exit

then rebooted.

 

 

Link to comment
Share on other sites

I figured that I could get into the restore console with it but I when I do it asks for an Admin password that I don't know. I am the only user on the system and I *know* what my password is but it keeps telling me that it is incorrect. I tried my password, no password and 123456.. None of which worked. So I decided to try to fix it through grub. Below is the process I used:

 

 

This what what I was reffering to, he said he tried his password, and it didnt work.  I have vista on a laptop, and there must be somethigngwith it that the admin password is not your password.  I had to use the program to be able to install things, and even search Documents and Settings folder for sessions to work on my laptop for development.

Link to comment
Share on other sites

after more searching I found a solution and debian now boots

 

From the BusyBox shell in the debian install(alt f4)

mount /dev/sda5 /mnt

mount /dev/sda6 /mnt/boot

chroot /mnt

grub

grub>root (hd0,5)

grub>setup (hd0)

grub>rootnoverify (hd0,0)

grub>makeactive

grub>chainloader +1

grub>boot

exit

then reboot

 

Now grub boots fine

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.