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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Is it possible for the PC to ask me which hard drive to boot from...
I have one HD with Windows XP and a totally separate one with SUSE Linux 9.2. So far, every time I want to use Linux, I have to open up the case and plug the HD with the Linux OS and unplug the HD with the Windows XP.
The Windows XP HD is in NTFS and would prefer not load Linux in it, and keep each OS in separate drives. Is it possible for the PC to ask me which hard drive to boot from ??
You need to install a bootloader like GRUB or LILO. If you have a bootloader installed, you have the option to boot into different operating systems when your system boots up.
What I suggest you do is connect all your hard drives, let the drive with windows be the master. Rerun the Suse installation and select /dev/hdb as the hard drive for your installation (make sure you don't choose the one with Windows because you may lose all your data). Proceed with the installation as normal but make sure you select the option to install a bootloader on your mbr (master boot record). Suse detects your windows installation and adds it to your bootloaders menu, so when you boot up your system you will have the option to log into Windows or Linux.
I wouldn't reinstall if I didn't have to. There are other ways to do it. Normally, I would put the Windows disk as master and install the boot loader to the mbr of that drive. At your point, it may be easier to go the other way, like I did.
I was given my computer as a hand-me-down (PIII450), so it already had Windows. I purchased another drive and put SuSE on it. SuSE automatically created an option for Windows in the menu.lst file (the boot menu), but Windows doesn't like to boot off the second hard drive. That is a large reason why Windows is usually put on the primary drive. Luckily, tricking Windows into thinking that it is the primary drive is not hard.
Install the Linux drive as master and the Windows drive as slave. Go to the menu (green lizard)-> System-> YaST-> Type your root password-> System (inside YaST)-> Boot Loader Configuration. From here you can mess with boot menu options, default operation system, etc. Click on "Available Selections" to highlight it, and then the "Edit" button.
Here you can see the list of choices you are given when you boot up. You want to add one for windows, so click "Add". It will ask you if you want to clone such-and-such, just say no. Now you will be given a list of options. Each option is a line in the /boot/grub/menu.lst file. Click on "Section Name" and "Edit". The 'Name' is just what shows up in the boot menu. You can put any thing in here you want. I would put "Windows XP" or something. Next, change Section Type to "other" (click on it and then edit).
The map commands are important. These are what trick windows momentarily into thinking that it is the master drive. By the time windows figures out that it's not, it no longer cares. You will need to add the map commands and use the buttons to the right to move them up and down. Just click OK a few times, and you're done.
Alternately, you can just edit the /boot/grub/menu.lst file yourself. Add the following:
title Windows XP
map (hd0) (hd1)
map (hd1) (hd0)
Post back here if you have any problems or confusion. Good luck, and welcome to LQ.
As far as my knowledge goes, it doesn't work with LILO, as LILO does not support cross-disk-booting, eg. you can only boot from the same HD LILO is run off.
GRUB is more intelligent and might be capable to do so.
I indeed recommend WinXP as primary disk, as M$ OSes mostly don't like being run from a second disk. SuSE otoh should (probably) be reinstalled like reddazz says.. this way it will know where to find the root file system and stuff.. possible configuration mismatches are prevented tihs way
lfierro: You can safely ignore rhoekstra's post. If you look at the timestamp, you can tell that he posted at the same time that I did. He didn't have a chance to read my post. I'll respond to his post anyway, for clarity.
GRUB can do so, it does on my system. I didn't know that lilo had that limitation. "As far as my knowledge goes" - means that I will need to research this if I ever intend to try it with LILO.
Windows doesn't like being the second disk. Refer to the "map" command in my previous post.
If you wanted to make SuSE the primary slave instead, there are ways to do this without reinstalling. Reinstalling would be easier than that, but take longer. Making the SuSE drive slave would involve editing /boot/grub/menu.lst, editing /etc/fstab, and probably involve reinstalling GRUB stage 1. Edit: These would also probably need to be done from a live CD like knoppix
My opinion, installing SuSE as master and Windows a slave will be easiest from where you're at.
Reading it afterwards... i can concur with the solution you provide.. the 'map' commands show the true power of GRUB.
As for the 'as far as my knowledge goes' line, it had this limitation when I worked with it. But as soon as GRUB became available I dropped LILO immediately, because of its power to (un)hide partitions before proceeding (and, in this case, mapping). So I haven't kept up with possible enhancements of LILO afterwards.
One small detail I had not mentioned: my two hard drives are both SATA, with no physical option for setting them as either master or slave.
I plugged both hard drives to the mother board and re-installed SUSE 9.2 professional. GRUP started up automatically, made a partition on the hard drive that had windows XP (no questions asked) , and now I have the option of selecting which operating system to start with. Its great !!! But.......here is the BUT: the second hard drive, which originally had the Linux SUSE is not being used at all.....
What happened was on my re-install SUSE Linux installed itself on the same hard drive that Windows XP was on. No data was lost, and everything works O.K in both the Linux and the Windows environment....thought the drive is much smaller with both OPs installed, and I now have a spare hard drive with no use....
That's not cool. I'm sorry that you need to put up with the hassle. SuSE does ask where you want to install to, it just does it passively. When YaST starts, you are given a whole list of options to look at: system hardware, software to be installed, etc. One of the first options in the list the install location. YaST guesses at where to install SuSE. In this case it sounds as though it guessed wrong, and you didn't tell it otherwise.
Look in /boot/grub/menu.lst to learn how it refers to your SATA drives. I'm guessing that they will still be called (hd0) and (hd1). They may use different numbers. One of your drives may not get mentioned.
Then swap the drive cables to make the other drive bootable. Remember, GRUB will now treat the drives as though they switched names. Boot into your original SuSE install (unless you have some other problem with it). Edit the /boot/grub/menu.lst
on this drive. Add the following lines:
title Windows XP
map (hd0) (hd1)
map (hd1) (hd0)
You can also do this from YaST as I explained above. This will tell grub to boot whatever is in the first partition of the second drive, and make it think that it is booting from the first hard disk. It the drive designations that you saw one the other drive are different then alter the above accordingly. if you saw it say (hd5,0) earlier, then use 5 and 6 for example.
If you run into difficulties, post here again. Alternately, you can either live with what you have and format the other drive (I wouldn't, but you can), or you can reinstall SuSE again. Just make sure that you tell YaST to install where you want it, not just to where it guesses.