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!