LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-09-2004, 09:45 PM   #1
mario08
LQ Newbie
 
Registered: Jan 2004
Location: nj
Distribution: redhat, mandrake, suse
Posts: 6

Rep: Reputation: 0
Cool how to load linux or win from GRUB after installation gone bad


hello guys,

my name is Mario, i need mayor help. i m afraid i messed up my system. well here it goes...i have/had winsrv2003 on my 13GB hd, i found out about how great linux is, so i got some linux distros. i played around with suse, everything was fine. so decide to play around with redhad(when i installed redhat i had my drive partitioned in 3 equal parts) C, D and E. well i had winsvr03 in C drive and rd9.0 in D. E for important files. anyways i decided to install over linux redhat with mandrake and something went really wrong it kept telling me that it was missing the hard drive list or something. and i couldn't for some reason exit the installation. so i did a hard boot and now i can load any of my OS's. it prompts me GRUB and i have no idea how to get the kernel linux or anything to load up. please guide me though this i m a total newbie to linux.

thanks for your response

Mario
 
Old 01-09-2004, 09:59 PM   #2
Onemessedupjedi
Member
 
Registered: Sep 2003
Location: Oregon
Distribution: Slackware 9.1
Posts: 194

Rep: Reputation: 30
since mandrake is so nice it doesn't ask you unless you click the advanced tab during the install to make a boot disk. So pretty much your choices are making a bootdisk (I think something called RAWRITE does it) or if you have access to a slackware CD you can do a rather unhealthly boot from there(It's fine if you boot into slack with the slack disc, but I don't think other distros handle that well even though I know my mandrake 9.1 works fine with booting from it.)
If you have anything called a live CD use it and write lilo or whatever to the MBR(just running lilo will do it) and then you should have a boot loaded and I think you can still use grub by running whatever program it writes to the MBR with.
 
Old 01-09-2004, 10:30 PM   #3
KDE4me
Member
 
Registered: Apr 2003
Location: Australia
Distribution: RedHat 9.0 / Slackware 9.0/ FreeBSD 4.8 / Solaris 8 x86 / Mandrake 9.0
Posts: 90

Rep: Reputation: 15
If I understand correctly you have GRUB installed but it has no entries. Now if you haven't written GRUB to the MBR then you are alright and you should be able to save your data. If you have written GRUB to the MBR then you can say goodbye to your Windows data. DON'T WRITE TO THE MBR!!! IT WILL OVERWRITE YOU OLD PARTITION INFORMATION AND THE OLD PARTITIONS WILL BE UNAVAILABLE - I've learned this from experience.

If your Windows data is important and you have still got it, I'd advise using a windows floppy rescue disk and type: a:>fdisk and set your MRB to ACTIVE for booting - note that this will make GRUB unavailable for booting (I'd advise this option for backing up your data before you fix GRUB - and then set the GRUB partition to ACTIVE). If you haven't written over your MBR then I'd advise you go into rescue mode on your installation CD and use fdisk and edit the /boot/grub/grub.conf file. Or you could just go through the installation and reinstall the bootloader by selecting the upgrade the system option.

If you want to make a bootdisk for linux the command is: /sbin/mkbootdisk
 
Old 01-09-2004, 10:49 PM   #4
mario08
LQ Newbie
 
Registered: Jan 2004
Location: nj
Distribution: redhat, mandrake, suse
Posts: 6

Original Poster
Rep: Reputation: 0
thanks your input guys,but i forgot to mention that now after the installation went bad my pc doesnt recognize the cd drive and i dont have floppy drive either. so i m screwed huh? my pc doesnt boot at all now its not that installed a GRUB or that i used the GRUB to perform the installing. is there any commands that you know that i can use to load the kernel so i can then boot linux or windows if anything. sorry for not including all the accurate informating in the 1st post. this is actaully my 1st time asking for help. thank u so much for your time.

p.s. i dont care if i have to format my whole drive i need my pc rrunning some what
 
Old 01-09-2004, 11:17 PM   #5
NuTBoMbS
LQ Newbie
 
Registered: Jan 2004
Location: UT
Distribution: RedHat, Mandrake, FreeBSD, Knoppix, Gentoo
Posts: 14

Rep: Reputation: 0
Well it sounds to me like you are indeed very screwed... From my limited experience with Linux I know that if your boot loader is messed up, you can't use your CD-ROM or floppy, and you can't boot anything, you might as well do a total reinstall... That'd be the easy way out, assuming that you don't care if all of the data on that drive is wiped out. Also, I've never tried to install Mandrake, and I don't even have it on CD (though for the last two days I've been downloading the three CD's off the internet), so without having ever used that I don't know what kind of setup it does by default on your boot loader or anything... Sorry I'm not of much help, but if I were you I'd go ahead and format your drive.

Also, I've found Red Hat (9.0) to be the best for dual booting OSes (like you were doing) because other distros like Debian, *BSD, etc don't auto-configure your boot loader for you like Red Hat does.
 
Old 01-09-2004, 11:33 PM   #6
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
i find it hard to believe that a messed up mbr is the reason why you can't access the floppy drive or cdrom. have you changed the boot order in your BIOS? if not get into your BIOS and check the boot order. move your cdrom to the top of the list and save your changes. follow this to repair the mbr so you can boot into windows.

http://support.microsoft.com/default...en-us;325375#9

this at least should keep you from losing your windows install. the linux install is a different story. since you started the install over your only linux install, i doubt there's much saving it.
 
Old 01-09-2004, 11:33 PM   #7
mario08
LQ Newbie
 
Registered: Jan 2004
Location: nj
Distribution: redhat, mandrake, suse
Posts: 6

Original Poster
Rep: Reputation: 0
yeah i'd love fomat my entire drive but how? i cant access fdiskor nothing. i guess i should start thinking about a new computer.
 
Old 01-09-2004, 11:35 PM   #8
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
did you check your BIOS?
 
Old 01-10-2004, 01:11 AM   #9
KDE4me
Member
 
Registered: Apr 2003
Location: Australia
Distribution: RedHat 9.0 / Slackware 9.0/ FreeBSD 4.8 / Solaris 8 x86 / Mandrake 9.0
Posts: 90

Rep: Reputation: 15
The recent release of Mandrake 9.2 had some sort of problem with LG CD/DVD ROM drives where it damaged them. I hope you don't have a LG or you haven't installed Mandrake 9.2!!! I'm not sure if this affects other CD drives. They released an update for this about a month ago. I'd advise you do a google search http://www.google.com/linux if you do have this equipment.
 
Old 01-10-2004, 01:54 AM   #10
Onemessedupjedi
Member
 
Registered: Sep 2003
Location: Oregon
Distribution: Slackware 9.1
Posts: 194

Rep: Reputation: 30
Wow, how in the world is grub so dangerous to your partitions? I've had bad installs of linux(mandrake will sometimes freeze and I might forget to install it with slack because I think there is already another boot-loader there) and all I have to do is boot into an OS and write the MBR and I have never had a problem with windows. Can KDE4me clarify how it hurt the partition table? If you can damage the partitions with grub but not with lilo, as have been my experience, why use grub?(other then the nice feature of having spaces in names )

EDIT: Well, after looking into another thread apparently there is a lot more to dual booting then what I have been doing and it apparently can involve losing XP data. Sorry about the bad info, I was going off experience. Good thing I don't care about my windows .

Note: I'm not afraid to wipe a hard drive because I know where information I want is stored, and that is rarely, if ever, inside of a programs grasps. The situation can be different for you so the following may not apply in the least to you.

My rule of thumb when you don't have access to data and you have no access to data....take it to a friends house and plug it in there, back it up, and then erase it from your HD and once you have the install back in drop it back on it....just make sure to NEVER tell it to boot to your hard drive in someone elses computer(I've heard horror stories about that). You probably can't do that with your mandrake install but that was fresh anyways correct?

Last edited by Onemessedupjedi; 01-10-2004 at 02:24 AM.
 
Old 01-10-2004, 04:01 AM   #11
PbO
Member
 
Registered: Nov 2003
Location: BC, Canada
Distribution: Slackware 11.0
Posts: 30

Rep: Reputation: 15
Since you said C: was XP, try typing boot hd(0,0) at the Grub prompt then type makeactive at the Grub prompt and finally, type chainloader+1.

This should tell Grub to use first drive, first partition and make it active (bootable) and then to pass the process along to the bootloader there. this should get you back into Xp, shouldn't it? ONce you are there, you should be able to use whatever the disk administrator program is called now (Manage Disks and Partitions?) to reinstall the XP MBR info etc.

In other words, you can manually type out each line that would have been in Grub's menu.lst and have it boot to your desired OS. I have had to do this in the past with Slackware when I forgot to update menu.lst, after chaning kernels, and it can work.

See http://www.gnu.org/software/grub/man...mono/grub.html for the Grub manual.
 
Old 01-10-2004, 04:39 AM   #12
cdlen
Member
 
Registered: Oct 2003
Location: EU
Distribution: RH7.2 Mdk9.2
Posts: 39

Rep: Reputation: 15
Even if the cd drive was damaged -and don't jump to conclusions to fast - you should still be able to boot with the floppy.\
My bet is that in your bios you boot from the hard disk first and the mbr on it is not right.
So i you'd try change the setting in the bios first to try and load from floppy first .
To enter the bios: this depends on the bios firmware but the principle is to push on the right key at the very first screen , just after switching on. The right key is quite often 'del' , usually shown at the bottom of the screen. Then go over the pages and find 'Boot Sequence' (2nd page ?)and modify (Pg/PD) in order to get 'A' or 'floppy' first. Don't touch anything else ! Save and reboot. You should hear the floppy drive moving.
If this works you can use an Windows boot floppy (ask to a friend) and do a :
>fdisk /mbr
this should allow you to reboot into Windows.
If this works you can then ask how to recover linux..
 
Old 01-10-2004, 08:42 AM   #13
KDE4me
Member
 
Registered: Apr 2003
Location: Australia
Distribution: RedHat 9.0 / Slackware 9.0/ FreeBSD 4.8 / Solaris 8 x86 / Mandrake 9.0
Posts: 90

Rep: Reputation: 15
Onemessedupjedi, I see that you have edited your comment but to state my case, it has been my experience that writing a bootloader(LILO, GRUB, BSDBootloader, SUN, 3rd party) to the MBR overwrites existing partition information and the only information left about the partitions is the information that you just wrote, namely the cylinder information for the partitions created during installation cf when you don't write to the MBR and use a utility such as diskdrake, cfdisk, fdisk during the installation to modify (but not rewrite) the parition table (and/or write a bootloader to a seperate partition). Though the other data might be there physically I have no idea how to access the information. Maybe there is an option to recreate the partitions if you knew the the geometry but whenever I create partitions under fdisk it asks what to format the partitons as (so I believe I will lose my data then). When the installations say that you don't want to write the MBR you DON'T WANT TO WRITE TO IT. To sum up, I see very little reason nowadays why anything should be written to the MBR except for chainloading OS's which don't give you any choice.

Oh, and Mario I'd say that your actually in an okay position as a)Grub is loading(Your HD is okay) b)You don't get BIOS POST errors(you floppy is working)... it just might be your CDROM.
 
Old 01-10-2004, 10:09 AM   #14
mario08
LQ Newbie
 
Registered: Jan 2004
Location: nj
Distribution: redhat, mandrake, suse
Posts: 6

Original Poster
Rep: Reputation: 0
thanks PbO for the link to the GRUB manual, that really helped me. i got windows to load. the only problems i got now is that my cd drive is still not being recognize by the system, when i click on my computer icon it only shows me C and E, not D which is where i have linux nor F which is my cd-rom. what can i do next? i m going to keep looking on the GRUB site. if anyone knows what to do next please let me know, i would appreciate it very much.

p.s. the BIOS say that my CD is not installed. i did put the CD on top in the boot sequence

mario
 
Old 01-10-2004, 05:12 PM   #15
KDE4me
Member
 
Registered: Apr 2003
Location: Australia
Distribution: RedHat 9.0 / Slackware 9.0/ FreeBSD 4.8 / Solaris 8 x86 / Mandrake 9.0
Posts: 90

Rep: Reputation: 15
If you are using NT add the administrative tools to your menu by right clicking the start menu and selecting the option. Then go to Administrative tools > Device Manager, Admin Tools > Computer Management > Logs. Something like those menus is what you want -- see if there are errors saying "Could not find CDROM" etc. Also, try to rescan for devices (I think through Control Pannels) (this almost never works). Did you check the mandrake site about the 9.2 errors??
 
  


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
Win XP installation and Grub AndreiCiprian Linux - Software 11 11-23-2005 07:16 PM
grub win/linux problem Longinus Linux - Newbie 6 08-04-2004 03:27 AM
Grub won't load Win XP gambit9334 Linux - Distributions 5 06-14-2004 06:27 PM
Grub wont load Win XP Memzback Fedora 13 05-07-2004 11:39 AM
hda5: Bad access: cant load linux...HELP sleepwalker1.0 Linux - General 6 10-27-2002 01:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:34 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