Linux - NewbieThis 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
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.
I tried installing Linux on a second hard drive that I had. Everything was working great till for some reason the installation wasnt recognizing the second cd (which I know is fine). After fighting with that for quite a while and it saying it was successfull and it really wasnt I finally disconnected my windows drive (which I probably should have done from the start) and then installed. Everything seemed to work fine that time and now I have linux and no Windows. Is there a way I can add to GRUB my windows operating system? Because I think it originally tried to load itself on my windows disk. All I know is that I want my windows back, but I want to keep my linux.
Another thing I have noticed about GRUB is that I upgraded my kernel and now it is saying I have 4 different options in the GRUB (I am running a multi-processor machine) so I should only have 2, but there are 4.
Thanks any help or linux tips would be much appreciated.
How are your drives connected right now?
As for the options in grub, you can edit them in /boot/grub/grub.conf(or menu.lst)
The old kernel is kept there so that if something goes wrong with the new kernel you still have the option of going back.
Hi JsPatriot,
The reason for you to have 4 options in the grub menu may be you have 2 for the old kernel and 2 for the new. For eache ot the two sets, one of each may have "console text" or "text mode" and the other is the first and default boot which enter graphics mode.
It is easy to set the windows to be booted by grub. If you installed the linux disk as the first, you have to install windows as the second and add one more entry in grub. I think the graphical environment of FC has some utility to add your windows disk, but in reality, all you need is to edit the grub configuration menu, which is named /boot/grub/grub.conf or /boot/grub/menu.lst. You have to add to it
Code:
title = Microsoft Windows (tm)
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
chainloader +1
Okay my drives are connected through IDE cables. Is that what you mean?
As for the windows boot option, it gives me the following error.
Error 13: Invalid or unsupported executable format
Press any key to continue...
So I dont know whats up. Maybe I messed up my windows installation? I hope not. If I did then I need to write alot of CD's with the information and go from there.
Hi JsPatriot,
The question Demonbane did to you was, if you have 2 hds, installed XP in one of those and Linux in the other, what is the order of the disks. When you boot, the linux disk appears as primary master or this is the windows disk.
As you are booting linux as we suppose, can you post the results of the commands "fdisk -l" and "df -v", and also the listing of your grub.conf? This files will help us to clarify the problem you have.
Okay when I installed linux (and actually got it to work) I had disconnected my drive windows drive which was primary master. The linux drive is secondary master.
fdisk -l returned the following:
Code:
Disk /dev/hda: 40.0 GB, 40020664320 bytes
16 heads, 63 sectors/track, 77545 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 77536 39078081 7 HPFS/NTFS
Disk /dev/hdc: 20.5 GB, 20525137920 bytes
16 heads, 63 sectors/track, 39770 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hdc1 * 1 203 102280+ 83 Linux
/dev/hdc2 204 37690 18893448 83 Linux
/dev/hdc3 37691 39770 1048320 82 Linux swap
df -v returned the following:
Code:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hdc2 18596936 2945972 14706292 17% /
/dev/hdc1 99043 11080 82849 12% /boot
none 257768 0 257768 0% /dev/shm
The grub.conf before I tried the above (windows add in thingie):
Code:
# grub.conf generated by anaconda
#
# Note that you do not have 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 (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hdc2
# initrd /initrd-version.img
#boot=/dev/hdc
default=2
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Fedora Core (2.6.6-1.435.2.3)
root (hd0,0)
kernel /vmlinuz-2.6.6-1.435.2.3 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.6-1.435.2.3.img
title Fedora Core (2.6.6-1.435.2.3smp)
root (hd0,0)
kernel /vmlinuz-2.6.6-1.435.2.3smp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.6-1.435.2.3smp.img
title Fedora Core (2.6.5-1.358smp)
root (hd0,0)
kernel /vmlinuz-2.6.5-1.358smp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.5-1.358smp.img
title Fedora Core-up (2.6.5-1.358)
root (hd0,0)
kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.5-1.358.img
The grub.conf now:
Code:
# grub.conf generated by anaconda
#
# Note that you do not have 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 (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hdc2
# initrd /initrd-version.img
#boot=/dev/hdc
default=2
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title = Microsoft Windows (tm)
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
chainloader +1
title Fedora Core (2.6.6-1.435.2.3)
root (hd0,0)
kernel /vmlinuz-2.6.6-1.435.2.3 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.6-1.435.2.3.img
title Fedora Core (2.6.6-1.435.2.3smp)
root (hd0,0)
kernel /vmlinuz-2.6.6-1.435.2.3smp ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.6-1.435.2.3smp.img
When I click the windows it gives me an error that is as follows.
Code:
Error 13: Invalid or unsupported executable format.
Press any key to continue...
Thank you everyone for your help and I hope someone can come up with a solution!
JS
I think that you might try removing the two map lines from your menu file. From what I understand those are meant to trick Windows into thinking it is installed on the first hard disk. It is already installed there so removing those might do something.
Hi JSThePatriot,
As Kroenecker said, you must remove the lines "map (hd0) (hd1)" and "map (hd1) (hd0)". In my prior post I suggested it based on the supposition your windows drive was the second. Also, I guess the lines where you see "(hd0)" or "(hd0,x)" in the Fedora entries should be changed to "(hd1)" and "(hd1,x)" as your linux is on the second disk. I refer to the entries "splashimage" and "root (hd0,0)" in the FC entries.
I have the same problem that patriot has. Using the information from the other posts, I configured my grub.conf however when selecting windows from the menu the lines from the windows section of grub.conf with a message saying that there is an error in them.
I cannot load Windows even by setting the BIOS to load through the hard disk with windows, while loading windows stalls. The only way to load windows is to disconnect the hard disk that has Linux on it. I have tried all the suggestions such as using the makeactive command, unsuccessfully.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.