aru Posted January 13, 2003 Report Share Posted January 13, 2003 arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Posted: Wed May 29, 2002 10:11 am Post subject: FAQ: De-Install of LILO/recovering the MBR _________________________________________________________________ FAQ: De-Install of LILO or the recover of the MBR I'm not going to discuss why you'll need to de-install LILO (the Linux Loader), but sometimes could be necessary (even if you, like me, are a fan of lilo against grub). This job could be done in several ways, I'll show just a couple: * Using evil software (Micro$oft), but despite of that, the common way Wink : Start window$ and go to M$DOS MODE or boot with a M$DOS disk, then run in the command line: Code: fdisk /mbr That will restore the Boot sector. * Using the friendly and lovely Linux, the cool way: When you install lilo, it creates a backup copy of the MBR (Master Boot Record) in the directory /boot/ named boot.0300 (this is the name if is the MBR of the first disk of IDE 0). So to substitute LILO with the original MBR you should run the next command: Code: dd if=/boot/boot.0300 of=/dev/hda bs=446 count=1 If the boot disk is an SCSI the command should look this way: Code: dd if=/boot/boot.0800 of=/dev/sda bs=446 count=1 Be careful with that, because a bad use of the dd command could do an irreversible harm to your HD 8) Check the related man pages: * lilo / lilo.conf * dd * grub ramfree17 Moderator Joined: 18 Apr 2002 Posts: 1262 Location: Philippines Posted: Wed May 29, 2002 11:17 am Post subject: _________________________________________________________________ aru you forgot the most simplest way... Very Happy Code: [root@ramfree etc]$ /sbin/lilo -U well, you could omit the /sbin/ part but on RH systems you have to point to the sbin utility as its not on the root PATH. ciao! cannonfodder Moderator Joined: 16 Apr 2002 Posts: 1056 Location: Rochester, NY, USA Posted: Wed May 29, 2002 12:13 pm Post subject: _________________________________________________________________ Ramfree, Arusabel is hard core baby! arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Posted: Wed May 29, 2002 4:22 pm Post subject: _________________________________________________________________ Embarassed Rolling Eyes Mmmm, but my way is cooler Razz than yours ramfree Wink ... And what happens if lilo doesn't work anymore? Twisted Evil DOlson Moderator Joined: 16 Apr 2002 Posts: 2393 Location: Canada Posted: Wed May 29, 2002 4:55 pm Post subject: _________________________________________________________________ Quote: ... And what happens if lilo doesn't work anymore? Umm... Format and reinstall? Wink ramfree17 Moderator Joined: 18 Apr 2002 Posts: 1262 Location: Philippines Posted: Wed May 29, 2002 10:07 pm Post subject: _________________________________________________________________ of course aru is hard-core. he uses thick manuals as pillows and the manpages as chat-rooms. Very Happy lilo -U works for those wanting to remove the bootloader from the system. i think there is a similar option for GRUB but i dont use it so better check your chatrooms aru. Laughing when your system doesnt work, frag it with an MS fdisk if you are going to remove your syste. if you are not removing the system i will go with scape's last advice: reinstall. hey scape, you are getting install-happy Wink , mellow down dude, i think you are getting in-love with the Mandrake installer. Laughing ciao! Decibels Newbie Joined: 02 Jul 2002 Posts: 4 Posted: Tue Jul 02, 2002 3:59 pm Post subject: _________________________________________________________________ I have found on a few systems that I have to do a couple things before running fdisk cd windows command.com then fdisk /mbr dpdave0 Newbie Joined: 08 Jun 2002 Posts: 17 Location: San Francisco, CA Posted: Tue Jul 02, 2002 8:41 pm Post subject: _________________________________________________________________ Start window$ and go to M$DOS MODE or boot with a M$DOS disk, then run in the command line: Code: fdisk /mbr That will restore the Boot sector. [/i] That does NOT restore a boot sector. It merely overwrites the existing MBR with a M$ one. If that's what you want, fine. But don't fool yourself into thinking you're recovering anything by doing this. ramfree17 Moderator Joined: 18 Apr 2002 Posts: 1262 Location: Philippines Posted: Tue Jul 02, 2002 11:11 pm Post subject: _________________________________________________________________ only in a relative viewpoint. when most people try linux, they dont have any (visible) bootloader and rely on the bios looking for a bootable system on the active partition. when they have a linux installation done, a bootloader is placed on the MBR. now the problem is when people want to remove their linux installation and let their computer boot the way it did before the linux experience. to me it sounds like restoring. but your perceptions might vary. Wink ciao! arusabal Moderator Joined: 17 Apr 2002 Posts: 836 Location: Spain Posted: Wed Jul 03, 2002 7:10 am Post subject: _________________________________________________________________ I couldn't agree more with you ramfree Wink If doing, fdisk /mbr, you leave the things as they were before installing linux, then you are restoring your MBR, there is no discussion at all. If you want to be a purist, then do what ramfree cleverly pointed some posts above (Embarassed ): "/sbin/lilo -U", and if you feel even more purist (almost ill of purity) then do it the way I posted in the former post: dd if=/boot/boot.save of=/dev/hda bs=446 count=1 where boot.save MUST be the copy of the MBR that you carefully saved when you installed lilo, or any other boot loader, the first time (Now you should be sure that you are **restoring** the MBR, the one and only MBR, you had before you started messing with Linux) But afterwards, in any of the tree cases, you'll get the same: remove the lilo boot loader and restore the dos/windows/bios/default master boot record, and that is what cares here Wink Cloim Newbie Joined: 16 Jun 2002 Posts: 3 Posted: Fri Jul 12, 2002 2:49 am Post subject: _________________________________________________________________ Quote: If doing, fdisk /mbr, you leave the things as they were before installing linux, then you are restoring your MBR, there is no discussion at all. I think it should be pointed out that not all Windows computers use generic MS MBR's. Mine does not. It has a 'rescue partition' which becomes useless when the origional MBR is not present. I would strongly suggest that anyone with a system setup like this make sure that they are saving/replacing the origional boot loader and not using a generic MS one. I would also suggest ordering restore CD's, if you don't have them (Hewlett Packard doesn't include any), prior to installing Linux, or partitioning your HD. Just to be on the safe side. Also worh mentioning: They can't send you rescue CD's containing an OS that MS considers to be obsolete. trajan Newbie Joined: 13 Jul 2002 Posts: 1 Posted: Sat Jul 13, 2002 2:45 am Post subject: _________________________________________________________________ is it really as simple a booting into DOS and doing fdisk /mbr ? I tried out mdk 8.1 for about 3 months on my win98 machine, now I want to get rid of the lilo prompt at every bootup. I don't want to trash anything! fdisk is scary to me. Also, what happens to the linux partitions that mdk 8.1 made during install? Do I need to re-partition them as windoze ? (I have Partition Magic 7.0) At the end of this year, I will probably make this machine all linux (mdk 8.2 or whatever's current at that time). But for now, I just want all windoze like before, and no lilo. ramfree17 Moderator Joined: 18 Apr 2002 Posts: 1262 Location: Philippines Posted: Sat Jul 13, 2002 6:58 am Post subject: _________________________________________________________________ hi trajan i got your pm. lilo -U will remove the bootloader from the MBR if you still have a linux system. else you have to do it the fdisk /MBR way. aside from what Cloim said (what system do you have Cloim? please post it so others with your hardware will be notified when they read this), the default behavior of the BIOS (the thing that makes you computer perform the thingamajigs when it boots) is to initialize the basic services of your system and then looks at the active partition for a bootable operating system. in my experience, when i wiped the MBR the BIOS transferred the processing to the active partition and the MS system boots successfully (tried this with Win98SE and Win2K). now there is the problem of what to do with the previous linux partitions. you could delete it (http://www.club-nihil.net/mub/viewtopic.php?t=2279) but the problem arises when making win98 recognize it. from what i can remember, the windows fdisk can only create one primary and one extended partition in a harddisk. if this is really the case and you already have drive D[,E, etc] and you have one harddisk then you have no other option (my opinion only) but to destroy the drives greater than C and create a whole extended partition from the original extended plus the one occupied by your linux system. i have one great news though, it is possible that when you installed mandrake diskdrake just hitchhiked your linux partitions in the extended partition of windows. why is this great? it is because if this is the case then you could create additional logical drives (D, E, F,...) without destroying your current logical drives. this is a little bit out of the scope of this board. ill pm you my office email address and lets work it out from there. its saturday here so i wont promise any reply until monday but i may take a peek at my office mails from home. ciao! powerj Newbie Joined: 14 Aug 2002 Posts: 1 Posted: Wed Aug 14, 2002 4:49 pm Post subject: getting back to WInxp from Mandrake 8.2 _________________________________________________________________ The install CDrom tha came with my MD8.2 has a an option F1 and from there you came revert to previous boot method. Phew that saved haing to re-install XP again and again. Just my 0.02 worth. Jim Bluebeard Senior user Joined: 01 May 2002 Posts: 386 Posted: Wed Aug 21, 2002 7:48 pm Post subject: _________________________________________________________________ There is a different method that should be employed with XP. Use the XP Install CD to load the Recovery Console as described in Knowledge Base article #Q307654. Bluebeard. cannonfodder Moderator Joined: 16 Apr 2002 Posts: 1056 Location: Rochester, NY, USA Posted: Wed Aug 21, 2002 9:41 pm Post subject: _________________________________________________________________ Also, if you uninstall lilo with lilo -u and it still doesn't boot windows (should since it restores the mbr), then before going ballistic, boot into your bios and reset your bios to the defaults. Sometimes the bios gets confused and gets the order of drives (first, second, so on) mixed up. DegnerFX Newbie Joined: 01 Oct 2002 Posts: 3 Location: Jersey City, New Jersey Posted: Thu Oct 03, 2002 12:21 am Post subject: _________________________________________________________________ I'm going to be installing MDK 9.0 to dual boot on my XP box. I was pondering using BootMagic. (Comes bundled with PartitionMagic 7.0) Any advice on how this is done, or if it's even possible/feasible? *edit* Never mind that. I got it working with LILO. Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.