WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Linux USB/SD boot very light.  (Read 2943 times)

Offline Patatalo

  • Newbie
  • *
  • Posts: 12
Linux USB/SD boot very light.
« on: December 21, 2010, 12:57:17 AM »
this C code boot with USB or SD. The initramfs is very light because, it need only a static shell (dash is fine). The kernel must have modules for the partition type, scsi and usb mass storage. Init must be on initramfs root.

It use a command line option usb_root=SERIAL:PARTNO:TYPE. The serial can be found with "cat /proc/scsi/usb-storage/N" !!! It is not the serial linux give to partitions.

!!! Since i can't find a method for including linux headers, be careful with usage. Not 64 bits compatible (need includes for dirent, stat, ...).

It calls the same command line (/bin/init) if boot is ok or not, then, place links or files as needed.

The C code can be found on attachment. The initramfs could be less than 300ko.