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 just installed Ubuntu 7.04 on a seperate hard drive from my windows xp raid configuration.
Now when i turn on the computer i get a GRUB loader error # 21. I am unable to enter Ubuntu or Windows.
I messed around and changed the BIOS settings from RAID to standard and now i am able to load ubuntu but i desperately need to get into windows and back up some of my school projects.
I did some searching but i didnt know what exactly to look for. Many ppl have had this same error but different variations.
I just installed Ubuntu 7.04 on a seperate hard drive from my windows xp raid configuration.
Now when i turn on the computer i get a GRUB loader error # 21. I am unable to enter Ubuntu or Windows.
I messed around and changed the BIOS settings from RAID to standard and now i am able to load ubuntu but i desperately need to get into windows and back up some of my school projects.
I did some searching but i didnt know what exactly to look for. Many ppl have had this same error but different variations.
Maybe someone can help me! =D
If grub boots Ubuntu, it can boot XP as well.
You just have to add a working line for XP in /boot/grub/menu.lst and that's it.
If XP is installed in the first partition of the firts drive(should be the default if you installed Windows before Linux), add something like this at the end of /boot/grub/menu.lst:
Quote:
title Microsoft Windows XP
root (hd0,0)
savedefault
makeactive
chainloader +1
If grub boots Ubuntu, it can boot XP as well.
You just have to add a working line for XP in /boot/grub/menu.lst and that's it.
If XP is installed in the first partition of the firts drive(should be the default if you installed Windows before Linux), add something like this at the end of /boot/grub/menu.lst:
Ubuntu doesn't recognize Raid arrays. I was trying to install Ubuntu 7.04 in my Raid0 until I gave up and went back to Suse 10.2 Suse recognizes Raids and has a great installer.
Pumalite, this might seem dumb, but where do i insert the "working line for XP in /boot/grub/menu.lst."
Do i go to the ubuntu boot command and type that?
No, you need to go to the file which is called /boot/grub/menu.lst - you will have to read the ubuntu documentation about editing it, because I think it uses something called "visudo" and if my memory serves me correctly then you'd open a terminal and type visudo and hit enter or it might be
Quote:
visudo /boot/grub/menu.lst
then you add the bit that jens mentioned at the bottom, the
Quote:
title Microsoft Windows XP
root (hd0,0)
savedefault
makeactive
chainloader +1
You'd then exit and save (I can only remember the proper "vi" commands for it and don't know if they're the same, but proper vi would be :wq - yes that colon and letters w and q.
Once you're out of the terminal and file editing, you can close down and the bootloader should (if you've got it wrong maybe not) offer you which OS you want to boot either the Ubuntu or windows.
regards
John
p.s. I seem to recall that the Ubuntu site has a well explained section about what should "be in" the bootloader file (well the one that it uses to know what to do/offer), maybe you could have a look there as you should also find the info about using the file/text editor.
i tried the visudo thing and it said "Permission Denied"
as i was looking on the ubuntu forums i read that GRUB is installed on you first hard drive.
So can i delete it off of the first drive? How could i do that?
Google for repairing a windows bootloader - I think it's something like booting the windows disc (if you have one) and then fixmbr or similar - I understand it's dependant on which windows version.
Why would you want to do that, just follow the instructions that 1337_penguin said (I was getting my "vi's" mixed up) and then add the bit that jens said.
If you just replaced the windows bootloader you won't be able to boot into the linux.
Plus, if you make sure that your desktop is showing device icons (mounted or otherwise) it should (I think - though I dont know about raid setups) see the windows drive/partition(s), and you can get the homework stuff copied to the linux partition and edit and print etc from there.
# sudo vi /boot/grub/menu.lst
#title Microsoft Windows XP
#root (hd0,0)
#savedefault
#makeactive
#chainloader +1
(without the # i got a syntax error)
and nothing changed.
so i was thinking i could reload the windows boot loader and then unplug my RAID drives and install linux again on the third drive, this way GRUB wouldnt be on my first RAID disk and i would hopefully be able to load windows, but if i chose to boot from the third disk and use Ubuntu, i could. That was what i was thinking about doing.
Small advice. If you're editing your menu.lst, make a back up when you're done, because Ubuntu will write over it if an update or change in software prompts it to.
It sounds like you're trying to enter those as commands on the command prompt. The /boot/grub/menu.lst is a text file, the idea is to edit it and add an entry for your Windows. The vi text editor is a bit formidable for a n00b ... I suggest you use nano instead as 1337_penguin suggested. Just do:
sudo nano /boot/grub/menu.lst
The file should open up and you should see a bunch of lines describing how to boot various kernels (they look similar but not identical to the lines bigjohn gave you). Go add bigjohn's lines to the end of the file, save it (ctrl+o), exit (ctrl+x), and reboot. You should have an entry to boot Windows.
If you want to simply replace the Windows MBR look at bihjohn's post ... basically you boot a Windows disk into the recovery mode and do fixmbr or fdisk /mbr (it depends on the Windows version) and this overwrites GRUB on the MBR. Note it does not delete Linux, just GRUB so you could reinstall GRUB and have another go at getting it working properly.
Also, there's a fairly good chance that you can mount your Windows partitions within Linux, but if they're on a RAID it's probably less straightforward than either getting GRUB to work with Windows or temporarily restoring the Windows bootloader.
Although I have been using linux for quite a while, and I know my way around vi and nano - when I'm in gnome I use gedit.
$ gedit /boot/grub/menu.lst
could you just copy and paste the whole thing here in [code] tags
I guess you just put it in the wrong place... or maybe a typo. It should definitely show up.
If you just want to backup data, you can easily access your windows partition from linux...
If you run feisty, you just go to
Applications - system tools - ntfs configuration tool. It's self explanatory from there. Your windows partition will show up under "places" in the top bar.
If you don't have the ntfs configuration entry install ntfs-config
$sudo apt-get ntfs-config
Someone above suggested "fixmbr" That's not so good. Windows will then kick grub out of the mbr, and it will only boot windows.
Anyway the way to do that would be to start from the windows cd, choose the recovery console, and then simply type "fixmbr" at the prompt and you're done.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.