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 06/01/2013, à 21:22

grandtoubab

Faire booter grub sur une image iso

salut,
Voici comment faire booter grub sur une image iso sauvegardée sur le disque dur.
Il y a  un outil grml-rescueboot pour créer le menu grub, voir la doc en anglais:
https://help.ubuntu.com/community/Grub2/ISOBoot
Exemple:
Installer grml-rescueboot:

sudo apt-get install grml-rescueboot

Mettre l'image iso dans le dossier /boot/grml/

@ubuntu-desktop:~/Downloads$ sudo mv raring-desktop-i386.iso /boot/grml/
[sudo] password for : 

Regénerer le menu grub

@ubuntu-desktop:~/Downloads$ sudo update-grub
Generating grub.cfg ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-3.2.0-36-generic
Found initrd image: /boot/initrd.img-3.2.0-36-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Grml ISO image: /boot/grml/raring-desktop-i386.iso
done
@ubuntu-desktop:/boot/grub$ cat 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="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
}

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set=root ae02ece1-192f-4996-8067-144aaa760f93
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  insmod part_msdos
  insmod ext2
  set root='(hd0,msdos3)'
  search --no-floppy --fs-uuid --set=root ae02ece1-192f-4996-8067-144aaa760f93
  set locale_dir=($root)/boot/grub/locale
  set lang=fr_FR
  insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
  set timeout=-1
else
  set timeout=4
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set=root ae02ece1-192f-4996-8067-144aaa760f93
insmod png
if background_image /usr/share/images/desktop-base/spacefun-grub.png; then
  set color_normal=light-gray/black
  set color_highlight=white/black
else
  set menu_color_normal=white/black
  set menu_color_highlight=black/light-gray
  if background_color 44,0,30; then
    clear
  fi
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
	if [ "${1}" = "keep" ]; then
		set vt_handoff=vt.handoff=7
	else
		set vt_handoff=
	fi
}
if [ "${recordfail}" != 1 ]; then
  if [ -e ${prefix}/gfxblacklist.txt ]; then
    if hwmatch ${prefix}/gfxblacklist.txt 3; then
      if [ ${match} = 0 ]; then
        set linux_gfx_mode=keep
      else
        set linux_gfx_mode=text
      fi
    else
      set linux_gfx_mode=text
    fi
  else
    set linux_gfx_mode=keep
  fi
else
  set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "${linux_gfx_mode}" != "text" ]; then load_video; fi
menuentry 'Ubuntu, avec Linux 3.2.0-36-generic' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	gfxmode $linux_gfx_mode
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root ae02ece1-192f-4996-8067-144aaa760f93
	linux	/boot/vmlinuz-3.2.0-36-generic root=UUID=ae02ece1-192f-4996-8067-144aaa760f93 ro   quiet splash $vt_handoff
	initrd	/boot/initrd.img-3.2.0-36-generic
}
menuentry 'Ubuntu, avec Linux 3.2.0-36-generic (mode de dépannage)' --class ubuntu --class gnu-linux --class gnu --class os {
	recordfail
	insmod gzio
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root ae02ece1-192f-4996-8067-144aaa760f93
	echo	'Chargement de Linux 3.2.0-36-generic ...'
	linux	/boot/vmlinuz-3.2.0-36-generic root=UUID=ae02ece1-192f-4996-8067-144aaa760f93 ro recovery nomodeset 
	echo	'Chargement du disque mémoire initial ...'
	initrd	/boot/initrd.img-3.2.0-36-generic
}
### 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='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root ae02ece1-192f-4996-8067-144aaa760f93
	linux16	/boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
	insmod part_msdos
	insmod ext2
	set root='(hd0,msdos3)'
	search --no-floppy --fs-uuid --set=root ae02ece1-192f-4996-8067-144aaa760f93
	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

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

### BEGIN /etc/grub.d/42_grml ###
menuentry "Grml Rescue System (raring-desktop-i386.iso)" {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos3)'
        search --no-floppy --fs-uuid --set=root ae02ece1-192f-4996-8067-144aaa760f93
        iso_path="/boot/grml/raring-desktop-i386.iso"
        export iso_path
        kernelopts="   "
        export kernelopts
        loopback loop "/boot/grml/raring-desktop-i386.iso"
        set root=(loop)
        configfile /boot/grub/loopback.cfg
}
### END /etc/grub.d/42_grml ###

Dans le menu grub, selectionner votre image iso, puis dans mon cas "tester sans installer"
Et hop un petit boot sur l'image iso de Raring pour tester. Il m'a fallu mettre le clavier français dans les propriétés systèmes
1172161662.png

1172161989.png

Dernière modification par grandtoubab (Le 06/01/2013, à 21:22)


Linux tout seul sur HP Pavilion DV7 et Acer Aspire T650, Canon MG3650 en wifi
Debian 11 Bullseye Gnome/Xorg, Gnome/Wayland avec SDDM
https://bidouilledebian.wordpress.com/
ON M'A VU DANS LE VERCORS, SAUTER A L'ELASTIQUE..... J'AI DANS LES BOTTES DES MONTAGNES DE QUESTIONS....

Hors ligne

#2 Le 06/01/2013, à 21:28

Maisondouf

Re : Faire booter grub sur une image iso

Sympa la roue de secours !


ASUS M5A88-v EVO avec AMD FX(tm)-8120 Eight-Core Processor,  OS principal Precise 12.04.1 LTS 63bits½
Bricoleur, menteur, inculte, inadapté social et mythomane, enfin d'après certains....
"the secret of my form is summed up in two words, no sport" (Winston Churchill)

Hors ligne

#3 Le 06/01/2013, à 21:39

grandtoubab

Re : Faire booter grub sur une image iso

Maisondouf a écrit :

Sympa la roue de secours !

Économique, Écologique , plus de temps perdu à chercher le cd, libéré des pannes de lecteur, etc smile


Linux tout seul sur HP Pavilion DV7 et Acer Aspire T650, Canon MG3650 en wifi
Debian 11 Bullseye Gnome/Xorg, Gnome/Wayland avec SDDM
https://bidouilledebian.wordpress.com/
ON M'A VU DANS LE VERCORS, SAUTER A L'ELASTIQUE..... J'AI DANS LES BOTTES DES MONTAGNES DE QUESTIONS....

Hors ligne

#4 Le 31/01/2014, à 17:10

grandtoubab

Re : Faire booter grub sur une image iso

Salut,
Je reprends ce vieux truc pour tester korora big_smile

@ubuntu-desktop:/boot/grml$ ls
korora-20-x86_64-cinnamon-live.iso
@ubuntu-desktop:/boot/grml$ sudo update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.13.1-031301-generic
Found initrd image: /boot/initrd.img-3.13.1-031301-generic
Found linux image: /boot/vmlinuz-3.11.0-15-generic
Found initrd image: /boot/initrd.img-3.11.0-15-generic
Found linux image: /boot/vmlinuz-3.2.0-58-generic-pae
Found initrd image: /boot/initrd.img-3.2.0-58-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
Found Grml ISO image: /boot/grml/korora-20-x86_64-cinnamon-live.iso
done

16h24
ça boot pas sad sad , je vais essayer avec Trusty http://cdimage.ubuntu.com/daily-live/current/

16h55

ca marche
1391183683.jpg

1391183795.jpg

c'est peut-être reservé aux images iso Ubuntu?

Dernière modification par grandtoubab (Le 31/01/2014, à 17:57)


Linux tout seul sur HP Pavilion DV7 et Acer Aspire T650, Canon MG3650 en wifi
Debian 11 Bullseye Gnome/Xorg, Gnome/Wayland avec SDDM
https://bidouilledebian.wordpress.com/
ON M'A VU DANS LE VERCORS, SAUTER A L'ELASTIQUE..... J'AI DANS LES BOTTES DES MONTAGNES DE QUESTIONS....

Hors ligne

#5 Le 09/05/2014, à 11:26

dva2tlse

Re : Faire booter grub sur une image iso

Bonjour,
moi j'essaye d'installer Xubuntu 14.04 sur mon PC où il y a Lubuntu qui est mal installé et que je n'aime pas, donc je n'ai pas essayé d'améliorer les choses ni de peaufiner.
J'ai l'iso de la 14.04 dans une clé que je n'ai pas voulu essayer de rendre bootable à cause d'un mauvais souvenir, par contre j'ai vu qu'il était possible pour grub de booter sur cette iso simplement recopiée dans /root/grml avec un paquet nommé grml que j'ai installé et qui marche bien. (grâce à ce post, merci)
Mais pendant l'installation de la 14, il est gêné par le propre montage de l'iso, /isodevice, qui l'empêche de tout reformater comme il le souhaiterait.
Suis-je assez clair, et peut on m'aider,
Merci,
David

Dernière modification par dva2tlse (Le 09/05/2014, à 12:24)


xubuntu 22.04 dans un PC assemblé
PS: Dis toto, pourquoi l'univers existe-t'il ?
Je vais y réfléchir avec Morphée et lui dès avant 22h55, donc ici, il faut se contacter auparavant.

Hors ligne

#6 Le 09/05/2014, à 14:41

grandtoubab

Re : Faire booter grub sur une image iso

Ça me rappelle l'histoire du gars qui scie la branche sur laquelle il est assis


Linux tout seul sur HP Pavilion DV7 et Acer Aspire T650, Canon MG3650 en wifi
Debian 11 Bullseye Gnome/Xorg, Gnome/Wayland avec SDDM
https://bidouilledebian.wordpress.com/
ON M'A VU DANS LE VERCORS, SAUTER A L'ELASTIQUE..... J'AI DANS LES BOTTES DES MONTAGNES DE QUESTIONS....

Hors ligne

#7 Le 09/05/2014, à 15:08

dva2tlse

Re : Faire booter grub sur une image iso

Ben oui, ça revient à ça en effet; j'ai mon système Lubuntu (mal) installé sur /dev/sda5, mon /home est sur /dev/sda7 (s'il n'a pas encore été effacé par tous les essais infructueux que j'ai faits)(même de tout reformater) donc en fin de compte le montage de l'iso masque le répertoire où ça devrait être réinstallé.
Comment faire pour que l'iso se monte ailleurs, puisqu'on ne peut pas trop la déplacer pendant qu'on s'en sert évidemment.
Qu'y faire ?
David


xubuntu 22.04 dans un PC assemblé
PS: Dis toto, pourquoi l'univers existe-t'il ?
Je vais y réfléchir avec Morphée et lui dès avant 22h55, donc ici, il faut se contacter auparavant.

Hors ligne

#8 Le 10/05/2014, à 10:36

dva2tlse

Re : Faire booter grub sur une image iso

Je me réponds à moi même en espérant que ça servira à d'autres :
  Pendant l'installation, juste avant qu'il ne mentionne que le montage de ce /isodevice est gênant, il faut ouvrir un terminal, avec CTRL +ALT+T, et on tape sudo umount -lfd /isodevice YOUPI ça a l'air d'avoir débloqué l'installation chez moi, qui continue pendant que j'écris.

En fait çe n'avait pas marché et j'ai touvé un script qui reconfigure le grub pour amorcer sur l'image iso de xubuntu que j'ai sur une clé. (Clé que je n'ai d'ailleurs toujours pas réussi à faire booter alors que j'avais aussi essayé ça juste avant.)
David
(script pour booter sur une image iso sans clé ni gravage, http://www.google.fr/url?sa=t&rct=j&q=& … 100,d.d2k)

  Et cà a marché SUPER.

Dernière modification par dva2tlse (Le 15/05/2014, à 17:50)


xubuntu 22.04 dans un PC assemblé
PS: Dis toto, pourquoi l'univers existe-t'il ?
Je vais y réfléchir avec Morphée et lui dès avant 22h55, donc ici, il faut se contacter auparavant.

Hors ligne

#9 Le 22/05/2014, à 18:59

FrancisFDZ

Re : Faire booter grub sur une image iso

Un petit détail intéressant :
Certains linuxiens préfèrent se créer une table de partitions pour installer linux. Dans ce cas, il est généralement conseillé d'utiliser pour la partition destinée à /boot une partition assez petite; du coup il n'y a pas assez de place pour y copier un fichier iso dans /boot/grml. On peut très facilement contourner cette limitation en indiquant dans le script /etc/grub.d/42_grml (ça s'appelle comme ça chez moi, mais ça peut être [un_nombre_quelconque]_grml) l'adresse du répertoire où on veut placer son fichier iso (de préférence /home/où_on_veut). La variable à changer est ISO_LOCATION, le répertoire choisi est validé au premier coup de "update-grub" (refaire "update-grub" à chaque changement dans ce répertoire)

[Edit] autre solution : créer une partition où seront copiés les fichiers iso et monter ladite partition sur /boot/grml (avec modif de /etc/fstab pour s'assurer que le montage est valide avant que grub ne recherche l'iso de démarrage) [/Edit]

NB : ça marche avec d'autres distributions ! (testé avec Debian, Arch, Gentoo, ...)

Dernière modification par FrancisFDZ (Le 20/04/2015, à 13:01)


-- On peut avoir des raisons de se plaindre et n'avoir pas raison de se plaindre --
[Victor Hugo]

Hors ligne