LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-08-2002, 11:57 PM   #1
Jondalar
LQ Newbie
 
Registered: Jan 2002
Location: Brisbane QLD Australia
Distribution: RH7.2
Posts: 4

Rep: Reputation: 0
Unhappy WinXP & RH7.1 > WinXp &RH7.2 Dual Boot


Help Please
I had WinXP & RH7.1 working fine using the Windows boot loader and bootsect.lnx, (WinXP on Primary Master, Linux on Slave) when I upgraded to RH7.2 I (foolishly) installed GRUB and now I can't boot RH7.2 apart from using the Boot Floppy. Can someone point me in the right direction?
 
Old 01-09-2002, 03:33 AM   #2
hitesh_linux
Member
 
Registered: Dec 2001
Location: /root
Distribution: FreeBSD,NETBSD,redhat
Posts: 472

Rep: Reputation: 30
win XP & RH 7.2

Hi,
As you metion u r upgrading to RH 7.2.you have make boot floppy again.

if your RH 7.2 on MBR .then use GRUB to boot linux.on console login as root.

type

#uname -r
it show 2.2.16-22

then type

#mkbootdisk --device /dev/fd0 2.2.16-22

insert a blank floppy disk and press enter.
------

Hitesh
 
Old 01-09-2002, 06:56 AM   #3
Jondalar
LQ Newbie
 
Registered: Jan 2002
Location: Brisbane QLD Australia
Distribution: RH7.2
Posts: 4

Original Poster
Rep: Reputation: 0
Sorry I was unclear, I have a boot disk floppy, I need to get the booting from the Windows bootloader working again, have tried remaking the bootsect.lnx but when it tries to boot from it I just get LI and then nothing, complete lockup
 
Old 01-09-2002, 07:32 AM   #4
elist
Member
 
Registered: Dec 2001
Location: MK - UK
Distribution: Mandrake
Posts: 94

Rep: Reputation: 15
I've read and been told that if you use the MBA for linux and already have windows installed, your up the creek without yellow floaty armbands on. The solution is to reload windows. I'm sure someone will correct me if this is wrong.
Maybe it's different for rudehat.
 
Old 01-09-2002, 05:38 PM   #5
Jondalar
LQ Newbie
 
Registered: Jan 2002
Location: Brisbane QLD Australia
Distribution: RH7.2
Posts: 4

Original Poster
Rep: Reputation: 0
OK I am no Linux expert, what is the MBA? Do you mean MBR?? If so I know what you mean, but my linux is not on the MBR, it's on the first sector of the linux partition.

Anyone have any other ideas?
 
Old 01-10-2002, 02:27 AM   #6
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
You could try checking out your /etc/lilo.conf file and make sure the ' boot= ' and ' root= ' lines are pointing to the right partitions. Run /sbin/lilo and then make a copy of the boot sector again.
 
Old 01-11-2002, 09:18 PM   #7
xcon
Member
 
Registered: Jan 2002
Location: Ohio
Distribution: Slackware 9.1 (and some 9.0)
Posts: 181

Rep: Reputation: 30
you said u installed grub? why not use that to boot windoze or linux instead of messing with the win bootloader?
 
Old 01-24-2002, 08:51 AM   #8
blazar
LQ Newbie
 
Registered: Jan 2002
Location: Acton, MA
Distribution: RedHat 7.2
Posts: 4

Rep: Reputation: 0
Question Dual-boot of WinXP and RedHat 7.2 with GRUB

I have the same problem as Jondalar and would love some help. I will give all the details to make things as clear as possible...

Background: I have a new Dell 8200. WinXP (home) was installed by Dell (NTFS) on hda. I installed a second hard drive (hdb) for RedHat 7.2, did a custom install, and chose to put GRUB as my boot loader into the /boot partition (/dev/hdb1) rather than the MBR.

The machine default boots into XP. If I use my Linux boot disk it boots into RedHat. I want to get either the XP bootloader or Grub to dual boot without needing the boot disk.

1) I tried to get the XP bootloader working by going into linux, mounting a floppy, typing:
Code:
dd if=/dev/hdb1 of=/mnt/floppy/linux.bin bs=512 count=1
copying the linux.bin file into the c:\ area in XP, and then adding c:\linux.bin="RedHat 7.2" to the end of the XP boot.ini file.

XP still boots fine, but when I choose 7.2, the screen says "GRUB" and the machine hangs up.

2) I decided to try installing GRUB into the MBR. First (for safety) I decided to use grub-install onto a floppy. I can't get the machine to boot from the floppy. It just leaves me in GRUB. It can't see any of the disks on my system (except the floppy, of course). Until I can get the floppy working, I am not comfortable re-writing the MBR with grub-install.

If it would help to see my grub.conf file, I can post it.

Thanks for any advice you can give, short of tossing the computer out a window...
 
Old 01-24-2002, 11:12 AM   #9
xcon
Member
 
Registered: Jan 2002
Location: Ohio
Distribution: Slackware 9.1 (and some 9.0)
Posts: 181

Rep: Reputation: 30
lots+lots about bootloading

ok. first, installing grub onto /hdb1 means you have to make /hdb the boot disk and /hdb1 the boot partition. the second task is easy enough, but the first is about impossible. usually only the first disk will boot. so grub has to go to the MBR in your case.

when you used XP's bootloader, it found the grub bootsector (stage1) but grub, for whatever reason, couldn't find stage2. that's when stage1 says GRUB and stops dead. i don't know what the deal is, i haven't ever done it that way.

here's what i ended up doing:

download a demo of diskexplorer for NTFS http://www.runtime.org/diskexpl.htm or any absolute sector reader-editor and open your first disk, with the NTFS partition.

find sector #63 (#1 in first part.), this is what chainloader +1 points to.

you ought to find a backup of it somewhere like sector #69, (#7 in the 1st partition) this would be chainloader 6+1
this is made automatically by windows. copy the whole 512 bytes to a blank sector nearby, like #70 thru #85 ought to be blank. make it #73 if you want, then later make your grub.conf say chainloader 10+1 for winXP and it'll boot XP. the trick is to point chainloader at the right sector

+1 = first sector
2+1 = third sector
10+1 = 11th sector
15+5 = sectors 16 thru 21

instead of using grub-install, i had to use the grub shell and found it more suited to our setup.

the command is
grub> install (hd0,5)/boot/grub/stage1 (hd0,0) (hd0,5)/boot/grub/stage2 (hd0,5)/boot/grub/grub.conf

(hd0,5) is /dev/hda6, RH7.2 (we don't have a seperate boot partition, so it's all in /boot)

installing to (hd0,0) replaces XP's bootsector and later XP will backup your GRUBbed bootsector at #69, overwriting xp's backup bootsector so you have to use your own copy. it can be anywhere else since it points to NTLDR, XP's bootloader.

so the partition table points to the first part as the boot drive, the bootsector loads grub, grub loads either XP's bootsector or the linux kernel.

even better, you can also use disk explorer to backup XP's bootsector into an image file, (Edit>>Copy to file...) then leave it on c:\ and point grub to chainloader (hd0,0)/xpboot.img (that's what i named it.) i highly recommend both Disk Explorers, FAT and NTFS, they can basically hex-edit any byte on your entire storage-- no matter the format. each one's just tailor made for that type, not limited to it.

very nice with the details. tks

ps. disk explorer won't save changes unless you take it out of read-only, and XP undoes those changes right away if they're in the bootsector.

Last edited by xcon; 01-24-2002 at 11:17 AM.
 
Old 01-24-2002, 02:02 PM   #10
blazar
LQ Newbie
 
Registered: Jan 2002
Location: Acton, MA
Distribution: RedHat 7.2
Posts: 4

Rep: Reputation: 0
Smile Finally got WinXP and RedHat 7.2 to boot with GRUB

I finally got it! Thanks to xcon for the detailed response, but I found a way to use only GRUB without having to download anything. Here's the deal...

FIRST when booting your machine, go into the BIOS setup (F2 on my Dell 8200). Check to see that your second hard drive (my /dev/hdb for Linux) is recognized by the BIOS! As it turns out, this was my whole problem. The BIOS didn't know /dev/hdb existed! In the BIOS setup, I set my second primary drive to AUTO, rebooted, and then the BIOS found my new 60 Gb drive.

Now to get GRUB from the /boot partition (/dev/hdb1) onto the MBR... (Forget using WinXP's boot loader).

1) Boot into linux. As root, prepare a floppy for GRUB:
Code:
mke2fs /dev/fd0
mount /mnt/floppy
grub-install '(fd0)'
umount /mnt/floppy
Note if you go and look on the floppy you won't see anything there. Don't worry, you wrote a boot record though you can't see it.

2) Make sure your grub.conf file is correct. RedHat 7.2 set mine up correctly. Here is what mine looks like: (Remember that I do have a seperate /boot partition)
Code:
# grub.conf generated by anaconda
#
# Note that you do not hvae to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition. This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd1,0)
#          kernel /vmlinuz-version ro root=/dev/hdb5
#          initrd /initrd-version.img
#boot=/dev/hdb1
default=0
timeout=10
splashimage=(hd1,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.9-13)
        root (hd1,0)
        kernel /vmlinuz-2.4.9-13 ro root=/dev/hdb5 hdc=ide-scsi
        initrd /initrd-2.4.9-13.img
title Windows XP
        rootnoverify (hd0,1)
        chainloader +1
3) Reboot your machine using the floppy. You should get a menu that allows you to choose either Linux or Windows XP. Check that both options work.

4) Now that you are convinced everything works, you can re-write the MBR. Remember that this will overwrite your WinXP bootloader. I assume that if I had screwed things up, the Dell recovery CDs would have allowed me to fdisk a new MBR, but luckily everything worked. So to continue, boot into Linux. As root, type
Code:
grub-install /dev/hda
That's it. You should now be able to boot without a floppy, and Grub should provide a boot menu.

Phew, that was scary for a while.
 
Old 01-24-2002, 02:22 PM   #11
jdevanand
LQ Newbie
 
Registered: Jan 2002
Location: Memphis
Distribution: Redhat 7.2
Posts: 23

Rep: Reputation: 15
Unhappy Grub boot problem

HI,
help me..

I got a dell system (20 Gigs), win xp prof in the first 6 gigs(C , next 9 gigs(D: my imp files :-( ) the same, then in the remaining( 5 gigs ) i have installed linux 7.2 server ..what changes is should make to the /boot/grub.conf to use both xp n linux.. Linux is 2.4.7-10.
able to boot linux but how to use Windows ..
 
Old 01-24-2002, 03:32 PM   #12
xcon
Member
 
Registered: Jan 2002
Location: Ohio
Distribution: Slackware 9.1 (and some 9.0)
Posts: 181

Rep: Reputation: 30
just copy this into grub.conf and erase the DOS or whatever other entry the installer created, it usually points to the wrong drive for me

title Windows XP
rootnoverify (hd0,0)
chainloader +1


blazar, how'd you get (hd0,1), anyway? i thought your XP was first partition...
 
Old 01-24-2002, 04:11 PM   #13
blazar
LQ Newbie
 
Registered: Jan 2002
Location: Acton, MA
Distribution: RedHat 7.2
Posts: 4

Rep: Reputation: 0
Quote:
Originally posted by xcon

blazar, how'd you get (hd0,1), anyway? i thought your XP was first partition...
Actually, Dell installed XP - they put some special Dell thing into a 32 Mb /dev/hda1 (with the bootloader), and loaded XP itself into /dev/hda2 (the rest of the 80 Gb drive).

I put in a new 60 Gb drive (/dev/hdb) for Linux.

Now what can I do with 140 Gb???
 
Old 01-24-2002, 06:07 PM   #14
xcon
Member
 
Registered: Jan 2002
Location: Ohio
Distribution: Slackware 9.1 (and some 9.0)
Posts: 181

Rep: Reputation: 30
aahhhhh!! now i remember, of course!! hidden FAT16, if it's like my buddy's comp. he had the dell thing too, but the very first thing we did was clean-sweep it all and make 4 huge partitions out of the 130GB available... so i forgot.

whoa i'm glad you reminded me.

jdevanand, if you point to (hd0,0) it might not work. i remember also now you have a dell, so you might also need to point grub to (hd0,1) unless you deleted that first very small partition (OR never had it, which i doubt), OR if it's like blazar's where (hd0,0) "redirects" to (hd0,1).

it all depends on which partition has the boot flag set. that's the one you point grub to

thanks blazar, for helping tie up a loose end.

Last edited by xcon; 01-24-2002 at 06:29 PM.
 
Old 01-25-2002, 12:47 PM   #15
jdevanand
LQ Newbie
 
Registered: Jan 2002
Location: Memphis
Distribution: Redhat 7.2
Posts: 23

Rep: Reputation: 15
Red face

thanks xcon,


it worked.............
 
  


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
RH7.3 and WINXP: GRUB can't detect WINXP Izza Linux - Newbie 8 09-05-2005 07:31 AM
Dual Boot RH7.3/WinXP jwarner Linux - Software 3 10-17-2004 09:32 AM
Dual boot 2000 server (NTFS) & RH7.x Stevelsd Linux - Software 1 12-23-2002 01:32 AM
dual boot Win2000 & Rh7 happy hippo Linux - Software 7 05-23-2001 07:29 AM
Dual boot, Win98 & RH7.1 Hachaso Linux - Software 7 05-18-2001 04:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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