
On 18.10.2014 10:40, Thomas Penteker wrote:
* Bernd Eggink (monoped@sudrala.de) wrote:
I'm trying to put a modified version of Crux 3.1 on a USB stick and make it bootable. After some struggling with syslinux, I got it booting. But then it spits out some messages of the kind "No media found on...", and the system halts.
The relevant code is in our initrd's init script that you can find at http://crux.nu/gitweb/?p=system/iso.git;a=blob_plain;f=initramfs/init .
I recommend looking at the code starting on line 60. It basically enumerates all disk and hard drive disk deives:
CDROM_DEVICES="`awk '/drive name:/ { for (i=3;i<=NF;i++) { printf("%s ", $i) } }' /proc/sys/dev/cdrom/info`" BLOCK_DEVICES="`grep -E '[sh]d' /proc/partitions | awk '{ print $4 }'`"
My first guess would be that your USB media is present as /dev/vda*, so you should check that first (just insert some diagnostic ls /dev/*d* or change the grep -E '[sh]d' statement above to grep -E '[shv]d' and hope that it fixes your issue right away.
Thomas, thanks for your reply. Although your guess was wrong (device name is /dev/sdc1), it pointed me into the right direction. I inserted some outputs into the init script, from which I could see that the mount command exited with retcode=1 for /dev/sdc1, but not for /dev/sda1. The simple explanation: /dev/sdc1 carries a VFAT file system (as I couldn't persuade isolinux to boot from ext2). The busybox contained in intrd, however, doesn't understand VFAT. I created a second partition with an ext2 file system, moved the Crux files there, and now everything works just fine. Anyway, an initrd with compiled-in FAT support would make things a bit easier IMHO. Greetings, Bernd -- http://sudrala.de