DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi, I have a winxp/linux dual boot system.
Today, I had to format windows and reinstall it.
The MBR of course got erased so i have no way of booting into linux from grub.
I also don't have a linux boot floppy....
So, is there any other way i can get into debian without reinstalling it?
thanks.[/u]
Let's say that Debian uses GRUB as a bootloader...and you want it back. So use a LiveCD which uses GRUB too (I recommend Knoppix). Alternative to chroot, you may run "grub" and you'll get a GRUB shell, where you type "find /boot/grub/stage1". You should get an output like "(hd0,1)". So, you'll have to run "root (hd0,1)", then "setup (hd0)" and this should get GRUB back into the MBR.
The other way around is to copy Debian's root partition boot sector (also using a LiveCD), copy the resulted file in C:, then add an entry in boot.ini. If you're interested, I can detail on the latter.
Pre-packaged Debain always uses Lilo as far as my CDs are concerned. So is Knoppix.
As such Grub may not be available at root terminal. If it does, possibly in a Live Knoppix CD, it would not have the neccessary files in place to run the "setup" command. You also need to run "root" command at Grub prompt for Grub to identify the partition to obtain the Stage1/2 files, otherwise it will default to the one you are currently running Linux.
It is therefore beneficial to face the music head on and get Lilo and Grub to boot each other. The two are remarkably similar.
lilo -b /dev/hda in Lilo is the same as
grub-install /dev/hda in Grub
The latter is equivalent to "root (i,j)"+"setup(i,j)" you have suggested.
Not my intention to undermine your advice given out here but I think you may welcome a clarification, as try it out yourself.
Thanks for correcting me in the "root" matter. I perfectly knew that (I just reinstalled GRUB into the MBR a few hours ago) so that was a typo, which has now been corrected.
I think we don't obtain the same Debian CDs because mine have always used GRUB, just like Knoppix. Actually I burnt today the Knoppix 4.0 DVD and used it to reinstall GRUB (see the paranthesis above).
OMG, my post number makes me look like some evil entity right now!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.