LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-19-2005, 08:25 PM   #1
heri0n
Member
 
Registered: Oct 2004
Location: Hamilton, Ontario
Distribution: Slackware 10.0
Posts: 48

Rep: Reputation: 15
MBR killed after re-install of windows?


I was re-installing my system.. both windows and linux and I realised I screwed up my windows install so I re-installed it and that killed lilo... it just boots straight into windows now... so I tried booting off cd and just reinstalling lilo with the `lilo` command.. It installed and I started booting into slack... until it gave me a kernel panic and sort of died there... any ideas on how to fix it?
 
Old 06-19-2005, 08:43 PM   #2
Chromezero
Member
 
Registered: Nov 2004
Location: Arizona
Distribution: Slackware, RHEL, others
Posts: 470

Rep: Reputation: 40
I don't know that this is the most practical answer but if I were in your shoes, I'd just format and start over. I prefer to just wipe the drive and make sure I have a clean install. It just seems to save me problems later on down the road. However, if you don't want to start from scratch again, I'd suggest booting a live CD and checking your LILO. You could also try re-installing Slackware. I'm sure you've heard it before, but it's usually easier to install Windows first.
 
Old 06-19-2005, 08:45 PM   #3
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
You need to do this:

1. Using fdisk recreate the partition table exactly as it was before the accident (In the best possible case, Windows only altered the bootloader and didn't touch the partition table, so this step may not be necessary).

2. Using a rescue disk, mount your linux partition (e.g. mount -t ext3 /dev/hda2 /mnt).

3. Install the boot loader (e.g. lilo -r /mnt).

Edit: The above assumes that Windows just altered the MBR. If, in addition, Windows installed itself on the entire drive, then all is lost and you must reinstall Linux.

Last edited by Berhanie; 06-19-2005 at 08:56 PM.
 
Old 06-19-2005, 08:59 PM   #4
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
well..there's nothing wrong with the partition table,
and re-installing lilo should work.
( i understand that both win and Slack-with-cd can be booted )

so my Q.'s (...if you boot the cd with " mount root=....etc...):
- what's the output when you run lilo ?
-what error messages do you get when you try to boot Slack from the lilo-menu ?

btw:formatting and starting all over is for win-loosers.

egag
 
Old 06-19-2005, 09:38 PM   #5
Chromezero
Member
 
Registered: Nov 2004
Location: Arizona
Distribution: Slackware, RHEL, others
Posts: 470

Rep: Reputation: 40
Quote:
btw:formatting and starting all over is for win-loosers.
I guess that makes me a "win-loser"...

I'm certainly not a linux guru, so I'll ask this for my information and possibly someone else's. Can LiLO cause a kernel panic? It seems to me that LiLO worked after it was re-installed and the problem was actually with the Kernel.
 
Old 06-20-2005, 07:41 AM   #6
egag
Senior Member
 
Registered: Jul 2004
Location: Netherlands
Distribution: Slackware
Posts: 2,721

Rep: Reputation: 53
yip, it looks like lilo worked ok , but maybe not with the right options.
also i guess reinstalling win will not touch other partitions
( although with win you never can be sure about that ).

but with Linux it's most of the time easier to repair things, than to reinstall all.
( for example.: if the kernel is no good for some reason i wouldn't know,
then installing a standard kernel could solve it )
and in general, it's always better to understand a problem and learn how to repair it,
than just do an all-curing re-install

it's one of the advantages of Linux over win and you don't have to be a guru
or smth. like that.
you learn such things " on the fly " , but only if you put in some effort to learn.

now it's important to know the exact error message that the kernel gives at boot.

egag
 
Old 06-21-2005, 12:32 AM   #7
ComputerMan
Member
 
Registered: Jul 2003
Location: US
Distribution: Slackware 11.0, Debian 4.0 "etch"
Posts: 71

Rep: Reputation: 15
Same thing happened to me yesterday, you need to do the following:

Boot up from the Slackware CD.

At the prompt enter the following:
Code:
linux root=/dev/hda1
Note: hda1 is where the partition is, mine was hda2.

It's going to load now, when it's finished log in as root then enter the following:
Code:
lilo
LILO will now be restore to its previous state. I'm not sure if this is what you did but I just wanted to throw this out in the open.

Hope this helps!

Last edited by ComputerMan; 06-21-2005 at 12:34 AM.
 
Old 06-21-2005, 10:59 AM   #8
mixtr
Member
 
Registered: Jul 2004
Location: Ottawa
Distribution: Arch, OpenBSD
Posts: 123

Rep: Reputation: 17
IF you use Windows NT/2000/XP, you shouldn't put lilo on your MBR if you want to dual boot Windows and Linux. Install lilo on your linux drive and let windows have the MBR, it will be happier and I think it's even required, and dual boot with windows:

1. Install lilo on your linux drive
lilo.conf:
boot = /dev/hda1

2. run: dd if=/dev/hda1 bs=512 count=1 of=/bootlinux.lnx

3. copy the file bootlinux.lnx on your windows drive. Don't copy directly to a NTFS drive you might break it. Instead copy the file to a floppy or a vfat drive first.

4. Edit the file C:\boot.img and add c:\bootlinux.lnx

5. In windows go to control panel -> system, look for the boot option and check for a prompt option with a delay and a default boot option. I'm sorry for not being more specific, I'm writing this out of memory.

6. Remember to repeat this process every time you compile a kernel or make any kind of modification to your lilo

Also google "dual boot linux window" there is a lot of good info, even on the MS site..
 
Old 06-21-2005, 11:18 AM   #9
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Remember to repeat this process every time you compile a kernel or make any kind of modification to your lilo
That would make this method the worst multiboot procedure.
Or the last thing to try if all other bootloaders fail
 
Old 06-21-2005, 11:29 AM   #10
phil.d.g
Senior Member
 
Registered: Oct 2004
Posts: 1,272

Rep: Reputation: 154Reputation: 154
Quote:
Originally posted by mixtr
IF you use Windows NT/2000/XP... ...let windows have the MBR... ...t's even required
no its not

lilo will boot windows perfectly fine.

If you haven't altered the partition table you should just be able put the slackware setup CD in, fire up your computer then when it gets to the point where you would normally fdisk/ run the setup script, mount your partition with the slackware install on, for example
Code:
mount /dev/hda1 /mnt
then reinstall lilo using your system lilo.conf file like this:
Code:
lilo -C /mnt/etc/lilo.conf
if you had linux and windows dual booting before then the configuration for firing up windows will be in that file
 
Old 06-21-2005, 01:13 PM   #11
mixtr
Member
 
Registered: Jul 2004
Location: Ottawa
Distribution: Arch, OpenBSD
Posts: 123

Rep: Reputation: 17
I had a truckload of problems dual booting win+linux before I discovered that method, which is the only one that worked for me. Windows never liked it when I put lilo in MBR. Windows and me were happy to find this compromise.
But now I don't really care, I was generally unahppy with windows and I am now winfree and a happy slacker!
 
Old 06-21-2005, 01:27 PM   #12
ringwraith
Senior Member
 
Registered: Sep 2003
Location: Indiana
Distribution: Slackware 15.0
Posts: 1,272

Rep: Reputation: 65
Let's summarize some things here, or correct some others.

If paritioning is done properly, and the installation went okay, there is rarely if ever a reason to reinstall. Sometimes it is easier if you don't know what happened or how to fix it, but it is not necessary.

If lilo is currently set up to look for the kernel in the wrong partition, by the wrong kernel name, or some other problem, the yes you will get a kernel panic.

If you update your kernel, unless you changed its name, you usually just have to rerun lilo to have it recognized and boot normally.

I would say from my experience that most multi boot setups using lilo, have lilo installed to mbr. Certainly not all, but most.

If /etc/lilo.conf is not correct, just rerunning lilo is not going to correct your problem.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MDK 10.2 GRUB - Windows killed MBR stunter Mandriva 7 03-21-2005 09:07 AM
MBR!!! How to configure it after install Windows XP? shakespy Slackware 5 08-04-2004 01:28 AM
Oops, I let my new windows install overwrite my FC2 bootloader on the MBR... mono Fedora 1 08-03-2004 08:02 PM
XP killed my mbr goldie1 Debian 7 06-24-2004 01:44 AM
If I install LILO to the MBR, can I use it to boot Windows XP? squirrels Linux - General 3 06-11-2004 02:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration