-   Linux - Newbie (
-   -   GRUB won't work (

faux_05 11-01-2007 09:18 AM

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

faux_05 11-01-2007 09:31 AM

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)

saikee 11-01-2007 11:55 AM

Do it with Kubuntu as Live CD and report any error

sudo mkdir /mnt/root
sudo mount -t ext2 /dev/sda6 /mnt/root
sudo grub
>find stage1
>find menu.lst
>root (hd0,5)
>setup (hd0)

faux_05 11-02-2007 03:44 AM

from the liveCD...


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.
 Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,5)/boot/grub/stage2
/boot/grub/menu.lst"... succeeded


saikee 11-02-2007 05:39 AM

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.

faux_05 11-02-2007 11:12 PM

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

faux_05 11-02-2007 11:15 PM

sorry, i haven't done much work with grub before... :-S

nate6874 11-03-2007 03:00 AM

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)
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

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.

AceofSpades19 11-03-2007 03:05 AM

wubi boots ubuntu via ntdlr chainloading grub, and ubuntu itself is contained in a file when installed via wubi

saikee 11-03-2007 05:05 AM

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

root (hd0,5)
(2) Type the "kernel" command and half-guess the kernel name and let Grub to find the rest

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

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

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

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

geometry (hd0)

saikee 11-03-2007 05:12 AM

deleted due to double posted

saikee 11-03-2007 05:19 AM

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

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.

faux_05 11-03-2007 05:42 AM

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

saikee 11-03-2007 06:00 AM

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.

All times are GMT -5. The time now is 09:27 PM.