Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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
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.
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.
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.
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:
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...
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.
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.
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 ..
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).
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.