How to boot Crux from a USB stick?

Hi all, 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 file structure on the stick is essentialy the same as on the CD. How does Crux determine on which device the media is? Or what else am I missing? Thanks for any help - Bernd -- http://sudrala.de

On Fri, 17 Oct 2014 22:15:18 +0000 Bernd Eggink wrote:
Hi all,
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 file structure on the stick is essentialy the same as on the CD. How does Crux determine on which device the media is? Or what else am I missing? Thanks for any help - Bernd
Here is how vanilla Crux iso is made, maybe that will help to figure out what is wrong. http://crux.nu/gitweb/?p=system/iso.git;a=tree Pedja

* Bernd Eggink (monoped@sudrala.de) wrote:
Hi all,
Hello Bernd!
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. I propose Matt changes this line either way, I could do it too, if there are no objections. Please report back if you had success with my suggested solution. regards, Thomas --

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

Bernd, Glad you were able to work around the issue. For what it's worth the FAT and VFAT filesystems are supported by the initramfs kernel and environment but it seems like the default codepage is missing. I'll investigate this to fix in future releases/updated ISOs, thanks for pointing it out. Matt
participants (4)
-
Bernd Eggink
-
Matt Housh
-
Predrag Ivanovic
-
Thomas Penteker