LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-19-2007, 11:12 PM   #1
tipdrill
LQ Newbie
 
Registered: May 2007
Posts: 6

Rep: Reputation: 0
Angry Noob Ubuntu Problem


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
 
Old 05-19-2007, 11:27 PM   #2
jens
Senior Member
 
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,349

Rep: Reputation: 225Reputation: 225Reputation: 225
Quote:
Originally Posted by tipdrill
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
 
Old 05-20-2007, 09:05 AM   #3
Pumalite
Member
 
Registered: Apr 2007
Location: All over
Distribution: Suse 10.2
Posts: 131

Rep: Reputation: 15
Quote:
Originally Posted by jens
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.
 
Old 05-20-2007, 10:49 AM   #4
tipdrill
LQ Newbie
 
Registered: May 2007
Posts: 6

Original Poster
Rep: Reputation: 0
thanks for the replies.

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?
 
Old 05-20-2007, 11:53 AM   #5
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,682
Blog Entries: 9

Rep: Reputation: 45
Quote:
Originally Posted by tipdrill
thanks for the replies.

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.

Last edited by bigjohn; 05-20-2007 at 11:55 AM.
 
Old 05-20-2007, 03:22 PM   #6
1337_penguin
Member
 
Registered: Jul 2005
Location: Brighton, UK
Distribution: Mainly Debian and Mepis, but also Slackware, Arch and Mandriva
Posts: 73

Rep: Reputation: 15
visudo is used to edit the sudoers configuration file. In this case you'd just use sudo, eg.

Code:
# sudo vi /boot/grub/menu.lst
Also if you're looking for a simpler editor, you could use something like nano, if it's installed.

1337_penguin

Last edited by 1337_penguin; 05-20-2007 at 03:25 PM.
 
Old 05-20-2007, 04:57 PM   #7
tipdrill
LQ Newbie
 
Registered: May 2007
Posts: 6

Original Poster
Rep: Reputation: 0
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?
 
Old 05-20-2007, 05:43 PM   #8
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,682
Blog Entries: 9

Rep: Reputation: 45
Quote:
Originally Posted by tipdrill
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.

regards

John
 
Old 05-20-2007, 06:45 PM   #9
tipdrill
LQ Newbie
 
Registered: May 2007
Posts: 6

Original Poster
Rep: Reputation: 0
i got around the access denied and typed this:

# 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.
 
Old 05-20-2007, 06:53 PM   #10
samstar
Member
 
Registered: Apr 2007
Distribution: suse 10.2
Posts: 324

Rep: Reputation: 31
Hi,

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.

Sam
 
Old 05-20-2007, 06:54 PM   #11
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,275

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
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.
 
Old 05-20-2007, 06:56 PM   #12
tipdrill
LQ Newbie
 
Registered: May 2007
Posts: 6

Original Poster
Rep: Reputation: 0
thanks. i will back it up.
 
Old 05-20-2007, 07:11 PM   #13
tipdrill
LQ Newbie
 
Registered: May 2007
Posts: 6

Original Poster
Rep: Reputation: 0
thanks btmiller,

i tried it and i still dont have an entry to windows.
this is strange, but i still like linux better than windows.
 
Old 05-20-2007, 07:40 PM   #14
oskar
Senior Member
 
Registered: Feb 2006
Location: Austria
Distribution: Ubuntu 12.10
Posts: 1,142

Rep: Reputation: 49
hmm...
could you post your menu.lst

I don't want to confuse you, but...

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.

Last edited by oskar; 05-20-2007 at 07:47 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
<noob needs help, cannot get wireless to work in Ubuntu 6.06 Dufran3 Linux - Wireless Networking 3 07-29-2006 03:43 PM
UBUNTU 5.04 PPTP configuration problem . On the Help Page of ubuntu is strange proble ReGgaE-Bg Linux - Networking 1 06-13-2006 09:05 AM
noob away to try ubuntu cormack Ubuntu 2 11-04-2005 11:54 AM
Noob+Ubuntu+Trendnet TEW-221??? jclanzafane Linux - Wireless Networking 0 10-11-2004 10:59 PM


All times are GMT -5. The time now is 06:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration