démarrage sans initramfs!

J’ai enfin trouvé comment démarrer une Debian sans l’image initramfs!
Il y a 3 étapes, mais elles sont expliquées en anglais :s est-ce que quelqu’un aurait la gentillesse de me traduire tout ça?

1)Waiting for USB

When you plug in a USB device, some time elapses while the USB and SCSI subsystems initialise it. I think that most of this time is a deliberate delay to allow for you physically connecting it reliably. Because of this, during boot the kernel is likely to give up with a panic telling you that your root device is not available before it has been initialised.
There are two ways to avoid this. The simplest it to use the rootdelay kernel command line argument, which specifies how long the kernel should pause for, in seconds, before trying to mount the root device. See ChangeKernelCommandLine for how to set this.
Alternatively, a simple patch can be applied to make the kernel retry until the device comes online. It is available here: xenotime.net/linux/usb/usbboot-2422.patch
This patch was written for 2.4.22. I manually applied it to my 2.6.19 kernel and it works well, subject to the comments below about how you specify the root device.

2)Building a kernel :

I’m not going to explain how to build a kernel here - mainly because I haven’t got cross compilation using the Debian make-kpkg tool working properly. See BuildImage for some other instructions. The important point is that when you configure the kernel you need to enable all of the things that are required by your root filesystem as built-in code, i.e. press “y”, not modules (“m”). This includes PCI support, the EHCI and OHCI USB host controller, USB storage, SCSI disks, and your chosen filesystem (ext3). Also, don’t forget to disable initramfs support.

3) Specifying the root device :

If you use the patch described above to retry until the root device is available you need to specify the root device on the kernel command line. However, the kernel will attempt to convert an alphanumeric device name (e.g. /dev/sda1) to major/minor device numbers before the USB and SCSI systems are ready, which will fail. Instead you need to use a numeric format, e.g. root=8:1. (use ls -l to find the major/minor device numbers for your root device.) You may be able to supply this as a default command line setting when you build your kernel, but I prefered to set it using APEX. Changing the kernel command line from APEX is described in ChangeKernelCommandLine.
Note that this is likely to fail if you have multiple disks since the order of initialisation is non-deterministic. Mounting by disk label is not supported at this level, though it may be possible with some more patching. Luckily I have only one disk on the slug I’m doing this to.
I’m unsure whether it’s necessary to explicitly specify the root device if you use the rootdelay option, and whether it’s necessary to use numeric device numbers - can someone confirm?

4) Installing the new kernel :[/b]

Before installing the new kernel (and new APEX, if you’ve changed it), save a copy of your flash. You can revert to this using upslug2 if necessary.

cat /dev/mtdblock* > /var/tmp/flash_backup.bin

scp /var/tmp/flash_backup.bin other-computer:/somewhere/safe

I haven’t managed to make a kernel-image .deb file, so I don’t know if installing that will just work. Instead I manually installed the new modules and put the new kernel in /boot/vmlinux-2.6.19. To keep flash-kernel happy I created a zero-length /boot/initrd.img.2.6.19. Then just run “flash-kernel”, reboot and cross your fingers!

Merci!

Je ne suis pas doué en anglais (pas pratiqué depuis mon bac en 73 …)
Il y aurait plus de réponses dans la bonne section, “Support Debian”

[quote]
1)Waiting for USB

When you plug in a USB device, some time elapses while the USB and SCSI subsystems initialise it. I think that most of this time is a deliberate delay to allow for you physically connecting it reliably. Because of this, during boot the kernel is likely to give up with a panic telling you that your root device is not available before it has been initialised.
There are two ways to avoid this. The simplest it to use the rootdelay kernel command line argument, which specifies how long the kernel should pause for, in seconds, before trying to mount the root device. See ChangeKernelCommandLine for how to set this.
Alternatively, a simple patch can be applied to make the kernel retry until the device comes online. It is available here: xenotime.net/linux/usb/usbboot-2422.patch
This patch was written for 2.4.22. I manually applied it to my 2.6.19 kernel and it works well, subject to the comments below about how you specify the root device.[/quote]

Lorsque vous branchez un périphérique usb, du temps s’écoule pendant que les sous-systemes USB et SCSI l’initialisent. Je pense que la plus grande partie de ce temps est un délai délibéré pour vous permetre de bien connecter physiquement le périphérique.
À cause de ça, pendant le boot, le kernel fait la même chose pour donner avec “a panic” vous disant que votre périphérique racine n’est pas disponible avant qu’il n’ait été initialisé.
Il y a deux voies pour éviter ça.
Le plus simple est d’utiliser l’argument de la ligne de commande du kernel rootdelay, qui spécifie combien de temps le kernel doit être en pause, en secondes, avant d’essayer de monter le périphérique racine. Voir ChangeKernelCommandLine pour savoir comment le faire.
Comme alternative, un simple patch peut être appliqué pour faire réessayer le kernel jusqu’à ce que le périph devienne en-ligne.
Il est disponible ici: xenotime.net/linux/usb/usbboot-2422.patch
Il a été écrit pour 2.4.22 Je l’aii manuellement appliqué à mon 2.6.19 kernel et ça marche bien,
sujet aux commentaires ci-dessous à propos de comment vous avez spécifié le périph racine.

Pfiou!!! Qu’est-ce que c’est long!!!
Je verrais si j’ai la patience de faire les autres paragraphes …

Soyons fous … bon je résume

[quote]2)Building a kernel :

I’m not going to explain how to build a kernel here - mainly because I haven’t got cross compilation using the Debian make-kpkg tool working properly. See BuildImage for some other instructions. The important point is that when you configure the kernel you need to enable all of the things that are required by your root filesystem as built-in code, i.e. press “y”, not modules (“m”). This includes PCI support, the EHCI and OHCI USB host controller, USB storage, SCSI disks, and your chosen filesystem (ext3). Also, don’t forget to disable initramfs support.[/quote]

Je ne vais pas vous expliquer comment créer un kernel ici […]Le point important est que lorsque vous configurez le kernel, vous avez à activer toutes les choses qui sont requises par votre systeme de fichier racine en tant qu’un “buit-in code”,presser “y”,not modules (“m”),Ceci inclut le support de PCI,the EHCI and OHCI USB host controller, USB storage, SCSI disks, et le système de fichiers que vous avez choisi (ext3). Aussi, n’oubliez pas de désactiver le support d’initramfs.

C’est bon, j’ai réussi à démarrer sans initramfs :slightly_smiling: Je vous remercie pour vos réponses!

Juste une question, au hasard: Est-ce que ce que me suis cassé la tête à traduire t’a servi?

Oui , oui t’inquiéte pas ^^

=)