Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

[gentoo-user-fr] [grub] stage1 non trouve

14 réponses
Avatar
Revolver Onslaught
Bonsoir

Apres avoir suivi le gentoo handbook, je n arrive toujours pas a installer grub

En gros voici ce que j ai

- 2 partitions sur mon disque SATA
/ (/dev/sda5) et /home (/dev/sda6) + partition swap (sda7)

proc Intel Core 2 Duo 64 bits

Une fois dans le chroot et apres le env-update, voici mes fichiers :

livecd / # cat /etc/fstab
/dev/sda7 none swap sw 0 0
/dev/sda5 / ext3 defaults 0 1
/dev/sda6 /home ext3 defaults 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0

livecd / # cat /etc/mtab (copie depuis le cdlive avant chroot puis en
enlevant le superflu)
tmpfs / tmpfs rw 0 0
proc /proc proc rw,nosuid,nodev,noexec 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec 0 0
udev /dev tmpfs rw,nosuid 0 0
devpts /dev/pts devpts rw,nosuid,noexec 0 0
usbfs /proc/bus/usb usbfs rw,noexec,nosuid,devmode=0664,devgid=85 0 0
/dev/sda5 / ext3 rw 0 0

livecd / # cat /boot/grub/menu.lst
default 0
timeout 30
splashimage=(hd0,4)/boot/grub/splash.xpm.gz
title=Gentoo Linux
root (hd0,4)
kernel /boot/kernel-genkernel-x86_64-2.6.24-gentoo-r7 root=/dev/ram0
init=/linuxrc ramdisk=8192 real_root=/dev/sda5 doscsi
initrd /boot/initramfs-genkernel-x86_64-2.6.24-gentoo-r7

Et lorsque je tente l install de grub livecd / # grub-install
--no-floppy --recheck --root-directory=/boot /dev/sdaProbing devices
to guess BIOS drives. This may take a long time.
The file /boot/boot/grub/stage1 not read correctly.

Alors que le fichier est la

livecd / # ls -ls /boot/grub/stage1
4 -rw-r--r-- 1 root root 512 Jul 26 00:15 /boot/grub/stage1

Par contre, le shell grub ne le trouve pas

grub> find /boot/grub/stage1
find /boot/grub/stage1

Error 15: File not found
grub> exit


Je tourne en rond depuis hier malgre mes recherches sur google... ;o(

Quelqu un aurait-il une idee ?

Merci d avance

10 réponses

1 2
Avatar
Guillaume Pujol
------=_Part_122875_1821438.1217018367761
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

2008/7/25 Revolver Onslaught :


Et lorsque je tente l install de grub livecd / # grub-install
--no-floppy --recheck --root-directory=/boot /dev/sdaProbing devices
to guess BIOS drives. This may take a long time.
The file /boot/boot/grub/stage1 not read correctly.

Quelqu un aurait-il une idee ?





En enlevant "--root-directory=/boot" dans la ligne de commandes de
grub-install ?

Sinon, tape simplement "grub"
puis à l'invite:
root (0,4)
setup (hd0,4)
exit



------=_Part_122875_1821438.1217018367761
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div dir="ltr">2008/7/25 Revolver Onslaught &lt;<a href="mailto:revolve "></a>&gt;:<br><div class ="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1p x solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Et lorsque je tente l install de grub livecd / # grub-install<br>
--no-floppy --recheck --root-directory=/boot /dev/sdaProbing devices<br>
to guess BIOS drives. This may take a long time.<br>
The file /boot/boot/grub/stage1 not read correctly.<br>
<br>
Quelqu un aurait-il une idee ?<br>
</blockquote></div><br><br>En enlevant &quot;--root-directory=/boot&quot; dans la ligne de commandes de grub-install ?<br><br>Sinon, tape simplement &quot;grub&quot;<br>puis à l&#39;invite: <br>&gt; root (0,4)<br>&gt; set up (hd0,4)<br>
&gt; exit<br></div>

------=_Part_122875_1821438.1217018367761--
Avatar
Revolver Onslaught
2008/7/25 Guillaume Pujol :
2008/7/25 Revolver Onslaught :

Et lorsque je tente l install de grub livecd / # grub-install
--no-floppy --recheck --root-directory=/boot /dev/sdaProbing devices
to guess BIOS drives. This may take a long time.
The file /boot/boot/grub/stage1 not read correctly.

Quelqu un aurait-il une idee ?




En enlevant "--root-directory=/boot" dans la ligne de commandes de
grub-install ?

Sinon, tape simplement "grub"
puis à l'invite:
root (0,4)
setup (hd0,4)
exit






Voici le resultat

livecd / # grub-install --no-floppy /dev/sda
The file /boot/grub/stage1 not read correctly.
livecd / # grub-install --no-floppy --recheck /dev/sda
Probing devices to guess BIOS drives. This may take a long time.
The file /boot/grub/stage1 not read correctly.
livecd / # grub
Probing devices to guess BIOS drives. This may take a long time.


GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possibl e
completions of a device/filename. ]
grub> root (hd0,4)
root (hd0,4)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0,4)
setup (hd0,4)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no

Error 2: Bad file or directory type

Dommage. J y ai cru... ;o)

Une autre idee ?
Avatar
Etienne Hilson
> Une autre idee ?




cd /boot
ln -s . boot

arrangera peut-être bien les choses

Etienne

--
(__/)
(='.'=) Ceci est un petit lapin. Copiez/collez-le dans
(")_(") votre signature pour l'aider à dominer le monde
Avatar
Revolver Onslaught
Et non...

livecd boot # cd /boot/
livecd boot # ln -s . boot
ln: creating symbolic link `boot/.': File exists
livecd boot # ls -a
.
..
.keep
System.map-genkernel-x86_64-2.6.24-gentoo-r7
boot
grub
initramfs-genkernel-x86_64-2.6.24-gentoo-r7
kernel-genkernel-x86_64-2.6.24-gentoo-r7

Ca valait le coup d essayer

2008/7/25 Etienne Hilson :
Une autre idee ?




cd /boot
ln -s . boot

arrangera peut-être bien les choses

Etienne

--
(__/)
(='.'=) Ceci est un petit lapin. Copiez/collez-le dans
(")_(") votre signature pour l'aider à dominer le monde




Avatar
Guillaume Pujol
------=_Part_123525_1714629.1217021522789
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

2008/7/25 Revolver Onslaught :


grub> root (hd0,4)
root (hd0,4)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0,4)
setup (hd0,4)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no

Error 2: Bad file or directory type

Dommage. J y ai cru... ;o)

Une autre idee ?

Réessaye en supprimant d'abord tout ce qu'il y dans /boot/grub/ ?



------=_Part_123525_1714629.1217021522789
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div dir="ltr"><br><br><div class="gmail_quote">2008/7/25 Revolver Onsl aught &lt;<a href="mailto:">revolver.onslaugh </a>&gt;:<br><blockquote class="gmail_quote" style="border-l eft: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
grub&gt; root (hd0,4)<br>
root (hd0,4)<br>
&nbsp;Filesystem type is ext2fs, partition type 0x83<br>
grub&gt; setup (hd0,4)<br>
setup (hd0,4)<br>
&nbsp;Checking if &quot;/boot/grub/stage1&quot; exists... no<br>
&nbsp;Checking if &quot;/grub/stage1&quot; exists... no<br>
<br>
Error 2: Bad file or directory type<br>
<br>
Dommage. J y ai cru... ;o)<br>
<br>
Une autre idee ?<br>
<br>
</blockquote></div>Réessaye en supprimant d&#39;abord tout ce qu&#39;il y dans /boot/grub/ ?<br></div>

------=_Part_123525_1714629.1217021522789--
Avatar
Revolver Onslaught
Voila

livecd boot # mv grub/ grub.old
livecd boot # mkdir grub
livecd boot # grub-install --no-floppy --recheck /dev/sda
Probing devices to guess BIOS drives. This may take a long time.
The file /boot/grub/stage1 not read correctly.
livecd boot # ls grub
default ffs_stage1_5 reiserfs_stage1_5 vstafs_stage1_5
device.map iso9660_stage1_5 stage1 xfs_stage1_5
e2fs_stage1_5 jfs_stage1_5 stage2
fat_stage1_5 minix_stage1_5 ufs2_stage1_5

C est horrible...

2008/7/25 Guillaume Pujol :


2008/7/25 Revolver Onslaught :

grub> root (hd0,4)
root (hd0,4)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0,4)
setup (hd0,4)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... no

Error 2: Bad file or directory type

Dommage. J y ai cru... ;o)

Une autre idee ?



Réessaye en supprimant d'abord tout ce qu'il y dans /boot/grub/ ?



Avatar
Nicolas Sebrecht
Revolver Onslaught a écrit:

Une fois dans le chroot et apres le env-update, voici mes fichiers :

livecd / # cat /etc/fstab



Cela n'indique rien. Le fstab ne sera utilisé que lorsque ton chroot
sera réellement utilisé comme partition racine par ton noyau. C'est à
dire lorsque tu lances un noyau avec l'option 'root=/dev/sda5'.

livecd / # cat /etc/mtab (copie depuis le cdlive avant chroot puis en
enlevant le superflu)



Ce qu'il est important de connaître, c'est que tu trouves _après_ le
chroot (de mémoire, le handbook fait installer le chargeur de démarrage
dans le chroot).

Tu dois pouvoir retrouver les arborescences /dev, /sys et /proc dans le
chroot. Donc, avant de « chrooter » :
# mount --bind /proc /mnt/gentoo-chroot/proc
# mount --bind /dev /mnt/gentoo-chroot/dev
# mount --bind /sys /mnt/gentoo-chroot/sys

À adapter bien sûr.

Avant toute chose et toujours dans ton chroot, je réinstallerais grub
(ça ne coûte rien). Donc :
# chroot /mnt/gentoo-chroot /bin/bash
(à adapter toujours)
# emerge -av grub

Puis seulement après :
# grub-install /dev/sda

Là, si ça ne fonctionne pas, donne le message d'erreur exact et les
contenus du menu.lst (=grub.conf normalement), la sortie de « mount »
et de « find /boot -exec ls -ld '{}' ; » (tout ça toujours dans le
chroot).

--
Nicolas Sebrecht
Avatar
Revolver Onslaught
Le 26 juillet 2008 01:55, Nicolas Sebrecht a écrit :

Revolver Onslaught a écrit:

Une fois dans le chroot et apres le env-update, voici mes fichiers :

livecd / # cat /etc/fstab



Cela n'indique rien. Le fstab ne sera utilisé que lorsque ton chroot
sera réellement utilisé comme partition racine par ton noyau. C'est à
dire lorsque tu lances un noyau avec l'option 'root=/dev/sda5'.

livecd / # cat /etc/mtab (copie depuis le cdlive avant chroot puis en
enlevant le superflu)



Ce qu'il est important de connaître, c'est que tu trouves _après_ le
chroot (de mémoire, le handbook fait installer le chargeur de démarra ge
dans le chroot).

Tu dois pouvoir retrouver les arborescences /dev, /sys et /proc dans le
chroot. Donc, avant de « chrooter » :
# mount --bind /proc /mnt/gentoo-chroot/proc
# mount --bind /dev /mnt/gentoo-chroot/dev
# mount --bind /sys /mnt/gentoo-chroot/sys

À adapter bien sûr.

Avant toute chose et toujours dans ton chroot, je réinstallerais grub
(ça ne coûte rien). Donc :
# chroot /mnt/gentoo-chroot /bin/bash
(à adapter toujours)
# emerge -av grub

Puis seulement après :
# grub-install /dev/sda

Là, si ça ne fonctionne pas, donne le message d'erreur exact et les
contenus du menu.lst (=grub.conf normalement), la sortie de « mount »
et de « find /boot -exec ls -ld '{}' ; » (tout ça toujours dans le
chroot).

--
Nicolas Sebrecht






Merci pour tes infos. Malheureusement, ca ne fonctionne pas...

Voici l erreur
livecd / # grub-install /dev/sda
The file /boot/grub/stage1 not read correctly.

Et les infos

livecd / # cat /boot/grub/menu.lst
default 0
timeout 30
splashimage=(hd0,4)/boot/grub/splash.xpm.gz
title=Gentoo Linux
root (hd0,4)
kernel /boot/kernel-genkernel-x86_64-2.6.24-gentoo-r7 root=/dev/ram0
init=/linuxrc ramdisk92 real_root=/dev/sda5 doscsi
initrd /boot/initramfs-genkernel-x86_64-2.6.24-gentoo-r7


mount dans le chroot
tmpfs on / type tmpfs (rw)
proc on /proc type proc (rw,nosuid,nodev,noexec)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
udev on /dev type tmpfs (rw,nosuid)
devpts on /dev/pts type devpts (rw,nosuid,noexec)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode64,devgid )
/dev/sda5 on / type ext3 (rw)

hors chroot
tmpfs on / type tmpfs (rw)
/dev/hda on /mnt/cdrom type iso9660 (ro)
/dev/loop0 on /mnt/livecd type squashfs (ro)
proc on /proc type proc (rw,nosuid,nodev,noexec)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
udev on /dev type tmpfs (rw,nosuid)
devpts on /dev/pts type devpts (rw,nosuid,noexec)
tmpfs on /mnt/livecd/lib64/firmware type tmpfs (rw)
tmpfs on /mnt/livecd/usr/portage type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode64,devgid )
tmpfs on /boot type tmpfs (rw)
/dev/sda5 on /mnt/gentoo type ext3 (rw)
none on /mnt/gentoo/proc type proc (rw)
/dev on /mnt/gentoo/dev type none (rw,bind)
/proc on /mnt/gentoo/proc type none (rw,bind)
/sys on /mnt/gentoo/sys type none (rw,bind)

Et enfin

livecd / # find /boot -exec ls -ld '{}' ;
drwxr-xr-x 3 root root 4096 Jul 26 10:31 /boot
-rw-r--r-- 1 root root 23008301 Jul 25 21:21
/boot/initramfs-genkernel-x86_64-2.6.24-gentoo-r7
-rw-r--r-- 1 root root 2458520 Jul 25 21:21
/boot/kernel-genkernel-x86_64-2.6.24-gentoo-r7
-rw-r--r-- 1 root root 0 Jul 25 21:53 /boot/.keep
-rw-r--r-- 1 root root 1409311 Jul 25 21:21
/boot/System.map-genkernel-x86_64-2.6.24-gentoo-r7
drwxr-xr-x 2 root root 4096 Jul 26 10:29 /boot/grub
-rw-r--r-- 1 root root 7552 Jul 26 10:29 /boot/grub/ufs2_stage1_5
-rw-r--r-- 1 root root 30 Jul 26 10:29 /boot/grub/device.map
-rw-r--r-- 1 root root 7200 Jul 26 10:29 /boot/grub/ffs_stage1_5
-rw-r--r-- 1 root root 7968 Jul 26 10:29 /boot/grub/fat_stage1_5
-rw-r--r-- 1 root root 6784 Jul 26 10:29 /boot/grub/vstafs_stage1_5
-rw-r--r-- 1 root root 278 Jul 26 10:23 /boot/grub/menu.lst
-rw-r--r-- 1 root root 7232 Jul 26 10:29 /boot/grub/iso9660_stage1_5
-rw-r--r-- 1 root root 9728 Jul 26 10:29 /boot/grub/reiserfs_stage1_5
-rw-r--r-- 1 root root 512 Jul 26 10:29 /boot/grub/stage1
-rw-r--r-- 1 root root 105948 Jul 26 10:29 /boot/grub/stage2
-rw-r--r-- 1 root root 9384 Jul 26 10:29 /boot/grub/xfs_stage1_5
-rw-r--r-- 1 root root 197 Jul 26 10:29 /boot/grub/default
-rw-r--r-- 1 root root 8064 Jul 26 10:29 /boot/grub/e2fs_stage1_5
-rw-r--r-- 1 root root 7360 Jul 26 10:29 /boot/grub/minix_stage1_5
-rw-r--r-- 1 root root 8672 Jul 26 10:29 /boot/grub/jfs_stage1_5
lrwxrwxrwx 1 root root 1 Jul 25 21:53 /boot/boot -> .


Je vois vraiment pas ce qui cloche,,,
Merci
Avatar
Nicolas Sebrecht
Revolver Onslaught a écrit:

Je vois vraiment pas ce qui cloche,,,



Tout semble ok. Que te donne « fdisk -l » (l comme "ell") ?

--
Nicolas Sebrecht
Avatar
Revolver Onslaught
Le voici:

livecd / # fdisk -l

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xedeeff5b

Device Boot Start End Blocks Id System
/dev/sda1 1 1274 10233373+ 27 Unknown
/dev/sda2 * 1275 15855 117116928 6 FAT16
/dev/sda3 15856 30401 116840745 5 Extended
/dev/sda5 15856 17160 10482381 83 Linux
/dev/sda6 17161 29879 102165336 83 Linux
/dev/sda7 29880 30401 4192933+ 82 Linux swap / Solari s


2008/7/26 Nicolas Sebrecht :

Revolver Onslaught a écrit:

Je vois vraiment pas ce qui cloche,,,



Tout semble ok. Que te donne « fdisk -l » (l comme "ell") ?

--
Nicolas Sebrecht





1 2