LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 11-01-2007, 10:18 AM   #1
faux_05
LQ Newbie
 
Registered: Mar 2006
Distribution: Kubuntu Gutsy
Posts: 15

Rep: Reputation: 0
GRUB won't work


i just installed kubuntu (the hard way, with wubi), but now that it installed properly, i can't access it. When the system boots i get thrown straight into windows, with no GRUB. i pulled back up the livecd and tried fixin grub with grub-install and i keep getting the error stage1 not read correctly. i used grub-install --recheck, it prompted me to generate GRUB menu.lst, i agreed, then it couldn't find /boot/config*. it did finish updating menu.lst though.

linux part = sda6
i would like GRUB in my MBR.

thanks, Matt
 
Old 11-01-2007, 10:31 AM   #2
faux_05
LQ Newbie
 
Registered: Mar 2006
Distribution: Kubuntu Gutsy
Posts: 15

Original Poster
Rep: Reputation: 0
ive tried the followin:

sudo mkdir /mnt/root
sudo mount -t ext2 /dev/sda6 /mnt/root
sudo mount -t proc none /mnt/root/proc
sudo mount -o bind /dev /mnt/root/dev
sude chroot /mnt/root /bin/bash
sudo grub
>find /boot/grub/stage1 (couldn't read stage1)
>root (hd0,5)
>setup (hd0)
 
Old 11-01-2007, 12:55 PM   #3
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Do it with Kubuntu as Live CD and report any error
Code:
sudo mkdir /mnt/root
sudo mount -t ext2 /dev/sda6 /mnt/root
sudo grub
>find stage1 
>find menu.lst
>root (hd0,5)
>setup (hd0)
 
Old 11-02-2007, 04:44 AM   #4
faux_05
LQ Newbie
 
Registered: Mar 2006
Distribution: Kubuntu Gutsy
Posts: 15

Original Poster
Rep: Reputation: 0
from the liveCD...

Code:
grub> find stage1

Error 15: File not found

grub> find menu.lst

Error 15: File not found

grub> root (hd0,5)

grub> setup (hd0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  17 sectors are embedded.
succeeded
 Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,5)/boot/grub/stage2
/boot/grub/menu.lst"... succeeded
Done.

grub>
 
Old 11-02-2007, 06:39 AM   #5
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Got a feeling you typed "grub" instead of "sudo grub" causing the kernel refusing to let you see the stage1 file because you did not ask for the root privilege with "sudo".

The "setup" command did manage to find the stage1 file and now Grub has been installed and will boot to at least a Grub prompt.

If you get a Grub prompt that means Grub has been installed. If you see a boot menu that means the Grub's configuration file /boot/grub/meni.lst exists. You control Grub by editing its menu.lst. If there is no menu.lst you can write one yourself.

If you see no booting menu but a Grub prompt you can use it to boot up "manually" any system that has ever been invented on a PC.

Let us know at what stage you are in now.
 
Old 11-03-2007, 12:12 AM   #6
faux_05
LQ Newbie
 
Registered: Mar 2006
Distribution: Kubuntu Gutsy
Posts: 15

Original Poster
Rep: Reputation: 0
i got the grub prompt :-)

any idea wat i need to do with menu.lst to enable dual boot?

Kubuntu Gutsy 10.7 (all default from livecd)- sda6
WinXP Pro - sda2
 
Old 11-03-2007, 12:15 AM   #7
faux_05
LQ Newbie
 
Registered: Mar 2006
Distribution: Kubuntu Gutsy
Posts: 15

Original Poster
Rep: Reputation: 0
sorry, i haven't done much work with grub before... :-S
 
Old 11-03-2007, 04:00 AM   #8
nate6874
Member
 
Registered: Nov 2007
Location: USA but now Ukraine
Distribution: ubuntu 7.10 "nasty gibbon" :) Mandriva 2008
Posts: 61

Rep: Reputation: 15
depends on if you have vista or xp?

first you need to know where windows is, if your not sure try hd0,0 first. and then if it will not work go on to try hd0,1 and hd0,2 ect.

so your going to go in the terminal and type in "sudo gedit /boot/grub/menu.lst"

this will open the menu.lst in a text editor.

near the bottom of the text you will see: ## ##End Default Options##

right after this line add this:

title Microsoft Windows
root (hd0,0)
makeactive
Chainloader +1

There should also be **SOMETHING LIKE** this for linux, i use ubuntu but it give you an idea:

title Ubuntu 7.10, kernel 2.6.22-14-generic
root (hd0,3)
kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=27c96fda-9808-4018-a7cf-737a53434618 ro quiet splash
initrd /boot/initrd.img-2.6.22-14-generic
quiet

I am not sure about the linux entry, it make sense to me (but i have never tried this) that if you supply the same information you did about windows about linux it should work, you just need to know where linux is, the kernel you have. if it does not work you can always go and change it again...and i bet the linux entry is already there anyways Keep in mind to the the top entry under the "## ##End Default Options##" will be your default boot OS so if you want linux be sure to put it at the top.

Be sure to save the file. next time you reboot you should see windows on the grub list.

Last edited by nate6874; 11-03-2007 at 04:09 AM.
 
Old 11-03-2007, 04:05 AM   #9
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 58
wubi boots ubuntu via ntdlr chainloading grub, and ubuntu itself is contained in a file when installed via wubi
 
Old 11-03-2007, 06:05 AM   #10
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
If you have a Grub you can boot up kubuntu manually this way

(1) Define the root partition you wish to boot as you already know Kubuntu is in (hd0,5) by command
Code:
root (hd0,5)
(2) Type the "kernel" command and half-guess the kernel name and let Grub to find the rest
Code:
kernel /boot/vmlinuz
in the above do not press return but hit the "tap" key. Grub will show all the files name that match the front end name of "vmlinuz". There may be several choices. Select any one and type the full name and add "ro root=/dev/sda6" like this
Code:
kernel /boot/vmlinuz-??????????-???? ro root=/dev/sda6
This is the simplest way of booting up a Kubuntu. When I try mine Kubuntu has only chice.

(3) Repeat Step (2) but for the "initrd" command. You hit the "tap" after finishing
Code:
initrd /boot/initrd
Kubuntu has more than one choice. Just choose one that has the same tail.

(4) Give the green light to Grub to fire up the Linux
Code:
boot
I have tried on my Kubuntu and can confirm it works OK. That is the way I boot any Linux that does not have a boot loader installed. Some distros may need "rw" instead of "ro" (read-write instead of read-only parameter).

Give it a try and if you still have a problem post here the output of Grub command
Code:
geometry (hd0)

Last edited by saikee; 11-03-2007 at 07:07 AM.
 
Old 11-03-2007, 06:12 AM   #11
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
deleted due to double posted

Last edited by saikee; 11-03-2007 at 06:22 AM.
 
Old 11-03-2007, 06:19 AM   #12
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
The commands that I "manually" boots my Kubuntu 7.10 in a single partition sdb10 (known to Grub as (hd1,9)) in a Grub prompt are
Code:
grub> root (hd1,9)

grub> kernel /boot/vmlinuz-2.6.22-14-generic ro root=/dev/sdb10

grub> initrd /boot/initrd.img-2.6.22-14-generic

grub> boot
The purple bits are generated by Grub via the "tap" key. If it works in my case I expect it work in every PC.
 
Old 11-03-2007, 06:42 AM   #13
faux_05
LQ Newbie
 
Registered: Mar 2006
Distribution: Kubuntu Gutsy
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks for all ur help. you're making my linux experience a lot nicer... i went through all the steps and finally figure dout what was wrong. when i installed from the liveCD (via wubi) it didn't create any file in boot. from the help here i constructed the grub files, and gave it a crack, to no avail. with a bit more searching, it turns out that the kernel and ramdisk files hadnt been copied from the cd. i found them under the wubi folder and copied the kernel and ramdisk into the boot folder.

Joila, it works!

Thanks again, for a linux newbie, it's reassuring to no that there are people willing to help. Dpending how kubuntu stacks up with all the reasons i use windows, we may have a new convert.

thanks, matty
 
Old 11-03-2007, 07:00 AM   #14
saikee
Senior Member
 
Registered: Sep 2005
Location: Newcastle upon Tyne UK
Distribution: Any free distro.
Posts: 3,398
Blog Entries: 1

Rep: Reputation: 112Reputation: 112
Nice to see you come through.

We are just PC users enjoying Linux. Don't see any reason why can't you do the same.

You will find as far as booting goes Linux is light years ahead of the M$ systems. You can round up every M$ system that has ever been sold by M$ and install them in the PC and a Grub prompt is all you need to fire everyone up. The Grub's configuration file menu.lst is just a script file containing the manual commands you use, with the addition of the "title" statement to tell yourself the operating system you are about to boot up.

Booting is child play in Linux if you bother to understand it.
 
  


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
Grub does not work satimis Linux - General 7 06-20-2006 04:10 AM
Getting Grub to work r0wb0t Fedora - Installation 5 11-12-2004 07:35 AM
Grub won't work bstopp Linux - Newbie 4 11-11-2004 10:46 AM
commands work with interactive grub, but not in grub.conf richardg Linux - Newbie 2 11-23-2003 05:36 AM
Getting GRUB to work linuxnewbie001 Linux - Software 1 08-01-2003 03:30 PM


All times are GMT -5. The time now is 07:00 AM.

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