Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 08/01/2011, à 01:46

pseudologos

grub 2

Bonjour,


Existe-t-il une ligne de commande pour savoir où Grub est installé? En fait j'ai 2 disques durs internes avec Lucid sur sdb. Sda est un disque de sauvegarde...

Hors ligne

#2 Le 08/01/2011, à 02:26

chopinhauer

Re : grub 2

Tu peux chercher le premier secteur de chaque périphérique disque s'il contient la chaîne "GRUB" :

sudo dd if=/dev/disque_a_utiliser bs=512 count=1 | hexdump -e \"%_p\"

Cela peut bien sur être scripté :

#!/bin/sh
if [ `id -u` -ne 0 ]; then
    echo Error: Must be run as \'root\'. >&2
    exit 1
fi

if [ ! -f /boot/grub/device.map ]; then
    grub-mkdevicemap --no-floppy
fi

for disk in `cut -f 2 /boot/grub/device.map`; do
    for part in "$disk"*; do
        if dd if="$part" bs=512 count=1 2>/dev/null | grep GRUB >/dev/null; then
            echo Grub installed on: `readlink -f "$part"`
        fi
    done
done

Dernière modification par chopinhauer (Le 08/01/2011, à 06:13)


Pensez à donner un bon titre à vos sujets : cela permettra d'aider d'autres utilisateurs dans votre même situation. Ce n'est pas qu'en donnant des solutions qu'on aide, mais aussi en posant des bonnes questions et… facilement trouvables.

Hors ligne

#3 Le 08/01/2011, à 05:05

YannUbuntu

Re : grub 2

bonjour
ca m'interesse aussi smile
@chaupinhauer: merci pour ce script interessant.
Mais il n'y a plus de device.map depuis 10.04 ou 9.10 ...
de plus, si grub a ete installe/ quelquepart puis reinstalle/ ailleurs, ce script risque de retourner les 2 emplacements.
Enfin, quid d'un grub sur / ?

Qu'en penses-tu?


à consulter/améliorer: Guide du Débutant, Logiciels, Ecole, Travail, Maison

Hors ligne

#4 Le 08/01/2011, à 06:19

Compte anonymisé

Re : grub 2

Salut

Il existe aussi bootinfoscript  plus complet mais donnant ce type d'infos.

@+

#5 Le 08/01/2011, à 06:24

chopinhauer

Re : grub 2

Normalement un device.map est créé lors de l'installation de Grub dans les secteurs de démarrage du disque.

Si des bouts d'installation de Grub se trouvent à plusieurs endroits, ils seront tous retournés, mais seul le premier sera celui utilisé au démarrage (la device.map donne en gros l'ordre dans lequel les disques sont utilisés au démarrage).

Pour ce qui est de la partie de Grub qui réside à l'intérieur du système de fichiers, elle est très bien gérée par le gestionnaire de paquets. C'est le morceau installé en dehors de tout système de fichiers qui est plus caché.


Pensez à donner un bon titre à vos sujets : cela permettra d'aider d'autres utilisateurs dans votre même situation. Ce n'est pas qu'en donnant des solutions qu'on aide, mais aussi en posant des bonnes questions et… facilement trouvables.

Hors ligne

#6 Le 08/01/2011, à 10:06

YannUbuntu

Re : grub 2

ok merci. Ta modif du script corrige le problème en créant le fichier.
Deux points m'intriguent encore :  a quoi servent "2>/dev/null" et ">/dev/null" ?


à consulter/améliorer: Guide du Débutant, Logiciels, Ecole, Travail, Maison

Hors ligne

#7 Le 08/01/2011, à 10:41

cep

Re : grub 2

pseudologos a écrit :

Bonjour,


Existe-t-il une ligne de commande pour savoir où Grub est installé? En fait j'ai 2 disques durs internes avec Lucid sur sdb. Sda est un disque de sauvegarde...

interessant le script, mais l'interêt de device.map étant maintenant moindre puisque non créé automatiquement, il y a une solution plus simple, voir la configuration du paquet grub avec debconf-show grub-pc.

Par exemple ainsi :

$ sudo debconf-show grub-pc |grep "install_devices:"
* grub-pc/install_devices: /dev/disk/by-id/ata-ExcelStor_Technology_J8160_PV2300Q40A2UWC-part2

qui nous dit qu'il est installé dans la partition 2 du disque ata-xxxxxx et cela pour la distribution concernée.

Voir si nécessaire :
ls -l  /dev/disk/by-id/

sudo n'est pas nécessaire, il y aura un message d'erreur mais l'indication sera affichée.

Pour plus de détails et utilisation si nécessaire de dpkg-reconfigure pour réinstaller grub, ce qui est la solution la plus simple, voir :

http://www.cepcasa.info/blog/?p=193

Hors ligne

#8 Le 08/01/2011, à 10:46

pseudologos

Re : grub 2

Bonjour et merci pour vos réponses,..

Pour moi qui suis novice sur Linux, j'avoue ne pas comprendre la différence entre script et commandes de terminal. En tous cas, je cherche le plus simple. 

sudo dd if=/dev/disque_a_utiliser bs=512 count=1 | hexdump -e \"%_p\"

Je peux utiliser cette ligne de commandes sans risque ?

Excusez mon ignorance et merci pour votre aide.

Hors ligne

#9 Le 08/01/2011, à 11:11

pseudologos

Re : grub 2

Merci cep

Voici ce que me dit mon terminal

$ sudo debconf-show grub-pc |grep "install_devices:"

* grub-pc/install_devices: /dev/disk/by-id/ata-Maxtor_6Y080L0_Y27PCDLE

Autrement dit grub2 est installé sur maxtor... donc, chez moi, sur sda

C'est ce que je craignais. Voici la discussion que j'ai commencé sur un autre forum et qui motivait ma demande. Je serais heureux d'avoir vos avis : 

http://forum.ubuntu-fr.org/viewtopic.php?id=437282

Merci beaucoup

Hors ligne

#10 Le 08/01/2011, à 11:24

Compte anonymisé

Re : grub 2

Voir quand même le post #4 car pour la simplicité on ne peut pas faire + :
1) télécharger le script
2) l'exécuter
3) regarder le résultat dans le fichier RESULT.TXT
wink

Dernière modification par Compte anonymisé (Le 08/01/2011, à 11:25)

#11 Le 08/01/2011, à 11:51

pseudologos

Re : grub 2

J'essaie mais sans succès : je n'arrive pas à l'exécuter


ludovic@ludovic-desktop:~$ sudo bash ~ / Desktop / *. sh boot_info_script
[sudo] password for ludovic:
/home/ludovic: /home/ludovic : ceci est un répertoire
ludovic@ludovic-desktop:~$ sudo bash ~ / bureau / *. sh boot_info_script
/home/ludovic: /home/ludovic : ceci est un répertoire
ludovic@ludovic-desktop:~$ sudo bash [ /home/ludovic/bureau ] / boot_info_script *. sh
/usr/bin/[: /usr/bin/[ : fichier binaire impossible à lancer
ludovic@ludovic-desktop:~$ sudo bash / home / ludovic / bureau / boot_info_script *. sh
/: / : ceci est un répertoire
ludovic@ludovic-desktop:~$ sudo bash ~/Desktop/boot_info_script*.sh
bash: /home/ludovic/Desktop/boot_info_script*.sh: Aucun fichier ou dossier de ce type
ludovic@ludovic-desktop:~$ sudo bash /home/ludovic/bureau/boot_info_script055*.sh
bash: /home/ludovic/bureau/boot_info_script055*.sh: Aucun fichier ou dossier de ce type
ludovic@ludovic-desktop:~$ sudo bash ~ /home/ludovic/Bureau/boot_info_script055.sh
/home/ludovic: /home/ludovic : ceci est un répertoire
ludovic@ludovic-desktop:~$

Hors ligne

#12 Le 08/01/2011, à 11:54

cep

Re : grub 2

pseudologos a écrit :

Voici ce que me dit mon terminal

$ sudo debconf-show grub-pc |grep "install_devices:"

* grub-pc/install_devices: /dev/disk/by-id/ata-Maxtor_6Y080L0_Y27PCDLE

Autrement dit grub2 est installé sur maxtor... donc, chez moi, sur sda

Alors, pour lancer un script il faut généralement le rédiger dans un fichier, rendre ce script exécutable et lancer le script. Bien sûr on peut faire cela plus simplement.
Une commande dans un terminal se passe simplement, comme celle que tu lances avec debconf-show grub-pc ou un simple ls -l pour lister un répertoire.

Pour la commande debconf-show grub-pc on peut faire plus simple dans la façon d'afficher le résultat, par exemple avec  ceppte commande :

for grub in `debconf-show grub-pc | awk '/install_devices:/ {print $3}'` ; do ls -l "$grub"  ; done

Bien faire attention aux guillemets et sens des guillements. Ce qui donnera par exemple :

$ for grub in `debconf-show grub-pc | awk '/install_devices:/ {print $3}'` ; do ls -l "$grub"  ; done
debconf: DbDriver "passwords" warning: could not open /var/cache/debconf/passwords.dat: Permission non accordée
lrwxrwxrwx 1 root root 10  6 janv. 19:35 /dev/disk/by-id/ata-ExcelStor_Technology_J8160_PV2300Q40A2UWC-part2 -> ../../sda2

Je laisse volontairement cette présentation car la commande est lancée sans sudo. Se méfier des commandes avec sudo que l'on ne comprend pas et des scripts miracle trouvés sur les forums.

Dernière modification par cep (Le 08/01/2011, à 12:02)

Hors ligne

#13 Le 08/01/2011, à 11:55

cep

Re : grub 2

jeanjd63 a écrit :

Voir quand même le post #4 car pour la simplicité on ne peut pas faire + :
1) télécharger le script
2) l'exécuter
3) regarder le résultat dans le fichier RESULT.TXT
wink

roll
sans commentaire

Hors ligne

#14 Le 08/01/2011, à 12:06

ar barzh paour

Re : grub 2

essaie ceci
sudo bash /home/ludovic/Bureau/boot_info_script055.sh


PC          : B760M DS3H DDR4,  12th Gen Intel(R) Core(TM) i3-12100, RAM DDR4 8GiB -2400 Ubuntu 22.04, 22.04, 23.04
Portable1 : Intel(R) Core(TM)2 Duo CPU     T6570  @ 2.10GHz RAM 4GiB DDR2 667 MHz Ubuntu 23.04 ( en voyage )
Portable2 : T5750  @ 2.00GHz RAM 1GiB DDR2 667 Mhz Ubuntu 20.04 ( batterie HS )
stourm a ran war bep tachenn (Angela Duval) ( Je combats sur tous les fronts )

Hors ligne

#15 Le 08/01/2011, à 12:12

ar barzh paour

Re : grub 2

et le script s'en tire bien pour moi...
vu la configuration de mes disques avec windows, ubuntu 10.04 , ubuntu 10.04 et ubuntu 10.10 !!!!!!!!!!!!!!!!!!!!!

                Boot Info Script 0.55    dated February 15th, 2010                   

============================= Boot Info Summary: ==============================

=> Windows is installed in the MBR of /dev/sda
=> Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in
    partition #7 for /boot/grub.
=> Grub 2 is installed in the MBR of /dev/sdc and looks on the same drive in
    partition #5 for (,msdos5)/boot/grub.

sda1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows XP
    Boot files/dirs:   /boot.ini /ntldr /NTDETECT.COM

sda2: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System: 
    Boot files/dirs:   

sda3: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System: 
    Boot files/dirs:   

sda4: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System: 
    Boot files/dirs:   

sdb1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows XP
    Boot files/dirs:   /boot.ini /ntldr /NTDETECT.COM

sdb2: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  Unknown
    Boot sector info: 

sdb5: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 10.04.1 LTS
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sdb6: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

sdb7: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 10.04.1 LTS
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sdb8: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

sdb9: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System: 
    Boot files/dirs:   

sdc1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  Windows XP
    Boot files/dirs:   /boot.ini /ntldr /NTDETECT.COM

sdc2: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System: 
    Boot files/dirs:   

sdc3: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows Vista/7
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System: 
    Boot files/dirs:   

sdc4: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info: 

sdc5: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 10.10
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sdc6: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disque /dev/sda: 500.1 Go, 500107862016 octets
255 têtes, 63 secteurs/piste, 60801 cylindres, total 976773168 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sda1    *             63   174,080,339   174,080,277   7 HPFS/NTFS
/dev/sda2         518,144,445   862,208,549   344,064,105   7 HPFS/NTFS
/dev/sda3         174,080,340   518,144,444   344,064,105  83 Linux
/dev/sda4         862,208,550   976,768,064   114,559,515   7 HPFS/NTFS


Drive: sdb ___________________ _____________________________________________________

Disque /dev/sdb: 500.1 Go, 500107862016 octets
255 têtes, 63 secteurs/piste, 60801 cylindres, total 976773168 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sdb1    *             63   261,052,998   261,052,936   7 HPFS/NTFS
/dev/sdb2         261,054,462   976,768,064   715,713,603   5 Extended
/dev/sdb5         492,263,793   738,480,747   246,216,955  83 Linux
/dev/sdb6         958,646,808   976,768,064    18,121,257  82 Linux swap / Solaris
/dev/sdb7         261,054,464   482,779,135   221,724,672  83 Linux
/dev/sdb8         482,781,184   492,263,423     9,482,240  82 Linux swap / Solaris
/dev/sdb9         738,492,048   958,646,744   220,154,697  83 Linux


Drive: sdc ___________________ _____________________________________________________

Disque /dev/sdc: 500.1 Go, 500107862016 octets
255 têtes, 63 secteurs/piste, 60801 cylindres, total 976773168 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sdc1    *             63   102,398,309   102,398,247   7 HPFS/NTFS
/dev/sdc2         102,398,310   215,046,089   112,647,780   7 HPFS/NTFS
/dev/sdc3         215,046,090   856,071,719   641,025,630   7 HPFS/NTFS
/dev/sdc4         856,072,190   976,771,071   120,698,882   5 Extended
/dev/sdc5         856,072,192   959,588,351   103,516,160  83 Linux
/dev/sdc6         959,590,400   976,771,071    17,180,672  82 Linux swap / Solaris


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda1        A078A27E78A252B8                       ntfs       XPa1                         
/dev/sda2        7EAEECD2533E7DAB                       ntfs       S_Data_a2                     
/dev/sda3        09e9e7c8-a78a-4270-aee1-db55a446ecc3   ext4       S_home_a3                     
/dev/sda4        5B59C3115FC22FD3                       ntfs       S_Z_a4                       
/dev/sda: PTTYPE="dos"
/dev/sdb1        78684472684430E4                       ntfs       XPb1                         
/dev/sdb2: PTTYPE="dos"
/dev/sdb5        8d6c97e8-8c26-430c-8353-2b35b82c73d1   ext4       Ub5                           
/dev/sdb6        de7c7e33-a5b4-4bd4-be64-e1e59ae987a6   swap                                     
/dev/sdb7        6c2442e5-3543-4bec-9f70-210ecf652610   ext4       Ub7                           
/dev/sdb8        d32720eb-3bc9-4f30-877f-f939c9472be2   swap                                     
/dev/sdb9        b703721e-397f-49c4-a30e-8de5e623d55f   ext4       N_home                       
/dev/sdb: PTTYPE="dos"
/dev/sdc1        8C5411AF54119CD0                       ntfs       XPc1                         
/dev/sdc2        08E74A35596CFF0A                       ntfs       Z_c2                         
/dev/sdc3        64CC92B54362A231                       ntfs       Data_c3                       
/dev/sdc4: PTTYPE="dos"
/dev/sdc5        209f6a9c-4342-4780-89ae-4fa14d0c3365   ext4       Uc5                           
/dev/sdc6        9621a614-a277-437c-9a73-1a066b4587c3   swap                                     
/dev/sdc: PTTYPE="dos"
error: /dev/sdd: No medium found
error: /dev/sde: No medium found
error: /dev/sdf: No medium found
error: /dev/sdg: No medium found

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

/dev/sdc5        /                        ext4       (rw,errors=remount-ro,commit=0)
/dev/sdb9        /home                    ext4       (rw,commit=0)


================================ sda1/boot.ini: ================================

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP dition familiale" /noexecute=optin /fastdetect

================================ sdb1/boot.ini: ================================

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP dition familiale" /noexecute=optin /fastdetect

=========================== sdb5/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  set saved_entry=${prev_saved_entry}
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z ${boot_once} ]; then
    saved_entry=${chosen}
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=-1
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-25-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,5)'
    search --no-floppy --fs-uuid --set 8d6c97e8-8c26-430c-8353-2b35b82c73d1
    linux    /boot/vmlinuz-2.6.32-25-generic-pae root=UUID=8d6c97e8-8c26-430c-8353-2b35b82c73d1 ro   quiet splash
    initrd    /boot/initrd.img-2.6.32-25-generic-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    insmod ext2
    set root='(hd1,5)'
    search --no-floppy --fs-uuid --set 8d6c97e8-8c26-430c-8353-2b35b82c73d1
    linux16    /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod ext2
    set root='(hd1,5)'
    search --no-floppy --fs-uuid --set 8d6c97e8-8c26-430c-8353-2b35b82c73d1
    linux16    /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows NT/2000/XP (on /dev/sda1)" {
    insmod ntfs
    set root='(hd0,1)'
    search --no-floppy --fs-uuid --set a078a27e78a252b8
    drivemap -s (hd0) ${root}
    chainloader +1
}
menuentry "Windows NT/2000/XP (on /dev/sdb1)" {
    insmod ntfs
    set root='(hd1,1)'
    search --no-floppy --fs-uuid --set 78684472684430e4
    drivemap -s (hd0) ${root}
    chainloader +1
}
menuentry "Ubuntu, avec Linux 2.6.32-25-generic-pae (on /dev/sdb7)" {
    insmod ext2
    set root='(hd1,7)'
    search --no-floppy --fs-uuid --set 6c2442e5-3543-4bec-9f70-210ecf652610
    linux /boot/vmlinuz-2.6.32-25-generic-pae root=UUID=6c2442e5-3543-4bec-9f70-210ecf652610 ro quiet splash
    initrd /boot/initrd.img-2.6.32-25-generic-pae
}
menuentry "Ubuntu, avec Linux 2.6.32-25-generic-pae (mode de récupération) (on /dev/sdb7)" {
    insmod ext2
    set root='(hd1,7)'
    search --no-floppy --fs-uuid --set 6c2442e5-3543-4bec-9f70-210ecf652610
    linux /boot/vmlinuz-2.6.32-25-generic-pae root=UUID=6c2442e5-3543-4bec-9f70-210ecf652610 ro single
    initrd /boot/initrd.img-2.6.32-25-generic-pae
}
menuentry "Ubuntu, avec Linux 2.6.32-24-generic-pae (on /dev/sdb7)" {
    insmod ext2
    set root='(hd1,7)'
    search --no-floppy --fs-uuid --set 6c2442e5-3543-4bec-9f70-210ecf652610
    linux /boot/vmlinuz-2.6.32-24-generic-pae root=UUID=6c2442e5-3543-4bec-9f70-210ecf652610 ro quiet splash
    initrd /boot/initrd.img-2.6.32-24-generic-pae
}
menuentry "Ubuntu, avec Linux 2.6.32-24-generic-pae (mode de récupération) (on /dev/sdb7)" {
    insmod ext2
    set root='(hd1,7)'
    search --no-floppy --fs-uuid --set 6c2442e5-3543-4bec-9f70-210ecf652610
    linux /boot/vmlinuz-2.6.32-24-generic-pae root=UUID=6c2442e5-3543-4bec-9f70-210ecf652610 ro single
    initrd /boot/initrd.img-2.6.32-24-generic-pae
}
menuentry "Windows NT/2000/XP (on /dev/sdc1)" {
    insmod ntfs
    set root='(hd2,1)'
    search --no-floppy --fs-uuid --set 8c5411af54119cd0
    drivemap -s (hd0) ${root}
    chainloader +1
}
menuentry "Ubuntu, with Linux 2.6.35-23-generic-pae (on /dev/sdc5)" {
    insmod ext2
    set root='(hd2,5)'
    search --no-floppy --fs-uuid --set 209f6a9c-4342-4780-89ae-4fa14d0c3365
    linux /boot/vmlinuz-2.6.35-23-generic-pae root=UUID=209f6a9c-4342-4780-89ae-4fa14d0c3365 ro quiet splash
    initrd /boot/initrd.img-2.6.35-23-generic-pae
}
menuentry "Ubuntu, with Linux 2.6.35-23-generic-pae (recovery mode) (on /dev/sdc5)" {
    insmod ext2
    set root='(hd2,5)'
    search --no-floppy --fs-uuid --set 209f6a9c-4342-4780-89ae-4fa14d0c3365
    linux /boot/vmlinuz-2.6.35-23-generic-pae root=UUID=209f6a9c-4342-4780-89ae-4fa14d0c3365 ro single
    initrd /boot/initrd.img-2.6.35-23-generic-pae
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
insmod ntfs
set root=(hd0,1)
drive map -s (hd0) ${root}
chainloader +1
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Windows XP origine" {
insmod ntfs
set root=(hd1,1)
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/42_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "GRUB externe hd3,1" {
set root=(hd3,1)
configfile /boot/grub/grub.cfg
}
### END /etc/grub.d/42_custom ###

=============================== sdb5/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sda5 during installation
UUID=8d6c97e8-8c26-430c-8353-2b35b82c73d1 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda6 during installation
UUID=de7c7e33-a5b4-4bd4-be64-e1e59ae987a6 none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

=================== sdb5: Location of files loaded by Grub: ===================


259.7GB: boot/grub/core.img
265.1GB: boot/grub/grub.cfg
255.0GB: boot/initrd.img-2.6.32-25-generic-pae
255.3GB: boot/vmlinuz-2.6.32-25-generic-pae
255.0GB: initrd.img
255.3GB: vmlinuz

=========================== sdb7/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="1"
if [ ${prev_saved_entry} ]; then
  set saved_entry=${prev_saved_entry}
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z ${boot_once} ]; then
    saved_entry=${chosen}
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd1,7)'
search --no-floppy --fs-uuid --set 6c2442e5-3543-4bec-9f70-210ecf652610
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
insmod ext2
set root='(hd1,7)'
search --no-floppy --fs-uuid --set 6c2442e5-3543-4bec-9f70-210ecf652610
set locale_dir=($root)/boot/grub/locale
set lang=fr
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=-1
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/09_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry ' DISQUE Sdb variables environnement  '{
    echo
        echo
        echo
        echo
        set
}
### END /etc/grub.d/09_custom ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, avec Linux 2.6.32-25-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,7)'
    search --no-floppy --fs-uuid --set 6c2442e5-3543-4bec-9f70-210ecf652610
    linux    /boot/vmlinuz-2.6.32-25-generic-pae root=UUID=6c2442e5-3543-4bec-9f70-210ecf652610 ro   quiet splash
    initrd    /boot/initrd.img-2.6.32-25-generic-pae
}
menuentry 'Ubuntu, avec Linux 2.6.32-25-generic-pae (mode de récupération)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,7)'
    search --no-floppy --fs-uuid --set 6c2442e5-3543-4bec-9f70-210ecf652610
    echo    'Chargement de Linux 2.6.32-25-generic-pae ...'
    linux    /boot/vmlinuz-2.6.32-25-generic-pae root=UUID=6c2442e5-3543-4bec-9f70-210ecf652610 ro single
    echo    'Chargement du disque mémoire initial...'
    initrd    /boot/initrd.img-2.6.32-25-generic-pae
}
menuentry 'Ubuntu, avec Linux 2.6.32-24-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,7)'
    search --no-floppy --fs-uuid --set 6c2442e5-3543-4bec-9f70-210ecf652610
    linux    /boot/vmlinuz-2.6.32-24-generic-pae root=UUID=6c2442e5-3543-4bec-9f70-210ecf652610 ro   quiet splash
    initrd    /boot/initrd.img-2.6.32-24-generic-pae
}
menuentry 'Ubuntu, avec Linux 2.6.32-24-generic-pae (mode de récupération)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,7)'
    search --no-floppy --fs-uuid --set 6c2442e5-3543-4bec-9f70-210ecf652610
    echo    'Chargement de Linux 2.6.32-24-generic-pae ...'
    linux    /boot/vmlinuz-2.6.32-24-generic-pae root=UUID=6c2442e5-3543-4bec-9f70-210ecf652610 ro single
    echo    'Chargement du disque mémoire initial...'
    initrd    /boot/initrd.img-2.6.32-24-generic-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    insmod ext2
    set root='(hd1,7)'
    search --no-floppy --fs-uuid --set 6c2442e5-3543-4bec-9f70-210ecf652610
    linux16    /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod ext2
    set root='(hd1,7)'
    search --no-floppy --fs-uuid --set 6c2442e5-3543-4bec-9f70-210ecf652610
    linux16    /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows NT/2000/XP (on /dev/sda1)" {
    insmod ntfs
    set root='(hd0,1)'
    search --no-floppy --fs-uuid --set a078a27e78a252b8
    drivemap -s (hd0) ${root}
    chainloader +1
}
menuentry "Windows NT/2000/XP (on /dev/sdb1)" {
    insmod ntfs
    set root='(hd1,1)'
    search --no-floppy --fs-uuid --set 78684472684430e4
    drivemap -s (hd0) ${root}
    chainloader +1
}
menuentry "Ubuntu, with Linux 2.6.32-25-generic-pae (on /dev/sdb5)" {
    insmod ext2
    set root='(hd1,5)'
    search --no-floppy --fs-uuid --set 8d6c97e8-8c26-430c-8353-2b35b82c73d1
    linux /boot/vmlinuz-2.6.32-25-generic-pae root=UUID=8d6c97e8-8c26-430c-8353-2b35b82c73d1 ro quiet splash
    initrd /boot/initrd.img-2.6.32-25-generic-pae
}
menuentry "Windows NT/2000/XP (on /dev/sdc1)" {
    insmod ntfs
    set root='(hd2,1)'
    search --no-floppy --fs-uuid --set 8c5411af54119cd0
    drivemap -s (hd0) ${root}
    chainloader +1
}
menuentry "Ubuntu, with Linux 2.6.35-22-generic-pae (on /dev/sdc5)" {
    insmod ext2
    set root='(hd2,5)'
    search --no-floppy --fs-uuid --set 209f6a9c-4342-4780-89ae-4fa14d0c3365
    linux /boot/vmlinuz-2.6.35-22-generic-pae root=UUID=209f6a9c-4342-4780-89ae-4fa14d0c3365 ro quiet splash
    initrd /boot/initrd.img-2.6.35-22-generic-pae
}
menuentry "Ubuntu, with Linux 2.6.35-22-generic-pae (recovery mode) (on /dev/sdc5)" {
    insmod ext2
    set root='(hd2,5)'
    search --no-floppy --fs-uuid --set 209f6a9c-4342-4780-89ae-4fa14d0c3365
    linux /boot/vmlinuz-2.6.35-22-generic-pae root=UUID=209f6a9c-4342-4780-89ae-4fa14d0c3365 ro single
    initrd /boot/initrd.img-2.6.35-22-generic-pae
}
menuentry "Ubuntu, with Linux 2.6.35-22-generic-pae (on /dev/sdh1)" {
    insmod ext2
    set root='(hd3,1)'
    search --no-floppy --fs-uuid --set b1b55aa8-eee6-4932-9917-a90006b6e5dd
    linux /boot/vmlinuz-2.6.35-22-generic-pae root=UUID=b1b55aa8-eee6-4932-9917-a90006b6e5dd ro quiet splash
    initrd /boot/initrd.img-2.6.35-22-generic-pae
}
menuentry "Ubuntu, with Linux 2.6.35-22-generic-pae (recovery mode) (on /dev/sdh1)" {
    insmod ext2
    set root='(hd3,1)'
    search --no-floppy --fs-uuid --set b1b55aa8-eee6-4932-9917-a90006b6e5dd
    linux /boot/vmlinuz-2.6.35-22-generic-pae root=UUID=b1b55aa8-eee6-4932-9917-a90006b6e5dd ro single
    initrd /boot/initrd.img-2.6.35-22-generic-pae
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "Windows XP Origine" {
insmod ntfs
set root='(hd1,1)'
drivemap -s (hd0) ${root}
chainloader +1
}
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/42_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "GRUB externe hd3,1"{
set root='(hd3,1)'
configfile /boot/grub/grub.cfg
}
### END /etc/grub.d/42_custom ###

=============================== sdb7/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
#
# / was on /dev/sda7 during installation      .............. mais attention c'est maintenant sdb7
UUID=6c2442e5-3543-4bec-9f70-210ecf652610 /               ext4    errors=remount-ro 0       1
#
# swap was on /dev/sda8 during installation   .............. mais attention c'est maintenant sdb8
UUID=d32720eb-3bc9-4f30-877f-f939c9472be2 none            swap    sw              0       0
#
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
#
# met le home sur le disque Sdc2 (UUID=40a6 ...)
#UUID=40a68636-cbba-4d91-837a-88dbf8864023  /home ext4     defaults       0    2
# met le home sur la sauvegarde S_home  08_11_2010 10H00               
#/dev/sda3: LABEL="S_home" UUID="09e9e7c8-a78a-4270-aee1-db55a446ecc3" TYPE="ext4"
#UUID=09e9e7c8-a78a-4270-aee1-db55a446ecc3  /home ext4     defaults       0    2
# met le home sur la sauvegarde N_home  08_11_2010 10H30               
#/dev/sdb9: LABEL="N_home" UUID="b703721e-397f-49c4-a30e-8de5e623d55f" TYPE="ext4"
UUID=b703721e-397f-49c4-a30e-8de5e623d55f  /home ext4     defaults       0    2


=================== sdb7: Location of files loaded by Grub: ===================


161.8GB: boot/grub/core.img
162.7GB: boot/grub/grub.cfg
163.6GB: boot/initrd.img-2.6.32-25-generic-pae
163.3GB: boot/vmlinuz-2.6.32-24-generic-pae
162.7GB: boot/vmlinuz-2.6.32-25-generic-pae
163.6GB: initrd.img
162.7GB: vmlinuz
163.3GB: vmlinuz.old

================================ sdc1/boot.ini: ================================

[boot loader]
timeout=1
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP dition familiale" /noexecute=optin /fastdetect

=========================== sdc5/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
set default="${saved_entry}"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
  insmod vbe
  insmod vga
}

insmod part_msdos
insmod ext2
set root='(hd2,msdos5)'
search --no-floppy --fs-uuid --set 209f6a9c-4342-4780-89ae-4fa14d0c3365
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd2,msdos5)'
search --no-floppy --fs-uuid --set 209f6a9c-4342-4780-89ae-4fa14d0c3365
set locale_dir=($root)/boot/grub/locale
set lang=fr
insmod gettext
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=60
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/09_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry ' DISQUE Sdc5 : les variables environnement de GRUB :'{
    echo
        echo
        echo   Voici les variables environnement de GRUB
        echo
    set
}
### END /etc/grub.d/09_custom ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-24-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    savedefault
    insmod part_msdos
    insmod ext2
    set root='(hd2,msdos5)'
    search --no-floppy --fs-uuid --set 209f6a9c-4342-4780-89ae-4fa14d0c3365
    linux    /boot/vmlinuz-2.6.35-24-generic-pae root=UUID=209f6a9c-4342-4780-89ae-4fa14d0c3365 ro   quiet splash
    initrd    /boot/initrd.img-2.6.35-24-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.35-24-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    savedefault
    insmod part_msdos
    insmod ext2
    set root='(hd2,msdos5)'
    search --no-floppy --fs-uuid --set 209f6a9c-4342-4780-89ae-4fa14d0c3365
    echo    'Loading Linux 2.6.35-24-generic-pae ...'
    linux    /boot/vmlinuz-2.6.35-24-generic-pae root=UUID=209f6a9c-4342-4780-89ae-4fa14d0c3365 ro single
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-2.6.35-24-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.35-23-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    savedefault
    insmod part_msdos
    insmod ext2
    set root='(hd2,msdos5)'
    search --no-floppy --fs-uuid --set 209f6a9c-4342-4780-89ae-4fa14d0c3365
    linux    /boot/vmlinuz-2.6.35-23-generic-pae root=UUID=209f6a9c-4342-4780-89ae-4fa14d0c3365 ro   quiet splash
    initrd    /boot/initrd.img-2.6.35-23-generic-pae
}
menuentry 'Ubuntu, with Linux 2.6.35-23-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    savedefault
    insmod part_msdos
    insmod ext2
    set root='(hd2,msdos5)'
    search --no-floppy --fs-uuid --set 209f6a9c-4342-4780-89ae-4fa14d0c3365
    echo    'Loading Linux 2.6.35-23-generic-pae ...'
    linux    /boot/vmlinuz-2.6.35-23-generic-pae root=UUID=209f6a9c-4342-4780-89ae-4fa14d0c3365 ro single
    echo    'Loading initial ramdisk ...'
    initrd    /boot/initrd.img-2.6.35-23-generic-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    insmod part_msdos
    insmod ext2
    set root='(hd2,msdos5)'
    search --no-floppy --fs-uuid --set 209f6a9c-4342-4780-89ae-4fa14d0c3365
    linux16    /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod part_msdos
    insmod ext2
    set root='(hd2,msdos5)'
    search --no-floppy --fs-uuid --set 209f6a9c-4342-4780-89ae-4fa14d0c3365
    linux16    /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Windows NT/2000/XP (on /dev/sda1)" {
    savedefault
    insmod part_msdos
    insmod ntfs
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set a078a27e78a252b8
    drivemap -s (hd0) ${root}
    chainloader +1
}
menuentry "Windows NT/2000/XP (on /dev/sdb1)" {
    savedefault
    insmod part_msdos
    insmod ntfs
    set root='(hd1,msdos1)'
    search --no-floppy --fs-uuid --set 78684472684430e4
    drivemap -s (hd0) ${root}
    chainloader +1
}
menuentry "Ubuntu, with Linux 2.6.32-25-generic-pae (on /dev/sdb5)" {
    savedefault
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos5)'
    search --no-floppy --fs-uuid --set 8d6c97e8-8c26-430c-8353-2b35b82c73d1
    linux /boot/vmlinuz-2.6.32-25-generic-pae root=UUID=8d6c97e8-8c26-430c-8353-2b35b82c73d1 ro quiet splash
    initrd /boot/initrd.img-2.6.32-25-generic-pae
}
menuentry "Ubuntu, avec Linux 2.6.32-25-generic-pae (on /dev/sdb7)" {
    savedefault
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos7)'
    search --no-floppy --fs-uuid --set 6c2442e5-3543-4bec-9f70-210ecf652610
    linux /boot/vmlinuz-2.6.32-25-generic-pae root=UUID=6c2442e5-3543-4bec-9f70-210ecf652610 ro quiet splash
    initrd /boot/initrd.img-2.6.32-25-generic-pae
}
menuentry "Ubuntu, avec Linux 2.6.32-25-generic-pae (mode de récupération) (on /dev/sdb7)" {
    savedefault
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos7)'
    search --no-floppy --fs-uuid --set 6c2442e5-3543-4bec-9f70-210ecf652610
    linux /boot/vmlinuz-2.6.32-25-generic-pae root=UUID=6c2442e5-3543-4bec-9f70-210ecf652610 ro single
    initrd /boot/initrd.img-2.6.32-25-generic-pae
}
menuentry "Ubuntu, avec Linux 2.6.32-24-generic-pae (on /dev/sdb7)" {
    savedefault
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos7)'
    search --no-floppy --fs-uuid --set 6c2442e5-3543-4bec-9f70-210ecf652610
    linux /boot/vmlinuz-2.6.32-24-generic-pae root=UUID=6c2442e5-3543-4bec-9f70-210ecf652610 ro quiet splash
    initrd /boot/initrd.img-2.6.32-24-generic-pae
}
menuentry "Ubuntu, avec Linux 2.6.32-24-generic-pae (mode de récupération) (on /dev/sdb7)" {
    savedefault
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos7)'
    search --no-floppy --fs-uuid --set 6c2442e5-3543-4bec-9f70-210ecf652610
    linux /boot/vmlinuz-2.6.32-24-generic-pae root=UUID=6c2442e5-3543-4bec-9f70-210ecf652610 ro single
    initrd /boot/initrd.img-2.6.32-24-generic-pae
}
menuentry "Windows NT/2000/XP (on /dev/sdc1)" {
    savedefault
    insmod part_msdos
    insmod ntfs
    set root='(hd2,msdos1)'
    search --no-floppy --fs-uuid --set 8c5411af54119cd0
    drivemap -s (hd0) ${root}
    chainloader +1
}
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

=============================== sdc5/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sda5 during installation
UUID=209f6a9c-4342-4780-89ae-4fa14d0c3365 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda6 during installation
UUID=9621a614-a277-437c-9a73-1a066b4587c3 none            swap    sw              0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0
# met le home sur la sauvegarde S_home  09_11_2010             
#/dev/sda3: LABEL="S_home" UUID="09e9e7c8-a78a-4270-aee1-db55a446ecc3" TYPE="ext4"
#UUID=09e9e7c8-a78a-4270-aee1-db55a446ecc3  /home ext4     defaults       0    2
# met le home sur               N_home  09_11_2010 08h20               
#/dev/sdb9: LABEL="N_home" UUID="b703721e-397f-49c4-a30e-8de5e623d55f" TYPE="ext4"
UUID=b703721e-397f-49c4-a30e-8de5e623d55f  /home ext4     defaults       0    2

=================== sdc5: Location of files loaded by Grub: ===================


462.0GB: boot/grub/core.img
455.7GB: boot/grub/grub.cfg
439.7GB: boot/initrd.img-2.6.35-23-generic-pae
454.0GB: boot/initrd.img-2.6.35-24-generic-pae
462.3GB: boot/vmlinuz-2.6.35-23-generic-pae
462.4GB: boot/vmlinuz-2.6.35-24-generic-pae
454.0GB: initrd.img
439.7GB: initrd.img.old
462.4GB: vmlinuz
462.3GB: vmlinuz.old
=========================== Unknown MBRs/Boot Sectors/etc =======================

Unknown BootLoader  on sdb2

00000000  50 0b b8 0d e8 a3 1f a5  9a 68 47 a8 ef 68 16 c0  |P........hG..h..|
00000010  4b ef 45 e7 20 8b e0 93  9c a1 ec 4c 51 a6 80 2b  |K.E. ......LQ..+|
00000020  1f 2b 69 a8 fa 21 ef a4  19 a4 ea 96 a2 54 cf 4b  |.+i..!.......T.K|
00000030  69 a8 b6 6a ae ab da a9  17 28 79 ca 7c 65 a1 e2  |i..j.....(y.|e..|
00000040  2f d5 47 65 3f cd 73 f5  2a ed 84 94 3a a9 b7 b4  |/.Ge?.s.*...:...|
00000050  b7 d2 8a 53 7f 65 fc ce  50 67 3b b3 2f e7 04 6a  |...S.e..Pg;./..j|
00000060  a5 d5 6a 90 9b 9f 63 cf  d9 9b 35 3c bb 7d 26 94  |..j...c...5<.}&.|
00000070  35 37 e3 47 86 23 fd 44  fa b4 f4 85 69 b2 f4 33  |57.G.#.D....i..3|
00000080  a9 dc f4 b4 d4 fb 69 4d  74 33 53 15 29 f3 b5 63  |......iMt3S.)..c|
00000090  54 25 ea 62 39 5f f9 52  3a 5d 56 23 9e 28 9e 24  |T%.b9_.R:]V#.(.$|
000000a0  9c 22 98 c2 7b c0 cd 63  73 d9 19 c8 69 e4 3c 84  |."..{..cs...i.<.|
000000b0  33 be d2 b2 18 c7 c0 fd  d0 55 60 2a d4 1f 68 0a  |3........U`*..h.|
000000c0  e5 01 dd e8 a3 a9 31 40  40 e6 90 eb b0 b7 f1 8a  |......1@@.......|
000000d0  08 1a be 15 14 05 19 81  a8 df e3 5d e6 3b e4 a1  |...........].;..|
000000e0  79 9f b9 39 9e 81 ee 07  ee e5 6e 99 27 df 63 f2  |y..9......n.'.c.|
000000f0  d0 bd c3 bc 7f 79 8b 3d  3b 3c 43 dc 7e 57 6b e7  |.....y.=;<C.~Wk.|
00000100  02 47 57 9b c8 fa cb 34  d6 b8 47 3f ad a6 4b f5  |.GW....4..G?..K.|
00000110  a5 2a 49 55 c3 aa cc aa  58 95 a9 6a 4e 4d b0 ba  |.*IU....X..jNM..|
00000120  95 21 4f 5f 61 ac d4 5b  4c 9d 93 1e d8 dc b0 cf  |.!O_a..[L.......|
00000130  c4 30 7c 31 ce 32 fc 30  5e 34 9e 37 1d 37 cb 2c  |.0|1.2.0^4.7.7.,|
00000140  7f 59 ef 5b bf d9 e6 db  97 3a d8 2e d2 b5 cd 3b  |.Y.[.....:.....;|
00000150  c6 b7 19 ed 8e de 09 37  0e 4d 8b 5a 43 ee a8 31  |.......7.M.ZC..1|
00000160  c4 89 cd 0d 57 c6 ba 45  2b b1 68 fc 12 f1 0e 1f  |....W..E+.h.....|
00000170  45 c5 c9 13 60 1d 20 07  12 d1 4f 23 8d e0 f9 1c  |E...`. ...O#....|
00000180  84 65 e0 6f e4 2c 11 15  f1 30 f1 09 c1 12 c9 20  |.e.o.,...0..... |
00000190  e1 39 f1 54 e1 6c d1 6a  21 4d 34 5c 54 28 fa 2a  |.9.T.l.j!M4\T(.*|
000001a0  3e 2e de 28 ed 28 bd 23  9f 2d 7f a4 d4 a8 02 6a  |>..(.(.#.-.....j|
000001b0  4e 8a 52 7b 41 87 ea 0e  a4 51 d3 34 e9 75 00 fe  |N.R{A....Q.4.u..|
000001c0  ff ff 83 fe ff ff 73 f9  c7 0d fb f8 ac 0e 00 fe  |......s.........|
000001d0  ff ff 05 fe ff ff db 69  94 29 68 82 14 01 00 00  |.......i.)h.....|
000001e0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200


=======Devices which don't seem to have a corresponding hard drive==============

sdd sde sdf sdg


PC          : B760M DS3H DDR4,  12th Gen Intel(R) Core(TM) i3-12100, RAM DDR4 8GiB -2400 Ubuntu 22.04, 22.04, 23.04
Portable1 : Intel(R) Core(TM)2 Duo CPU     T6570  @ 2.10GHz RAM 4GiB DDR2 667 MHz Ubuntu 23.04 ( en voyage )
Portable2 : T5750  @ 2.00GHz RAM 1GiB DDR2 667 Mhz Ubuntu 20.04 ( batterie HS )
stourm a ran war bep tachenn (Angela Duval) ( Je combats sur tous les fronts )

Hors ligne

#16 Le 08/01/2011, à 12:18

pseudologos

Re : grub 2

Merci cep pour tes explications...


Si j'ai bien compris, je sais désormais où se trouve grub. Mon problème est maintenant de comprendre pourquoi je n'ai pas droits sur sda1 que j'ai formater en ext4. Cette partition était en nfts, mais pour sauvegarder /home il faut ext4. donc...

j'insiste un peu pardonnez-moi :  j'explique cela ici

Hors ligne

#17 Le 08/01/2011, à 12:22

chopinhauer

Re : grub 2

YannUbuntu a écrit :

ok merci. Ta modif du script corrige le problème en créant le fichier.
Deux points m'intriguent encore :  a quoi servent "2>/dev/null" et ">/dev/null" ?

Enlever un peu de sortie non intéressante des commandes. De grep m'intéresse uniquement le code de sortie et dd affiche des statistiques sur la sortie d'erreur que je ne veux pas voir.

cep a écrit :

interessant le script, mais l'interêt de device.map étant maintenant moindre puisque non créé automatiquement, il y a une solution plus simple, voir la configuration du paquet grub avec debconf-show grub-pc

J'utilise device.map pour chercher uniquement sur des disques qui pourraient avoir une incidence lors du démarrage. On peut très bien faire une recherche sur tous les disques (même si volumes LVM et certains composants RAID ne peuvent pas être utilisés par Grub.

Ton approche est un peu orthogonale à ce que je fais dans mon script : il donne l'endroit où Grub est configuré pour s'installer, pas l'endroit où il est vraiment installé.


Pensez à donner un bon titre à vos sujets : cela permettra d'aider d'autres utilisateurs dans votre même situation. Ce n'est pas qu'en donnant des solutions qu'on aide, mais aussi en posant des bonnes questions et… facilement trouvables.

Hors ligne

#18 Le 08/01/2011, à 12:41

cep

Re : grub 2

chopinhauer a écrit :

Ton approche est un peu orthogonale à ce que je fais dans mon script : il donne l'endroit où Grub est configuré pour s'installer, pas l'endroit où il est vraiment installé.

C'est vrai, mais dans 99,9% des cas c'est là qu'il est installé et, surtout, qu'il sera installé lors des mises à jour. Donc on ne peut faire l'impasse sur ce point.
Aussi il peut arriver que le device.map soit erroné. Donc je me répète, le script est très intéressant mais il ne faut pas faire l'impasse sur le contrôle de la configuration de grub-pc, d'où l'intérêt de debconf-show grub-pc

Enfin je préfère et de loin l'usage de od à dd et hexdump est-t'il installé systématiquement ?

Hors ligne

#19 Le 08/01/2011, à 12:50

chopinhauer

Re : grub 2

cep a écrit :

Enfin je préfère et de loin l'usage de od à dd et hexdump est-t'il installé systématiquement ?

Oui, les deux y sont, même si apparemment seul od est nécessaire pour la compatibilité POSIX.

Aucun des deux n'est pas utilisé dans le script.


Pensez à donner un bon titre à vos sujets : cela permettra d'aider d'autres utilisateurs dans votre même situation. Ce n'est pas qu'en donnant des solutions qu'on aide, mais aussi en posant des bonnes questions et… facilement trouvables.

Hors ligne

#20 Le 08/01/2011, à 12:57

pseudologos

Re : grub 2

Pour moi, ar barzh paour, c'est plus court

ludovic@ludovic-desktop:~$ sudo bash /home/ludovic/Bureau/boot_info_script055.shIdentifying MBRs...
Computing Partition Table of /dev/sda...
Computing Partition Table of /dev/sdb...
Computing Partition Table of /dev/sdc...
Computing Partition Table of /dev/sdd...
Searching sda1 for information...
Searching sda2 for information...
Searching sdb1 for information...
Searching sdb2 for information...
Searching sdb5 for information...
Searching sdc1 for information...
Searching sdd1 for information...
Finished. The results are in the file RESULTS.txt located in /home/ludovic/Bureau

Hors ligne

#21 Le 08/01/2011, à 13:02

cep

Re : grub 2

chopinhauer a écrit :
cep a écrit :

Enfin je préfère et de loin l'usage de od à dd et hexdump est-t'il installé systématiquement ?

Oui, les deux y sont, même si apparemment seul od est nécessaire pour la compatibilité POSIX.

Aucun des deux n'est pas utilisé dans le script.

je parlais de dd.
od à utiliser en général et od en remplacement de hexdump car sur debian je vois que pour hexdump le paquet bsdmainutils n'est pas installé automatiquement.

@pseudologos : pour ton problème sur l'autre poste voir à se donner les droits d'écriture sur le point de montage. Le tout est expliqué dans les pages de la documentation.

Hors ligne

#22 Le 08/01/2011, à 13:08

pseudologos

Re : grub 2

Merci cep,


si tu avais un lien concernant les droits d'écriture sur les points de montage, cela m'aiderait, car je ne vois pas...


merci

Hors ligne

#23 Le 08/01/2011, à 13:21

pseudologos

Re : grub 2

Au fait voila ce que donne le script chez moi

              Boot Info Script 0.55    dated February 15th, 2010                   

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
    partition #1 for /boot/grub.
=> Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in
    partition #1 for /boot/grub.
=> No boot loader is installed in the MBR of /dev/sdc
=> Syslinux is installed in the MBR of /dev/sdd

sda1: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System: 
    Boot files/dirs:   

sda2: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info: 

sdb1: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 10.04.1 LTS
    Boot files/dirs:   /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sdb2: _________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  -
    Boot sector info: 

sdb5: _________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

sdc1: _________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows XP
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System: 
    Boot files/dirs:   

sdd1: _________________________________________________________________________

    File system:       vfat
    Boot sector type:  Fat32
    Boot sector info:  According to the info in the boot sector, sdd1 starts
                       at sector 0. But according to the info from fdisk,
                       sdd1 starts at sector 63.
    Operating System: 
    Boot files/dirs:   

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ _____________________________________________________

Disque /dev/sda: 82.0 Go, 81964302336 octets
255 têtes, 63 secteurs/piste, 9964 cylindres, total 160086528 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sda1                  63   154,834,469   154,834,407  83 Linux
/dev/sda2    *    154,834,470   160,071,659     5,237,190   5 Extended
Empty Partition


Drive: sdb ___________________ _____________________________________________________

Disque /dev/sdb: 160.0 Go, 160041885696 octets
255 têtes, 63 secteurs/piste, 19457 cylindres, total 312581808 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sdb1               2,048   300,550,143   300,548,096  83 Linux
/dev/sdb2         300,552,190   312,580,095    12,027,906   5 Extended
/dev/sdb5         300,552,192   312,580,095    12,027,904  82 Linux swap / Solaris


Drive: sdc ___________________ _____________________________________________________

Disque /dev/sdc: 320.1 Go, 320072933376 octets
255 têtes, 63 secteurs/piste, 38913 cylindres, total 625142448 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sdc1                  63   625,137,344   625,137,282   7 HPFS/NTFS


Drive: sdd ___________________ _____________________________________________________

Disque /dev/sdd: 2133 Mo, 2133065728 octets
255 têtes, 63 secteurs/piste, 259 cylindres, total 4166144 secteurs
Unités = secteurs de 1 * 512 = 512 octets
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot         Start           End          Size  Id System

/dev/sdd1    *             63     4,160,834     4,160,772   b W95 FAT32


blkid -c /dev/null: ____________________________________________________________

Device           UUID                                   TYPE       LABEL                         

/dev/sda1        1dbed1cf-c7c8-4d23-9150-439a23e3b6c5   ext4       archives                     
/dev/sda2: PTTYPE="dos"
/dev/sda: PTTYPE="dos"
/dev/sdb1        a89672b3-b180-41d1-bac1-f5f38e6c0ec2   ext4                                     
/dev/sdb2: PTTYPE="dos"
/dev/sdb5        614e938f-2a86-4bd9-af02-f1b659c978d0   swap                                     
/dev/sdb: PTTYPE="dos"
/dev/sdc1        20580A4B580A2060                       ntfs       Iomega HDD                   
/dev/sdc: PTTYPE="dos"
/dev/sdd1        6021-1DAE                              vfat       ubuntu 10.4                   
/dev/sdd: PTTYPE="dos"

============================ "mount | grep ^/dev  output: ===========================

Device           Mount_Point              Type       Options

/dev/sdb1        /                        ext4       (rw,errors=remount-ro)
/dev/sdc1        /media/Iomega HDD        fuseblk    (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions)
/dev/sda1        /media/archives          ext4       (rw,nosuid,nodev,uhelper=udisks)
/dev/sdd1        /media/ubuntu 10.4       vfat       (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,flush)


=========================== sdb1/boot/grub/grub.cfg: ===========================

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  set saved_entry=${prev_saved_entry}
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z ${boot_once} ]; then
    saved_entry=${chosen}
    save_env saved_entry
  fi
}

function recordfail {
  set recordfail=1
  if [ -n ${have_grubenv} ]; then if [ -z ${boot_once} ]; then save_env recordfail; fi; fi
}
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set a89672b3-b180-41d1-bac1-f5f38e6c0ec2
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
insmod ext2
set root='(hd1,1)'
search --no-floppy --fs-uuid --set a89672b3-b180-41d1-bac1-f5f38e6c0ec2
set locale_dir=($root)/boot/grub/locale
set lang=fr
insmod gettext
if [ ${recordfail} = 1 ]; then
  set timeout=-1
else
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, avec Linux 2.6.32-27-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,1)'
    search --no-floppy --fs-uuid --set a89672b3-b180-41d1-bac1-f5f38e6c0ec2
    linux    /boot/vmlinuz-2.6.32-27-generic root=UUID=a89672b3-b180-41d1-bac1-f5f38e6c0ec2 ro   quiet splash
    initrd    /boot/initrd.img-2.6.32-27-generic
}
menuentry 'Ubuntu, avec Linux 2.6.32-27-generic (mode de récupération)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,1)'
    search --no-floppy --fs-uuid --set a89672b3-b180-41d1-bac1-f5f38e6c0ec2
    echo    'Chargement de Linux 2.6.32-27-generic ...'
    linux    /boot/vmlinuz-2.6.32-27-generic root=UUID=a89672b3-b180-41d1-bac1-f5f38e6c0ec2 ro single
    echo    'Chargement du disque mémoire initial...'
    initrd    /boot/initrd.img-2.6.32-27-generic
}
menuentry 'Ubuntu, avec Linux 2.6.32-26-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,1)'
    search --no-floppy --fs-uuid --set a89672b3-b180-41d1-bac1-f5f38e6c0ec2
    linux    /boot/vmlinuz-2.6.32-26-generic root=UUID=a89672b3-b180-41d1-bac1-f5f38e6c0ec2 ro   quiet splash
    initrd    /boot/initrd.img-2.6.32-26-generic
}
menuentry 'Ubuntu, avec Linux 2.6.32-26-generic (mode de récupération)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,1)'
    search --no-floppy --fs-uuid --set a89672b3-b180-41d1-bac1-f5f38e6c0ec2
    echo    'Chargement de Linux 2.6.32-26-generic ...'
    linux    /boot/vmlinuz-2.6.32-26-generic root=UUID=a89672b3-b180-41d1-bac1-f5f38e6c0ec2 ro single
    echo    'Chargement du disque mémoire initial...'
    initrd    /boot/initrd.img-2.6.32-26-generic
}
menuentry 'Ubuntu, avec Linux 2.6.32-25-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,1)'
    search --no-floppy --fs-uuid --set a89672b3-b180-41d1-bac1-f5f38e6c0ec2
    linux    /boot/vmlinuz-2.6.32-25-generic root=UUID=a89672b3-b180-41d1-bac1-f5f38e6c0ec2 ro   quiet splash
    initrd    /boot/initrd.img-2.6.32-25-generic
}
menuentry 'Ubuntu, avec Linux 2.6.32-25-generic (mode de récupération)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,1)'
    search --no-floppy --fs-uuid --set a89672b3-b180-41d1-bac1-f5f38e6c0ec2
    echo    'Chargement de Linux 2.6.32-25-generic ...'
    linux    /boot/vmlinuz-2.6.32-25-generic root=UUID=a89672b3-b180-41d1-bac1-f5f38e6c0ec2 ro single
    echo    'Chargement du disque mémoire initial...'
    initrd    /boot/initrd.img-2.6.32-25-generic
}
menuentry 'Ubuntu, avec Linux 2.6.32-24-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,1)'
    search --no-floppy --fs-uuid --set a89672b3-b180-41d1-bac1-f5f38e6c0ec2
    linux    /boot/vmlinuz-2.6.32-24-generic root=UUID=a89672b3-b180-41d1-bac1-f5f38e6c0ec2 ro   quiet splash
    initrd    /boot/initrd.img-2.6.32-24-generic
}
menuentry 'Ubuntu, avec Linux 2.6.32-24-generic (mode de récupération)' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    insmod ext2
    set root='(hd1,1)'
    search --no-floppy --fs-uuid --set a89672b3-b180-41d1-bac1-f5f38e6c0ec2
    echo    'Chargement de Linux 2.6.32-24-generic ...'
    linux    /boot/vmlinuz-2.6.32-24-generic root=UUID=a89672b3-b180-41d1-bac1-f5f38e6c0ec2 ro single
    echo    'Chargement du disque mémoire initial...'
    initrd    /boot/initrd.img-2.6.32-24-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
    insmod ext2
    set root='(hd1,1)'
    search --no-floppy --fs-uuid --set a89672b3-b180-41d1-bac1-f5f38e6c0ec2
    linux16    /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
    insmod ext2
    set root='(hd1,1)'
    search --no-floppy --fs-uuid --set a89672b3-b180-41d1-bac1-f5f38e6c0ec2
    linux16    /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ ${timeout} != -1 ]; then
  if keystatus; then
    if keystatus --shift; then
      set timeout=-1
    else
      set timeout=0
    fi
  else
    if sleep --interruptible 3 ; then
      set timeout=0
    fi
  fi
fi
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

=============================== sdb1/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    nodev,noexec,nosuid 0       0
# / was on /dev/sdb1 during installation
UUID=a89672b3-b180-41d1-bac1-f5f38e6c0ec2 /               ext4    errors=remount-ro 0       1
# swap was on /dev/sdb5 during installation
UUID=614e938f-2a86-4bd9-af02-f1b659c978d0 none            swap    sw              0       0

=================== sdb1: Location of files loaded by Grub: ===================


133.2GB: boot/grub/core.img
  48.4GB: boot/grub/grub.cfg
133.5GB: boot/initrd.img-2.6.32-24-generic
133.5GB: boot/initrd.img-2.6.32-25-generic
133.6GB: boot/initrd.img-2.6.32-26-generic
133.6GB: boot/initrd.img-2.6.32-27-generic
133.4GB: boot/vmlinuz-2.6.32-24-generic
133.5GB: boot/vmlinuz-2.6.32-25-generic
133.5GB: boot/vmlinuz-2.6.32-26-generic
133.6GB: boot/vmlinuz-2.6.32-27-generic
133.6GB: initrd.img
133.6GB: initrd.img.old
133.6GB: vmlinuz
133.5GB: vmlinuz.old

Hors ligne

#24 Le 08/01/2011, à 13:28

Compte anonymisé

Re : grub 2

Hé bien tu y arrives lol

Par contre ceci est un peu bizarre :

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
    partition #1 for /boot/grub.

=> Grub 2 is installed in the MBR of /dev/sdb and looks on the same drive in
    partition #1 for /boot/grub.
=> No boot loader is installed in the MBR of /dev/sdc
=> Syslinux is installed in the MBR of /dev/sdd

sda1: _________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System: 
    Boot files/dirs:

Grub est installé sur /dev/sda  mais pointe sur /dev/sda1 qui ne contient pas de fichiers de boot ??????

A mon avis /dev/sda n'est pas le device de boot, sinon ça ne fonctionnerai pas.

@+

#25 Le 08/01/2011, à 13:57

cep

Re : grub 2

pseudologos a écrit :

Merci cep,


si tu avais un lien concernant les droits d'écriture sur les points de montage, cela m'aiderait, car je ne vois pas...


merci

tu peux regarder par exemple ici :
http://doc.ubuntu-fr.org//mount_fstab?redirect=1
http://doc.ubuntu-fr.org/mount_fstab?s[]=fstab
http://doc.ubuntu-fr.org/permissions?s[]=chown

En gros, tu crées ton point de montage :
sudo mkdir /media/point_montage

puis tu donnes à ton user les droits sur ce point de montage :
sudo chown ton_user:ton_user /media/point_montage
et tu montes le système de fichiers ou le configure dans /etc/fstab.

Si tu fais le chown après le mount il faudra y ajouter l'option -R pour récursif.

sudo chown -R ton_user:ton_user /media/point_montage

Voir le man chown.

Pour clore ton poste sur la question initiale, tu as avec le script de chopinauer et la commande debconf l'ensemble suffisant pour gérer ce point. Le reste est bavardage inutile mais inévitable avec l'autre . . . .

Bonne continuation.
cep

Hors ligne