Déplacer Grub sur une autre partition

.

voila:

SERVER:/home/florent# od -Ax -tx1z -N446 /dev/sda | grep -i rub
000180 52 55 42 20 00 47 65 6f 6d 00 48 61 72 64 20 44  >RUB .Geom.Hard D<
SERVER:/home/florent# od -Ax -tx1z -N446 /dev/sdb | grep -i ru
od: /dev/sdb: Aucun medium trouvé
SERVER:/home/florent# 

Après ca je doit faire quoi ?

merci

guigui69

.

voici:

SERVER:/home/florent# parted /dev/sda unit chs print
Model: ATA WDC WD740GD-00FL (scsi)
Disk /dev/sda: 9039,197,52
Sector size (logical/physical): 512B/512B
BIOS cylinder,head,sector geometry: 9039,255,63.  Each cylinder is 8225kB.
Partition Table: msdos

Number  Start     End          Type      File system  Flags
 1      0,1,0     2479,254,62  primary   ext3              
 2      2480,0,0  2734,254,62  primary   linux-swap        
 3      2735,0,0  9038,254,62  extended                    
 5      2735,1,0  9038,254,62  logical   ext3      

grub> find /boot/grub/stage1
 (hd1,0)

Heu non, j’ai juste 2 disque dur un IDE 150g et un autre en SATA de 74g

.

SERVER:/home/florent# cat /boot/grub/menu.lst
# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default		0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout		5

# Pretty colours
color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
## password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title		Windows 95/98/NT/2000
# root		(hd0,0)
# makeactive
# chainloader	+1
#
# title		Linux
# root		(hd0,1)
# kernel	/vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/sdb1 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd1,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=vga=792 quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(single-user) single
# altoptions=(single-user mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

splashimage=(hd1,0)/boot/grub/splashimages/gentleblue.xpm.gz

title		Debian GNU/Linux, kernel 2.6.26-1-686
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.26-1-686 root=/dev/sdb1 ro vga=792 quiet splash
initrd		/boot/initrd.img-2.6.26-1-686

title		Debian GNU/Linux, kernel 2.6.26-1-686 (single-user mode)
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.26-1-686 root=/dev/sdb1 ro single
initrd		/boot/initrd.img-2.6.26-1-686

title		Debian GNU/Linux, kernel 2.6.24-etchnhalf.1-686
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.24-etchnhalf.1-686 root=/dev/sdb1 ro vga=792 quiet splash
initrd		/boot/initrd.img-2.6.24-etchnhalf.1-686

title		Debian GNU/Linux, kernel 2.6.24-etchnhalf.1-686 (single-user mode)
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.24-etchnhalf.1-686 root=/dev/sdb1 ro single
initrd		/boot/initrd.img-2.6.24-etchnhalf.1-686

title		Debian GNU/Linux, kernel 2.6.18-6-686
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.18-6-686 root=/dev/sdb1 ro vga=792 quiet splash
initrd		/boot/initrd.img-2.6.18-6-686

title		Debian GNU/Linux, kernel 2.6.18-6-686 (single-user mode)
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.18-6-686 root=/dev/sdb1 ro single
initrd		/boot/initrd.img-2.6.18-6-686

title		Debian GNU/Linux, kernel 2.6.18-6-486
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.18-6-486 root=/dev/sdb1 ro vga=792 quiet splash
initrd		/boot/initrd.img-2.6.18-6-486

title		Debian GNU/Linux, kernel 2.6.18-6-486 (single-user mode)
root		(hd1,0)
kernel		/boot/vmlinuz-2.6.18-6-486 root=/dev/sdb1 ro single
initrd		/boot/initrd.img-2.6.18-6-486

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title		Other operating systems:
root
SERVER:/home/florent# grep -i "ata" /boot/config-2.6.26-1-686 
CONFIG_X86_MCE_NONFATAL=m
# CONFIG_RELOCATABLE is not set
CONFIG_ATALK=m
CONFIG_MTD_DATAFLASH=m
CONFIG_ATA_OVER_ETH=m
# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_SCSI_SAS_ATA=y
CONFIG_SCSI_EATA=m
CONFIG_SCSI_EATA_TAGGED_QUEUE=y
CONFIG_SCSI_EATA_LINKED_COMMANDS=y
CONFIG_SCSI_EATA_MAX_TAGS=16
CONFIG_ATA=m
# CONFIG_ATA_NONSTANDARD is not set
CONFIG_ATA_ACPI=y
CONFIG_SATA_PMP=y
CONFIG_SATA_AHCI=m
CONFIG_SATA_SIL24=m
CONFIG_ATA_SFF=y
CONFIG_SATA_SVW=m
CONFIG_ATA_PIIX=m
CONFIG_SATA_MV=m
CONFIG_SATA_NV=m
CONFIG_SATA_QSTOR=m
CONFIG_SATA_PROMISE=m
CONFIG_SATA_SX4=m
CONFIG_SATA_SIL=m
CONFIG_SATA_SIS=m
CONFIG_SATA_ULI=m
CONFIG_SATA_VIA=m
CONFIG_SATA_VITESSE=m
CONFIG_SATA_INIC162X=m
# CONFIG_PATA_ACPI is not set
# CONFIG_PATA_ALI is not set
# CONFIG_PATA_AMD is not set
CONFIG_PATA_ARTOP=m
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CS5520 is not set
# CONFIG_PATA_CS5530 is not set
# CONFIG_PATA_CS5535 is not set
# CONFIG_PATA_CS5536 is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
CONFIG_ATA_GENERIC=m
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_ISAPNP is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_LEGACY is not set
# CONFIG_PATA_TRIFLEX is not set
CONFIG_PATA_MARVELL=m
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_OLDPIIX is not set
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_NS87415 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PCMCIA is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_QDI is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RZ1000 is not set
# CONFIG_PATA_SC1200 is not set
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_SIL680 is not set
CONFIG_PATA_SIS_STUB=m
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set
# CONFIG_PATA_WINBOND_VLB is not set
CONFIG_PATA_SCH=m
CONFIG_USB_STORAGE_DATAFAB=y
CONFIG_USB_STORAGE_CYPRESS_ATACB=y
# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
CONFIG_ATARI_PARTITION=y
# CONFIG_DEBUG_RODATA is not set
# Authenticated Encryption with Associated Data
SERVER:/home/florent# lsmod | grep -i ata
ata_piix               14180  3 
ata_generic             4676  0 
libata                140384  2 ata_piix,ata_generic
scsi_mod              129356  3 sd_mod,usb_storage,libata
dock                    8304  1 libata

[quote]
Pour ce soir on pourra modifier temporairement le menu.lst
afin que tu puisses démarrer sans problèmes.[/quote]

Comment je fait pour mettre a jour la menu.lst?

merci

guigui69

.

Ok mais c’est quoi le problème exacte concernant mon grub?

.

Salut,

Moi je ne vois pas ce qui ne va pas :mrgreen:

Pour moi, d’après les retours de geometry (hd0) au démarrage et puis en live cd
il suffirait de changer dans le menu.lst, les color=#40FF00[/color] par color=#FF0000[/color].

Tu peux essayer en rajoutant au menu, cette entrée

title Test root (hd0,0) kernel /boot/vmlinuz-2.6.26-1-686 root=/dev/sdb1 ro vga=792 quiet splash initrd /boot/initrd.img-2.6.26-1-686
redémarrer et essayer cette entrée. Si ça fonctionne, tu remplaces, dans le
menu.lst, la ligne
# groot=(hd1,0)
par
# groot=(hd0,0)
puis tu enregistres et dans une console

#update-grub

depuis ma debian

grub find /boot/grub/stage1
(hd1,0)

Et depuis grub (demarrage ordi)
(hd0,0)

bizarre.

je test se que tu dit belga

.

oui les deux disque durs sont branchés, car la je suis sur ma debian (installé sur le 74g) et j’accède a mes données qui sont sur le 163g sans problème.

.

Pour l’instant j’ai rien fait de plus j’ai modifier le fichier menulst pour démarrer

SERVER:/home/florent# fdisk -l

Disk /dev/hda: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0000f657

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1       19929   160079661    5  Extended
/dev/hda5               1       19929   160079629+  83  Linux

Disk /dev/sda: 74.3 GB, 74354687488 bytes
255 heads, 63 sectors/track, 9039 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000675fa

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        2480    19920568+  83  Linux
/dev/sda2            2481        2735     2048287+  82  Linux swap / Solaris
/dev/sda3            2736        9039    50636880    5  Extended
/dev/sda5            2736        9039    50636848+  83  Linux
SERVER:/home/florent# od -Ax -tx1z -N446 /dev/sda | grep -i rub
000180 52 55 42 20 00 47 65 6f 6d 00 48 61 72 64 20 44  >RUB .Geom.Hard D<
SERVER:/home/florent# od -Ax -tx1z -N446 /dev/sdb | grep -i rub
od: /dev/sdb: Aucun medium trouvé
grub> find /boot/grub/stage1
 (hd1,0)

grub> geometry (hd0)
drive 0x80: C/H/S = 0/255/63, The number of sectors = 320173056, /dev/hda
   Partition num: 4,  Filesystem type is ext2fs, partition type 0x83

grub> geometry (hd1)
drive 0x81: C/H/S = 0/255/63, The number of sectors = 145223999, /dev/sda
   Partition num: 0,  Filesystem type is ext2fs, partition type 0x83
   Partition num: 1,  Filesystem type unknown, partition type 0x82
   Partition num: 4,  Filesystem type is ext2fs, partition type 0x83
SERVER:/home/florent# lspci
00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)
00:01.0 PCI bridge: Intel Corporation 82865G/PE/P PCI to AGP Controller (rev 02)
00:1d.0 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #1 (rev 02)
00:1d.1 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #2 (rev 02)
00:1d.2 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #3 (rev 02)
00:1d.3 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB UHCI Controller #4 (rev 02)
00:1d.7 USB Controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) USB2 EHCI Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2)
00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801EB (ICH5) SATA Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)
00:1f.5 Multimedia audio controller: Intel Corporation 82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller (rev 02)
01:00.0 VGA compatible controller: nVidia Corporation NV31 [GeForce FX 5600XT] (rev a1)
02:03.0 Ethernet controller: Accton Technology Corporation EN-1216 Ethernet Adapter (rev 11)

merci

guigui69

.

Voici l’ensemble de des commandes:

SERVER:/home/florent# od -Ax -tx1z -N446 /dev/hda | grep -i rub
000180 52 55 42 20 00 47 65 6f 6d 00 48 61 72 64 20 44  >RUB .Geom.Hard D<
SERVER:/home/florent# cat /boot/grub/menu.lst
# menu.lst - See: grub(8), info grub, update-grub(8)
#            grub-install(8), grub-floppy(8),
#            grub-md5-crypt, /usr/share/doc/grub
#            and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default		0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout		5

# Pretty colours
color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line)  and entries protected by the
# command 'lock'
# e.g. password topsecret
## password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title		Windows 95/98/NT/2000
# root		(hd0,0)
# makeactive
# chainloader	+1
#
# title		Linux
# root		(hd0,1)
# kernel	/vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
##      kopt_2_6_8=root=/dev/hdc1 ro
##      kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=/dev/sda1 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
##      alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
##      lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=vga=792 quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
##      lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(single-user) single
# altoptions=(single-user mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
##      howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
##      memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

splashimage=(hd0,0)/boot/grub/splashimages/gentleblue.xpm.gz

title		Debian GNU/Linux, kernel 2.6.26-1-686
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.26-1-686 root=/dev/sda1 ro vga=792 quiet splash
initrd		/boot/initrd.img-2.6.26-1-686

title		Debian GNU/Linux, kernel 2.6.26-1-686 (single-user mode)
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.26-1-686 root=/dev/sda1 ro single
initrd		/boot/initrd.img-2.6.26-1-686

title		Debian GNU/Linux, kernel 2.6.24-etchnhalf.1-686
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.24-etchnhalf.1-686 root=/dev/sda1 ro vga=792 quiet splash
initrd		/boot/initrd.img-2.6.24-etchnhalf.1-686

title		Debian GNU/Linux, kernel 2.6.24-etchnhalf.1-686 (single-user mode)
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.24-etchnhalf.1-686 root=/dev/sda1 ro single
initrd		/boot/initrd.img-2.6.24-etchnhalf.1-686

title		Debian GNU/Linux, kernel 2.6.18-6-686
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.18-6-686 root=/dev/sda1 ro vga=792 quiet splash
initrd		/boot/initrd.img-2.6.18-6-686

title		Debian GNU/Linux, kernel 2.6.18-6-686 (single-user mode)
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.18-6-686 root=/dev/sda1 ro single
initrd		/boot/initrd.img-2.6.18-6-686

title		Debian GNU/Linux, kernel 2.6.18-6-486
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.18-6-486 root=/dev/sda1 ro vga=792 quiet splash
initrd		/boot/initrd.img-2.6.18-6-486

title		Debian GNU/Linux, kernel 2.6.18-6-486 (single-user mode)
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.18-6-486 root=/dev/sda1 ro single
initrd		/boot/initrd.img-2.6.18-6-486

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title		Other operating systems:
root



SERVER:/home/florent# cat /boot/grub/device.map 
(hd0) /dev/sda
(hd1) /dev/sdb

Que me conseilles-tu de modifier en premier? Par quel étape je doit faire commencer?

Merci d’avance

guigui69

.

La j’ai pu redémarrer correctement mais j’ai du enlever les paramètre de splashy sinon ça bloque comme ca:

Splashy ERROR: Timeout (120 sec) occurred while waiting for a 

.