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 am experimenting with linux and dual booting on a computer which is not my main one... I decided to delete (i.e. reformat brutally, from within WXP) all the partitions containing linux ... just to see what would happen!
and of course it now turns out that I can't boot either linux or WXP... I just get taken to the grub loader and haven't got a clue what to do, or how to repair the situation. Indeed, I tried to get the WXP installation disks to repair the situation... surprise...! the grub loader still loads!!
none of this is tragic, as I say I am experimenting with a secondary machine... somehow my linux installation seemed to have taken up a bit too much HD space anyway so it had to be sorted out... how does it know which partitions it is allowed to use anyway...??? another mystery
but I'd also like to know how to change the boot order of the grub loader, assuming I eventually get back to a dual boot situation, so that by default it loads WXP... I couldn't work out how to do this... and yet you would have hoped the designers of linux might've anticipated that newbies would want to do this... hmmmm....
in short, in order to avoid quite a lot of future tears and rage and premature heart conditions I think I need to know a bit more about how the grub loader thingy works... any pointers?
Grub installs a small part of itself to the MBR (master boot record) at the beginning of the harddrive. If only xp were installed, it would do the same with it's bootloader.
Since you can'b boot from the xp install cd, I'd guess that your BIOS isn't set to poll the cd drive before the harddrive. You need to restart the computer and edit the bios to poll the cd before booting from HDD. If I remember correctly, you press the delete key while the computer is running the POST routines. There should be a message at the bottom of the screen telling you which key to press.
Once you get the Bios configured, use the xp install disk to boot, and boot into the xp version of command line mode. Then run 'fdisk /mbr', or maybe it's 'fdisk \mbr' to restore the mbr for xp to be bootable. Then re-install Linux.
Grub boots Linux and some other Unix compatibles natively. For xp, grub used the chainloader command to pass booting from grub to xp's bootloader.
Partitions are formatted for the OS that will be installed there. There are octal (?) codes which designate OS type. I don't remember what it for xp, but Linux swap is something like 0x82 and Linux is 0x83 (or something along those lines). That's how the detection and identification is done.
To change the boot order in grub, there are two ways to do it. In the /boot/grub directory, you will have either a grub.conf or menu.lst file. That's the one used by grub to setup the menu you see when grub starts up.
There is a line: default 0. That tells grub to boot the first OS in the list ad the default (grub numbers start at 0). So, if xp is second in the list, change to default 1, and xp is now the default.
Or, just cut and paste the parts of the list to put the OS you want as default as first in the list, and leave the default 0 as is.
Then, google up a copy of the Grub Manual, and read.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.