This commit is contained in:
Marc Beninca 2017-12-06 22:47:24 +01:00
parent 98f43cc3d4
commit fb83ac9cf6

View file

@ -30,27 +30,27 @@ grub-legacy maintenance
boot/grub/grub.cfg boot/grub/grub.cfg
```bash .. code:: shell
search --set --fs-uuid "YYYY-MM-DD-hh-mm-ss-cc" search --set --fs-uuid "YYYY-MM-DD-hh-mm-ss-cc"
```
Or at worst: Or at worst:
```bash .. code:: shell
search --set --label "LA_BEL" search --set --label "LA_BEL"
```
# Générer une image modulaire # Générer une image modulaire
/bin/tar /bin/tar
```bash .. code:: shell
tar tar
--create --create
--dereference --dereference
--file='grub.tar' --file='grub.tar'
--verbose --verbose
boot boot
```
* moddep.lst * moddep.lst
* kernel.img * kernel.img
@ -59,14 +59,14 @@ boot
* *.mod * *.mod
/usr/bin/grub-mkimage /usr/bin/grub-mkimage
```bash .. code:: shell
grub-mkimage grub-mkimage
--directory='i386-pc' --directory='i386-pc'
--format='i386-pc' --format='i386-pc'
--memdisk='grub.tar' --memdisk='grub.tar'
--output='i386-pc/core.img' --output='i386-pc/core.img'
modules… modules…
```
i386-pc-eltorito for ISO encapsulation i386-pc-eltorito for ISO encapsulation
@ -76,11 +76,11 @@ i386-pc-eltorito for ISO encapsulation
* core.img * core.img
/usr/sbin/grub-bios-setup /usr/sbin/grub-bios-setup
```bash .. code:: shell
grub-bios-setup \ grub-bios-setup \
--directory="i386-pc" \ --directory="i386-pc" \
/dev/sd? /dev/sd?
```
# Créer un menu de démarrage # Créer un menu de démarrage
@ -122,12 +122,13 @@ cmdpath (hd?)
## fichier de persistence d’environnement ## fichier de persistence d’environnement
/usr/bin/grub-editenv * /usr/bin/grub-editenv
```bash
.. code:: shell
grub-editenv file create grub-editenv file create
grub-editenv file set variable=value grub-editenv file set variable=value
grub-editenv file unset variable grub-editenv file unset variable
```
## démarrer un système préparé ## démarrer un système préparé
@ -145,20 +146,21 @@ grub-editenv file unset variable
* /live/name.squashfs * /live/name.squashfs
```bash .. code:: shell
linux /live/subdir/vmlinuz boot="live" toram="subdir/name.squashfs" linux /live/subdir/vmlinuz boot="live" toram="subdir/name.squashfs"
initrd /live/subdir/initrd.img initrd /live/subdir/initrd.img
```
```bash .. code:: shell
loopback loop /live/dir/name.squashfs loopback loop /live/dir/name.squashfs
linux (loop)/vmlinuz boot="live" toram="dir/name.squashfs" linux (loop)/vmlinuz boot="live" toram="dir/name.squashfs"
initrd (loop)/initrd.img initrd (loop)/initrd.img
```
* Debian installed * Debian installed
```bash .. code:: shell
unset path unset path
uuid="????????-????-????-????-????????????" uuid="????????-????-????-????-????????????"
search --set="path" --fs-uuid "${uuid}" search --set="path" --fs-uuid "${uuid}"
@ -169,67 +171,67 @@ if [ "${path}" ]; then
root=UUID=${uuid} root=UUID=${uuid}
initrd "${path}/initrd.img" initrd "${path}/initrd.img"
fi fi
```
* Debian Installer * Debian Installer
```bash .. code:: shell
linux "/path/to/vmlinuz" priority="low"
``` linux "/path/to/vmlinuz" priority="low"
.. code:: shell
```bash
linux "/path/to/vmlinuz" auto="true" \ linux "/path/to/vmlinuz" auto="true" \
file="/hd-media/path/to/preseed" file="/hd-media/path/to/preseed"
```
--- ----
.. code:: shell
```bash
initrd /path/to/gtk/initrd.gz initrd /path/to/gtk/initrd.gz
```
--- ----
La recherche d’ISO ne va pas à plus d’1 niveau d’arborescence ! La recherche d’ISO ne va pas à plus d’1 niveau d’arborescence !
Peut-on vraiment spécifier quelle ISO au préalable ?! Peut-on vraiment spécifier quelle ISO au préalable ?!
```bash .. code:: shell
iso-scan/ask_second_pass="true" iso-scan/filename="/path/to/file.iso" iso-scan/ask_second_pass="true" iso-scan/filename="/path/to/file.iso"
```
* Debian Live * Debian Live
```bash .. code:: shell
file="/path/to.iso" file="/path/to.iso"
loopback loop "${file}" loopback loop "${file}"
path="(loop)/live" path="(loop)/live"
linux "${path}/vmlinuz" boot="live" findiso="${file}" components linux "${path}/vmlinuz" boot="live" findiso="${file}" components
initrd "${path}/initrd.img" initrd "${path}/initrd.img"
```
* PartedMagic * PartedMagic
```bash .. code:: shell
file="/path/to.iso" file="/path/to.iso"
loopback loop ${file} loopback loop ${file}
path="(loop)/pmagic" path="(loop)/pmagic"
linux "${path}/bzImage64" iso_filename="${file}" load_ramdisk=1 linux "${path}/bzImage64" iso_filename="${file}" load_ramdisk=1
initrd "${path}/initrd.img" "${path}/fu.img" "${path}/m64.img" initrd "${path}/initrd.img" "${path}/fu.img" "${path}/m64.img"
```
* Windows * Windows
``` .. code:: shell
menuentry "Windows" { menuentry "Windows" {
drivemap -s (hd0) (hd1) drivemap -s (hd0) (hd1)
chainloader (hd0,msdos2)+1 chainloader (hd0,msdos2)+1
} }
```
* CloneZilla * CloneZilla
```bash .. code:: shell
file="/path/to/file.iso" file="/path/to/file.iso"
loopback loop "${file}" loopback loop "${file}"
path="(loop)/live" path="(loop)/live"
@ -238,45 +240,45 @@ boot="live" union="overlay" \
username="user" config components \ username="user" config components \
toram="filesystem.squashfs" ip="" \ toram="filesystem.squashfs" ip="" \
locales="en_US.UTF-8" keyboard-layouts="fr-latin9" \ locales="en_US.UTF-8" keyboard-layouts="fr-latin9" \
```
--- ----
.. code:: shell
```bash
ocs_live_batch="yes" \ ocs_live_batch="yes" \
ocs_prerun="mount /dev/disk/by-uuid/${cz_home} /mnt" \ ocs_prerun="mount /dev/disk/by-uuid/${cz_home} /mnt" \
ocs_prerun1="mount --bind /mnt/${cz_partimag} /home/partimag" \ ocs_prerun1="mount --bind /mnt/${cz_partimag} /home/partimag" \
ocs_live_run="ocs-live-restore" \ ocs_live_run="ocs-live-restore" \
```
```bash .. code:: shell
ocs_live_extra_param="\ ocs_live_extra_param="\
-e1 auto -e2 -t -r -j2 -cs -k \ -e1 auto -e2 -t -r -j2 -cs -k \
-p reboot restoreparts ask_user ${cz_target}" -p reboot restoreparts ask_user ${cz_target}"
```
```bash .. code:: shell
ocs_live_extra_param="\ ocs_live_extra_param="\
-q2 -j2 -rm-win-swap-hib -gs -z1p -i 1000000 -fsck-y \ -q2 -j2 -rm-win-swap-hib -gs -z1p -i 1000000 -fsck-y \
-p reboot saveparts ask_user ${cz_target}" -p reboot saveparts ask_user ${cz_target}"
```
--- ----
.. code:: shell
```bash
ocs_live_batch="no" \ ocs_live_batch="no" \
ocs_live_run="ocs-live-general" \ ocs_live_run="ocs-live-general" \
```
--- ----
.. code:: shell
```bash
initrd "${path}/initrd.img" initrd "${path}/initrd.img"
```
* ISO * ISO
```bash .. code:: shell
xorrisofs \ xorrisofs \
\ \
-output live-grub.iso \ -output live-grub.iso \
@ -294,4 +296,3 @@ xorrisofs \
-exclude live/boot/debian.squashfs/live \ -exclude live/boot/debian.squashfs/live \
-root "live" \ -root "live" \
"live" "live"
```