USB boot with toram not working: patch :-)


Forum: USB booting
Topic: USB boot with toram not working: patch :-)
started by: doegox

Posted by doegox on Jan. 11 2006,11:25
Hello,

I just tried the last iso 2.1b and "burned" a USB stick with it.
When I try to boot *from the CD* with toram, I have no problem, it frees the cdrom drive and I'm happy.
When I try to do the same from the USB stick, it boots properly, shows me the usual "Copying DSL to ramdisk...Please wait" for a while then "Warning, changing to /cdrom2 failed" and it goes on till the X but a mount shows:
Code Sample
/dev/sda1 on /cdrom type vfat

instead of a /dev/shm and of course I cannot umount the USB stick.

I digged a bit and I found the problem in the mkinit24/linuxrc:
The copy (cp usb...KNOPPIX to ram) goes well but from a VFAT to an ext2 and on the case-unsensitive VFAT the file is named knoppix, so the copy.
By introducing in the copy_to function a simple line between the actual copy and the remount such as:
Code Sample
/bin/mv $TARGET/$KNOPPIX_DIR/knoppix $TARGET/$KNOPPIX_DIR/$KNOPPIX_NAME

I could make the toram working as expected.

I leave to the DSL team the problem of the hardcoded "knoppix" string in my command as an exercise ;-)

Philippe Teuwen

Posted by ~thc on Jan. 11 2006,17:44
i ran into the same problem. as far as i know, the vfat driver does an implicit "all lowercase" conversion on "all uppercase" names. mount the stick under win/dos and 'KNOPPIX' is still all uppercase. so the dsl team is 'innocent' here ;).
Posted by doobit on Jan. 11 2006,17:58
Thanks for the patch!
Posted by doegox on Jan. 12 2006,16:57
Quote (~thc @ Jan. 11 2006,12:44)
i ran into the same problem. as far as i know, the vfat driver does an implicit "all lowercase" conversion on "all uppercase" names. mount the stick under win/dos and 'KNOPPIX' is still all uppercase. so the dsl team is 'innocent' here ;).

Hi,

Good point.
With a regular mount you can use mount -t vfat -o shortname=mixed and it works.
You can try from a DSL xterm:
sudo mount /dev/sda1 /mnt/sda1 -t vfat -o shortname=mixed
ls /mnt/sda1/KNOPPIX
KNOPPIX
But when I tried to give this option to mount from linuxrc, it does not recognise the option :-(

Isn't it supposed to be the same binary?

Posted by cbagger01 on Jan. 12 2006,18:41
The binary is the same, but the "mount" command in the minirt24.gz is probably a stripped down version of the "mount" command.
Posted by ~thc on Jan. 12 2006,18:48
no. the 'mount' command executed in linuxrc is actually a builtin command of the ash shell - you may try '/bin/mount' instead.
Posted by doegox on Jan. 13 2006,09:56
BTW I found this post discussing the same issue:
< http://damnsmalllinux.org/cgi-bin....;t=3982 >

It is amazing that one year later, the problem seems not to have been fixed :(

Ok, /bin/mount would be better but it is not available from minirt24 to mount the stick.
So I tried to do a remount with /bin/mount before the copy (here without variable:)
/bin/mount -t vfat -o remount,ro,shortname=mixed /dev/sda1 /cdrom
It did not give errors on remounting but it does not change the lowercase of knoppix/knoppix to uppercase yet.

Any other idea?

So far, these are the options:
- mv knoppix KNOPPIX after the copy, quickest but hackyest way and the only one working so far!
- remount from /bin/mount does not change the cases
- implement the shortname=mixed in the static ash? Where to get the sources and exact config of this one?
- just renaming KNOPPIX to knoppix everywhere?

To implement the option in ash.static, I tried to:
- get < http://debian-knoppix.alioth.debian.org/sources.....tar.gz >
- edit bltin/mount.c line 92 with something like:
//rc=mount(dv,mp,fs,fl,NULL);                                                      
rc=mount(dv,mp,fs,fl,strcmp(fs,"vfat")?NULL:"shortname=mixed");
- but I cannot manage to compile ash.static properly
Could someone else try to rebuild ash.static from the source?

Phil

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.