Lorsque je démarre l'ordinateur avant le boot (c'est-à-dire avant l'apparition à l'écran de Syslinux) j'ai droit à un message me disant "waiting 10 seconds for device /dev/sdf3".
Si je n'ai aucune clef USB de branchée, c'est ok car ma partition de boot s'appelle bien sdf3, et ça boote. En revanche, lorsqu'il y a d'autres périphériques de stockage, il les fait passer devant, mon disque dur interne s'appelle alors sdg, sdh etc. selon le nombre de lecteurs branchés. Or dans le FSTAB il y a marqué sdf, donc il ne trouve plus la partition de boot. Jusque là tout va très bien. Je n'ai qu'à utiliser les UUID pour demander à ma machine d'utiliser des noms indissociables des partitions ainsi, quel que soit le nombre de périphériques branchés, ça booterait sur la partition que je veux.
Cela se demande par l'intermédiaire du syslinux.cfg qui, pour le moment sur mon système fonctionne avec le nom "/dev/sdf3 :
Code : Tout sélectionner
LABEL arch
MENU LABEL Arch Linux
LINUX ../vmlinuz-linux
APPEND root=/dev/sdf3 ro
#APPEND root=UUID=50219d55-3194-44eb-868f-a3e5f2112664 ro
INITRD ../initramfs-linux.img
Code : Tout sélectionner
ERROR : device 'UUID=xxxx-xxxx'
ERROR : unable to find root device 'UUID=xxxx-xxxx'
You are being dropped to a recovery shell
Type 'exit' to try and continue booting
sh: can't acces tty; job control turned off
[rootfs /]# _
Voici mon fstab :
Code : Tout sélectionner
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sdf3
UUID=50219d55-3194-44eb-868f-a3e5f2112664 / ext4 rw,relatime,data=ordered,discard 0 1
# /dev/sdf1
UUID=bff95cae-4bd9-4306-b721-07d2b390f0e0 /boot ext2 rw,relatime,discard 0 2
# /dev/sdf4
UUID=c57013cd-5e86-4345-85d0-79145a52c9f6 /home ext4 rw,relatime,data=ordered,discard 0 2
# /dev/sdf2
UUID=e00c3e26-26c7-46e0-886a-2b4708809904 none swap defaults 0 0
Code : Tout sélectionner
# Config file for Syslinux -
# /boot/syslinux/syslinux.cfg
#
# Comboot modules:
# * menu.c32 - provides a text menu
# * vesamenu.c32 - provides a graphical menu
# * chain.c32 - chainload MBRs, partition boot sectors, Windows bootloaders
# * hdt.c32 - hardware detection tool
# * reboot.c32 - reboots the system
# * poweroff.com - shutdown the system
#
# To Use: Copy the respective files from /usr/lib/syslinux to /boot/syslinux.
# If /usr and /boot are on the same file system, symlink the files instead
# of copying them.
#
# If you do not use a menu, a 'boot:' prompt will be shown and the system
# will boot automatically after 5 seconds.
#
# Please review the wiki: https://wiki.archlinux.org/index.php/Syslinux
# The wiki provides further configuration examples
DEFAULT arch
PROMPT 0 # Set to 1 if you always want to display the boot: prompt
TIMEOUT 50
# You can create syslinux keymaps with the keytab-lilo tool
#KBDMAP de.ktl
# Menu Configuration
# Either menu.c32 or vesamenu32.c32 must be copied to /boot/syslinux
UI menu.c32
#UI vesamenu.c32
# Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu
MENU TITLE Arch Linux
#MENU BACKGROUND splash.png
MENU COLOR border 30;44 #40ffffff #a0000000 std
MENU COLOR title 1;36;44 #9033ccff #a0000000 std
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
MENU COLOR unsel 37;44 #50ffffff #a0000000 std
MENU COLOR help 37;40 #c0ffffff #a0000000 std
MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std
MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
MENU COLOR msg07 37;40 #90ffffff #a0000000 std
MENU COLOR tabmsg 31;40 #30ffffff #00000000 std
# boot sections follow
#
# TIP: If you want a 1024x768 framebuffer, add "vga=773" to your kernel line.
#
#-*
LABEL arch
MENU LABEL Arch Linux
LINUX ../vmlinuz-linux
APPEND root=/dev/sdf3 ro
#APPEND root=UUID=50219d55-3194-44eb-868f-a3e5f2112664 ro
INITRD ../initramfs-linux.img
LABEL archfallback
MENU LABEL Arch Linux Fallback
LINUX ../vmlinuz-linux
APPEND root=/dev/sdf3 ro
INITRD ../initramfs-linux-fallback.img
#LABEL windows
# MENU LABEL Windows
# COM32 chain.c32
# APPEND hd0 1
LABEL hdt
MENU LABEL HDT (Hardware Detection Tool)
COM32 hdt.c32
LABEL reboot
MENU LABEL Reboot
COM32 reboot.c32
LABEL off
MENU LABEL Power Off
COMBOOT poweroff.com
Code : Tout sélectionner
0BA277573445B6B5 9f6afc9a-bad0-4fdc-a8a1-6dc31f62fa1d c57013cd-5e86-4345-85d0-79145a52c9f6 FC30-3DA9
50219d55-3194-44eb-868f-a3e5f2112664 bff95cae-4bd9-4306-b721-07d2b390f0e0 e00c3e26-26c7-46e0-886a-2b4708809904