LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-23-2004, 09:45 PM   #1
Wark
LQ Newbie
 
Registered: Jul 2003
Location: Here
Distribution: Debian "Sarge"
Posts: 7

Rep: Reputation: 0
Can't boot into Linux


Hi. I recently reinstaled XP on my computer, and now I can't get the bootloader to show up. Whenever I turn on my computer, all I get is the familiar "Welcome to Windows..." logo. Is there a way I can set it up so I can use dual boot? If nothing else, I could just reinstall Linux, but I'd rather not go through the hassle.

If it helps any, I'm using Fedora as my distro, and I believe it had GRUB on it before Windows wiped it out.
 
Old 02-23-2004, 09:51 PM   #2
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
You can either boot Linux with a bootdisk or with the CD in rescue mode to reinstall GRUB, using the grub-install command.
eg.
Code:
grub-install /dev/hda
change /dev/hda to where your mbr is.
 
Old 02-23-2004, 10:08 PM   #3
Wark
LQ Newbie
 
Registered: Jul 2003
Location: Here
Distribution: Debian "Sarge"
Posts: 7

Original Poster
Rep: Reputation: 0
Tried that. It's saying something like "Can't find /sbin/grub". Yet, typing in "grub" brings up an interface. I don't exactly understand it.
 
Old 02-23-2004, 10:12 PM   #4
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
try doing "chroot /mnt/sysimage" before grub-install
 
Old 02-23-2004, 10:23 PM   #5
Wark
LQ Newbie
 
Registered: Jul 2003
Location: Here
Distribution: Debian "Sarge"
Posts: 7

Original Poster
Rep: Reputation: 0
Did what you told me. Grub installed without any problems, and I'm happy to say Linux is working just fine. Thanks for the info!
 
Old 02-23-2004, 10:39 PM   #6
jasontn
Member
 
Registered: Feb 2004
Location: Malaysia
Distribution: Fedora Core 2
Posts: 60

Rep: Reputation: 15
Coincidentally, I screwed my bootloaders as well a few minutes ago, after changing some partitions in winxp.

I didn't have a swap partition earlier. So, I deleted a 3rd fat32 partition, built a slightly smaller fat32, leaving room of 0.5GB for linux's swap. Grub died after reboot.

I used my winxp home CD to rescue (rewrite MBR) and could boot into winXP.

Next, I used my RH9 disk and tried to rescue as per the above advises. However, I got this message when I try to

grub-install /dev/hdb3

"The file /boot/grub/stage1 not read correctly"

Any advise besides reinstalling linux?
 
Old 02-23-2004, 10:49 PM   #7
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
can you tell me how your disks are partitioned right now(ie where is winxp, /boot, / etc) and how it was before ?

Last edited by Demonbane; 02-23-2004 at 10:51 PM.
 
Old 02-23-2004, 11:07 PM   #8
jasontn
Member
 
Registered: Feb 2004
Location: Malaysia
Distribution: Fedora Core 2
Posts: 60

Rep: Reputation: 15
fdisk -l says

start end block id system
hdb1 1 1976 15,872k 7 HPFS/NTFS
hdb2 1977 6055 32,765k f Win 95 Ext'd (LBA)
hdb3 6056 7179 9,029k 83 Linux
hdb4 7180 9665 19,969k c Win 95 FAT32 (LBA)
hdb5 1977 6055 32,765k 7 HPFS/NTFS

According to winxp Computer management:
| | | | | |
| NTFS | NTFS | Linux | FAT32 (new) | empty (new) |
| | | | | |


Hope this is enough info.

btw, it's a 80GB HDD. Linux was booting from / which is hdb3.


Last edited by jasontn; 02-24-2004 at 12:10 AM.
 
Old 02-23-2004, 11:17 PM   #9
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Is the bios set to boot from hda(if it exists) or hdb, or something else?
So basically you have a primary, an extended then another 2 primary partitions?

Last edited by Demonbane; 02-23-2004 at 11:32 PM.
 
Old 02-23-2004, 11:20 PM   #10
witeshark
Member
 
Registered: Jan 2004
Location: Miami FL
Distribution: Mac OS X 10.4.11 Ubuntu 12.04 LTS
Posts: 429

Rep: Reputation: 30
Most of these look like the classic, windows wants to OWN the hard drives first MBR, if you partition for dual boot with that in mind, that's half the battle...
 
Old 02-24-2004, 12:04 AM   #11
jasontn
Member
 
Registered: Feb 2004
Location: Malaysia
Distribution: Fedora Core 2
Posts: 60

Rep: Reputation: 15
No primary master device at the moment, i.e. HDD taken away a while ago. Only 1 80GB HDD as primary slave. My CD-ROM is on the secondary controller.

Everything was running perfectly well (grub dual booting), until I "resized" my 3rd win partition to make way for a linux swap (thought I 256MB RAM is enough to avoid a swap but was wrong) using winxp utility.
 
Old 02-24-2004, 12:27 AM   #12
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
k try this, boot into the rescue CD and get in the grub prompt, then enter
Code:
GRUB> root (hd0,1)
it should display the partition type, which should be 83 and whatever filesystem you're using, if it displays type 7, try (hd0,2).
After thats done enter this
Code:
GRUB> setup (hd0)
see if GRUB installs properly

You probably won't be able to make a swap partition using that blank free space, since you already have 3 primary + 1 extended partition. Not exactly sure why this problem occured, probably has something to do with how Windows XP disk manager updated the partition table, but if you're still able to access your files in your Linux partiton then everything should still be ok.

Quote:
Most of these look like the classic, windows wants to OWN the hard drives first MBR, if you partition for dual boot with that in mind, that's half the battle...
IMO I see nothing wrong with Windows taking over MBR, when you install an operating system, obviously you want to be able to use it, the installer does its best making sure that you can, whats wrong with that? Most operating systems aren't designed to co-exist with each other.
 
Old 02-24-2004, 01:04 AM   #13
jasontn
Member
 
Registered: Feb 2004
Location: Malaysia
Distribution: Fedora Core 2
Posts: 60

Rep: Reputation: 15
root (hd0,2) and setup(hd0) said success. Then I reboot, but receive a black screen. Booted into winxp after a few seconds.

Suspecting that GRUB was unable to display the graphical screen, I used arrow key to select Linux (DOS was my default). My guess seems correct but:

-----------------------------------------------------------
Booting 'Red Hat Linux 2.4.20-8
root (hd0,3)
Filesystem type is fat, partition type 0xc
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/ hdc=ide-scsi

Error 15: File not found

Press any key to continue ...

---------------------------------------
This sent me to a blurry GRUB screen -> select DOS -> same message again

Booting into winxp works as normal.

Thanks for the prompt responses. If you think this is getting too complex to troubleshoot properly, I'm willing to reinstall RH9.
 
Old 02-24-2004, 01:09 AM   #14
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
OK that clears things up a bit, boot into rescue mode again, then edit /mnt/sysimage/boot/grub.conf, change all references to (hd0,3) to (hd0,2), reboot and see if it helps.
 
Old 02-24-2004, 02:01 AM   #15
jasontn
Member
 
Registered: Feb 2004
Location: Malaysia
Distribution: Fedora Core 2
Posts: 60

Rep: Reputation: 15
I followed all your instructions and ... woohoo ... I'm now writing in from Linux again.

Thank you very much, Demonbane. That was some voodoo. :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Is there a file that Linux writes upon boot that is the EXACT text as the boot screen lostboy Linux - General 21 01-08-2008 02:10 PM
Cannot boot up on Linux, have to boot onto Linux-nonfb after installing nvidia driver /home/kyle Linux - Newbie 6 09-15-2004 11:23 AM
Grub boot loader menu shows two linux boot options pramos Linux - Newbie 3 09-12-2004 11:40 PM
dual boot - XP and Linux - Need to reinstall XP without effecting linux -LILO boot godofmind Linux - General 1 05-05-2004 08:13 AM
Linux Boot Floppy Went Bad on W2K-Linux Dual Boot rzward Linux - General 2 01-15-2003 10:52 AM

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

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