View previous topic :: View next topic |
Author |
Message |
leyoy n00b
Joined: 06 Oct 2010 Posts: 26 Location: France
|
Posted: Fri Oct 08, 2010 7:35 pm Post subject: [Solved] some problems with grub |
|
|
Hello again !
Well I have some problems with the grub-install command.
When I do:
Code: | grub-install --no-floppy /dev/sda |
I have:
Code: | The file /boot/grub/stage1 not read correctly |
Here is my fdisk
Code: |
Device Boot Start End Blocks ID System
/dev/sda1 * 1 7295 58597256 7 HPFS/NTFS
/dev/sda2 28874 30401 12273660 7 HPFS/NTFS
/dev/sda3 7296 28873 173325285 5 Extended
/dev/sda5 26686 28873 17575110 83 Linux (ext3) /
/dev/sda6 25591 26684 8787523+ 82 Linux swap / Solaris
/dev/sda7 7296 25589 146946492 83 Linux (ext3) /home |
Here is my fstab:
Code: |
/dev/sda5 /boot ext3 noauto noatime 1 2
/dev/sda5 / ext3 noatime 0 1
/dev/sda6 none swap sw 0 0
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
shmfs /dev/shm tmpfs defaults 0 0 |
And here is my /boot/grub/grub.conf
Code: | splashimage=(hd0,4)/boot/grub/splash.xpm.gz
title Gentoo Linux 2.6.33.7-r29
root (hd0,4)
kernel /boot/kernel-2.6.33.7-r29 root=/dev/sda5
title Gentoo Linux 2.6.33.7-r29 (rescue)
root (hd0,4)
kernel /boot/kernel-2.6.33.7-r29 root=/dev/sda5 init=/bin/bb
title Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1 |
What's wrong ?
Thank you to help me.
Last edited by leyoy on Sat Oct 09, 2010 7:10 pm; edited 1 time in total |
|
Back to top |
|
|
leyoy n00b
Joined: 06 Oct 2010 Posts: 26 Location: France
|
Posted: Fri Oct 08, 2010 8:15 pm Post subject: |
|
|
I've done thaht but nothing start
Code: | grub --no-floppy
grub> root (hd0,4)
grub> setup (hd0,0)
grub> quit |
and
Code: |
exit
umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo
|
But no file finding
anyway, I tried a:
But nothing
Thanks to help me it's my first install on gentoo. |
|
Back to top |
|
|
GES Tux's lil' helper
Joined: 12 Jun 2005 Posts: 108 Location: Budapest, Hungary
|
Posted: Fri Oct 08, 2010 8:44 pm Post subject: |
|
|
"root (hd0,0)" = "/dev/sda1"
"root (hd0,3)" = "/dev/sda5"
This error can easily be avoided!
"grub> root (hd0," and here press TAB
And behold! |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Oct 09, 2010 12:45 am Post subject: |
|
|
/etc/fstab:
Remove Quote: | /dev/sda5 /boot ext3 noauto noatime 1 2 | circular mounting is wrong.
Keep Quote: | /dev/sda5 / ext3 noatime 0 1
/dev/sda6 none swap sw 0 0 |
Suggest remove Quote: | /dev/cdrom /mnt/cdrom auto noauto,ro 0 0 | and allow automounting to work.
Keep Quote: | shmfs /dev/shm tmpfs defaults 0 0 |
Forget about grub-install.
Boot cd, mount gentoo partitions, enter the chroot and run grub:
Code: | mount /dev/sda5 /mnt/gentoo
mount /dev/sda6 /mnt/gentoo/home
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
grub
root (hd0,4)
#should say Filesystem type is ext3fs, partition type 0x83
setup (hd0)
#should end say Running "install /boot/grub/stage1 d (hd0) (hd0)1+19 p
#(hd0,4)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
quit
exit
reboot
|
|
|
Back to top |
|
|
leyoy n00b
Joined: 06 Oct 2010 Posts: 26 Location: France
|
Posted: Sat Oct 09, 2010 7:09 pm Post subject: |
|
|
Thank you for your help Donahue.
Now it's work but some things were strange.
First /grub/ was not in my /boot but in my /
I don't now why emerge put it here.
so I had to put it in my /boot.
The menu.list was partial write Just 3 first lines and stop.
Perhaps the grub-install and the fact that grub was not in the good directory ?
So I wrote it and did again the commands that you posted.
Thank you again |
|
Back to top |
|
|
DONAHUE Watchman
Joined: 09 Dec 2006 Posts: 7651 Location: Goose Creek SC
|
Posted: Sat Oct 09, 2010 7:48 pm Post subject: |
|
|
Quote: | First /grub/ was not in my /boot but in my /
I don't now why emerge put it here. |
Strange, even if you did not Code: | mkdir /mnt/gentoo/boot | /boot is part of the stage3 tarball.
Perhaps mounting sda5 on the /boot directory included in the / directory to which sda5 was mounted caused the install error.
Edit the title of your original post to include [Solved] pls. |
|
Back to top |
|
|
|