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.
I have 2 hds in my box.I bought the newest one just for my linux os.The other has winxp home on it.Both are seagate 80gb.I was manually switching the ide cable from hd to hd as I was learning to install various linux distros.If i designate the win hd as slave and plug both in will the default bootloader for mand10.1(grub i think) see this as another os and ask which one to start?I remember putting the boot loader in the mbr during install.
What I'm after is when I turn on my box to have a choice of which os/hd to boot.
"If i designate the win hd as slave and plug both in will the default bootloader for mand10.1(grub i think) see this as another os and ask which one to start?"
No. grub does not automatically detect operating systems. You have to tell grub what operating systems you have and where they are located. If you are going to rearrange your hard drives then you must reconfigure grub (/boot/grub/grub.conf) and fstab (/etc/fstab) before you make the hard drive rearrangement.
As an alternative you can make the hard drive rearrangement and then use a rescue CD to boot into your Linux OS to do the repair work on grub and fstab.
Unfortunately, because you've been using the two hard drives seperately, they each have their own master boot record and Grub won't automatically recognise windows when you hook up a second disk. You'll need to edit the /boot/grub/menu.lst file on your linux disc and add something like the following:
# For booting windows
# Specify /dev/hda1 as the root partition
#Set the active flag in the partition
# Then boot the windows boot loader
The problem, I believe, is that windows expects to be the master hard drive, so you should set your windows drive as master and your linux drive as slave. The problem then, of course, is that windows will boot when you switch on, and you won't get the option of booting linux.
The easiest way round this that I can think of is to set up everything as above, and then boot the system with a live linux cd such as knoppix. You can then mount your linux root directory; if it's installed on disc hdb the command in knoppix is sudo mount -o dev /dev/hdb1 /mnt/hdb1. You can then install grub to the mbr of the windows hard disc by typing sudo chroot /mnt/hda1 grub-install /dev/hda.
This will work as long as the partition tables on your discs recognise the windows disc as hda (master) and the linux disc as hdb (slave). If you've been using the discs seperately your linux file system will probably name all its partitions as hda as well. I don't know if there's a way round this other than setting up the discs and reinstalling linux from scratch so that it automatically sets itself up as hdb. In fact, the more I think about this, I'm almost certain that you'll have this problem and have to start again, or keep swapping disks.
Does anyone else know a workround for this problem? I've just seen the above post since I've been writing this. Will editing fstab sort everything out? If not the rescue option could work.
OK an update. I've been reading up on this problem and I found a solution in good old Linux in a nutshell. To avoid messing about with the partition names on your linux drive you can install it as the master drive (hda) and windows as the slave drive (hdb). When you first boot you won't be able to access the windows drive but once you're in linux you can modify your grub configuration as described above. However, you need to insert an extra mapping entry:
map (hd0) (hd1)
map (hd1) (hdo)
This tricks windows into thinking its the first hard drive so it will boot. As linux is now your first hard drive you don't need to install grub on the mbr of the windows disk. Let me know if this works.
i am having a similar problem. I installed linux as a second os on my laptop(which had windows xp). Now I cant get my laptop to boot in windows and its pretty frustrating. I am also a newbie and dont know the first thing to do to fix this problem. Please help!
Well you wont believe this.I switched cables to get win running and guess what?......blue screen calling for the rescue disk so I can copy some files from a previous restore point.I think I'll keep it this way for awhile so when I get frustrated with linux I can plug in hd2 and remind myself why I'm using linux and loving it.
Really,when i feel like reloading winblows I'll try the above and post back with the results.Thanks a bunch.
The only thing I'm really after win for is my website builder progy.Its homesteads quicksite builder.(and my lexmark printer ) I contacted homestead and they said they I was sol.I cant even log in to check my site stats via linux.
I can however upload pages via homesteads ftp made with another program.Problem is I know nothing about html.Quicksite was a simple drag and drop program for dummies like me.
Anybody know of a linux app similar to quicksite that I can save/export xml files with?I also miss swishmax.Thanks
i have 2 hds in other pc running xp and ubuntu the mbr should be on primary drive for me thats xp drive and grub gives me a choice everytime now about the mand10.1 it usews lilo i had that on it at one point too. anyway i set hd2 as slave (ubuntu) and hd1 as master (xp)
OK, just to provide some clarification. For those who initially had windows installed and then installed linux - which tends to be the usual way it's done - linux simply installs itself in the mbr and should give you the option of booting to windows when you switch on. In this configuration there's not usually a problem because windows is still on the first primary disc partition.
The problems occur when you try to boot windows from a slave drive - it will refuse to do this unless you trick the windows bootloader into thinking that it is the first primary partition. Linux, on the other hand, doesn't mind where it's installed. However, if you've been using linux on the master drive and then decide to install windows you start to get problems. Windows will overwrite the mbr and you need to reconfigure grub to get it to work. If you change the linux drive to slave and install windows on a new master drive you also have to reconfigure the system.
Terrus, I need more information before I can offer any advice. Did you repartition your drive before installing linux or did you let your linux installer shrink the windows partition? You needed to opt for one of these options otherwise linux would simply take over the hard disc.
I'll assume that you did make room for linux by shrinking windows by some method - your installer might even have done it automatically. You don't say if you can boot into linux. If you can, do so and then open a terminal, log on as root (type su followed by your password) and type fdisk -l. This will bring up the partition table and if windows XP is still there it should be listed as an NTFS partition on /dev/hda1. If you see this everything's still there. You just need to add the following to the bottom of /boot/grub/menu.lst file.
title windows XP
You don't say what distro you're using but if you're using gnome just make sure you're still logged in as root and type gedit /boot/grub/menu.lst to open the file and edit it. If you use kde replace the word gedit with kate.
If you can't see a windows partition you may have overwritten it and have to reinstall windows from scratch and then reconfigure grub.
If you can't even boot into linux what happens when you switch on? Post the details here if you need more help.
Sorry Terrus, I've only just spotted your last post and you seem to have got everything working OK. However, the above might help someone else with the same problem. I've only been dual booting ubuntu linux and xp for the last two months and it's been a steep learning curve, but well worth it. If anyone's just starting out, stick with it. Once you've learned how to configure your system you soon start to wonder why you windows at all, especially if you don't need it for specialised software use.