linuxrc script MOD question


Forum: USB booting
Topic: linuxrc script MOD question
started by: emunity

Posted by emunity on Aug. 17 2007,00:29
I noticed in knoppix version 5.1.1 it has a slow down script to read the USB device more carefully and that one works flawlessy on my Dell D820. DSL-3.4 and Knoppix  version 3.6 never is able to read the knoppix image.  I like Knoppix version 3.6 because it has both 2.4x and 2.6x kernels to choose from.

Here is is:

# All interactively requested modules should be loaded now.

# Give USB-Storage devices some more time to register
if test -d /proc/scsi/usb-storage; then
echo -n "${CRE}${BLUE}Allowing slow USB-devices some more time to register...${NORMAL}"
ash -c "sleep 6"
echo "${BLUE}Ok.${NORMAL}"
fi

# Check for ide-scsi supported CD-Roms et al.
test -r /proc/scsi/scsi && FOUND_SCSI="yes"



I put the before and after script so you know where it is in version 5.1.1 but that is the key I believe that makes 5.1.1 work on all systems. Is it possible to adapt that script to linuxrc file for DSL-3.4?


Maybe that alone will not take care of the problem?   I am going to try an older version of DSL to see if that works.

Anyone good with bash scripting let me know what I have to modify in that script in order to try it in the DSL-3.4 linuxrc bash file?   Thanks

Posted by roberts on Aug. 17 2007,02:01
I have this as a replacement for the wait_usb function in linuxrc and will be available in 3.4.2 and the next dsl 4.

I would rather not penalize everyone with this slow down "sleep 6".  But instead leave it as a separate (existing) boot option of "waitusb"

If you wish, just modify the existing wait_usb function on the line

sleep 1

to

ash -c "sleep 1"

See if this works, as it loops and exits when found thus not wating to wait the full count of 6.

If not, then just repace the entire function with the

wait_usb(){
ash -c "sleep 6"
}

Since you have such hardware to test this, it will be great to get your feedback.

Posted by emunity on Aug. 17 2007,05:57
First off thanks very much for the reply and suggestions.

I actually tried all four methods changing sleep 1 to sleep 6.

Then modifying the line sleep 1 to ash -c "sleep 1"

Then modifying it to ash -c "sleep 6"

Then finally removing or actually adding #'s to about 6 or seven lines of that wait_usb function and replacing as you said with:

wait_usb(){
ash -c "sleep 6"
}

I basically copied and pasted that.  Should there be a space between the () ?  Like this ( ) and also a space between () and {  ?

Anyhow nothing seemed to help.  The kernel boots perfectly and here is what happens:

probing for SCSI....
checking for USB....
Scanning for USB devices.....Done
Enabling DMA acceleration for hdc
Can't  find Knoppix filesystem Sorry
Dropping you to a very limited shell


This also happens with Knoppix v3.6 using both 2.4x and 2.6x kernels but does not happen with Knoppix 5.1.1 usb boot so it cannot be the media or device right?  It must be some tricky script the Knoppix 5.1.1 has?

Anayhow what can I pass as a cheatcode at the boot prompt:

waitusb ?

Maybe I can try different times?

My system is a Dell Latitude D820 so if you can find someone you know or if you want me to try anything else or even send me a linuxrc file to try please be my guest.  Keep in mind this probably will happen to many Latitude D series like the D600 series etc.

Thanks for your help and hope this can be resolved?

d_freedom@yahoo.com

Posted by roberts on Aug. 17 2007,06:14
Thanks for testing this. I am a little confused by your remark on the cheatcode.

In order to call the wait_usb function you will need to pass the waitusb cheatcode at the initial boot prompt

boot: dsl waitusb

plus any other boot options that you normally need.

Or add waitusb to the append section of your boot loader.

Since I don't have any hardware to test this on, I could only extract out the static ash shell from minirt24.gz and run ash -c "sleep 6" and that worked fine. So, I would think, if the boot option waitusb is used, the actual sleep should occur.

Posted by emunity on Aug. 17 2007,06:42
Which I tried before modifying the linuxrc bash script file.

at the boot prompt:

dsl waitusb

Did not help.  What else could it be?  If I put the initrd image file on the USB it boots fine.  However once booted into X if I put another USB stick in and run fdisk -l it does not see the additional inseted usb stick and only the one DSL is on /dev/sda.  No /dev/sdb shows up.

So it might be a USB driver issue maybe and not a timing issue?




Ok One final piece of information.  I booted DSL using the initrd as the image file and have the dmesg below to see if that can tell you anything but as far as I can see the USB devices are seen but not sure if configured correctly?  These are USB ports but I set the Bios to 1.1 compatibility.


dmesg:


<4>Linux version 2.4.26 (root@Knoppix) (gcc version 2.95.4 20011002 (Debian prerelease)) #1 SMP Sa Apr 17 19:33:42 CEST 2004
<6>BIOS-provided physical RAM map:
<4> BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
<4> BIOS-e820: 000000000009f000 - 00000000000a0000 (reserved)
<4> BIOS-e820: 0000000000100000 - 000000007fe81400 (usable)
<4> BIOS-e820: 000000007fe81400 - 0000000080000000 (reserved)
<4> BIOS-e820: 00000000f0000000 - 00000000f4007000 (reserved)
<4> BIOS-e820: 00000000f4008000 - 00000000f400c000 (reserved)
<4> BIOS-e820: 00000000fec00000 - 00000000fec10000 (reserved)
<4> BIOS-e820: 00000000fed20000 - 00000000feda0000 (reserved)
<4> BIOS-e820: 00000000fee00000 - 00000000fee10000 (reserved)
<4> BIOS-e820: 00000000ffb00000 - 0000000100000000 (reserved)
<5>1150MB HIGHMEM available.
<5>896MB LOWMEM available.
<4>On node 0 totalpages: 523905
<4>zone(0): 4096 pages.
<4>zone(1): 225280 pages.
<4>zone(2): 294529 pages.
<4>Kernel command line: ramdisk_size=100000 init=/etc/init lang=us apm=power-off vga=791 initrd=minirt24.gz nomce noapic quiet frugal vga=791 acpi=off dma frugal toram usbmouse BOOT_IMAGE=knoppix BOOT_IMAGE=linux24
<4>Found and enabled local APIC!
<6>Initializing CPU#0
<4>Detected 2330.266 MHz processor.
<4>Console: colour dummy device 80x25
<4>Calibrating delay loop... 4653.05 BogoMIPS
<6>Memory: 2018736k/2095620k available (1371k kernel code, 76496k reserved, 561k data, 140k init, 1178116k highmem)
<6>Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes)
<6>Inode cache hash table entries: 131072 (order: 8, 1048576 bytes)
<6>Mount cache hash table entries: 512 (order: 0, 4096 bytes)
<6>Buffer cache hash table entries: 131072 (order: 7, 524288 bytes)
<4>Page-cache hash table entries: 524288 (order: 9, 2097152 bytes)
<6>CPU: L1 I cache: 32K, L1 D cache: 32K
<6>CPU: Physical Processor ID: 0
<7>CPU:     After generic, caps: bfebfbff 20100000 00000000 00000000
<7>CPU:             Common caps: bfebfbff 20100000 00000000 00000000
<6>Enabling fast FPU save and restore... done.
<6>Enabling unmasked SIMD FPU exception support... done.
<6>Checking 'hlt' instruction... OK.
<6>Checking for popad bug... OK.
<4>POSIX conformance testing by UNIFIX
<4>mtrr: v1.40 (20010327) Richard Gooch (rgooch@atnf.csiro.au)
<4>mtrr: detected mtrr type: Intel
<6>CPU: L1 I cache: 32K, L1 D cache: 32K
<6>CPU: Physical Processor ID: 0
<7>CPU:     After generic, caps: bfebfbff 20100000 00000000 00000000
<7>CPU:             Common caps: bfebfbff 20100000 00000000 00000000
<4>CPU0: Intel® Core™2 CPU         T7600  @ 2.33GHz stepping 06
<4>per-CPU timeslice cutoff: 182.82 usecs.
<5>SMP motherboard not detected.
<4>enabled ExtINT on CPU#0
<4>ESR value before enabling vector: 00000000
<4>ESR value after enabling vector: 00000000
<4>Using local APIC timer interrupts.
<4>calibrating APIC timer ...
<4>..... CPU clock speed is 2330.2547 MHz.
<4>..... host bus clock speed is 166.4467 MHz.
<4>cpu: 0, clocks: 1664467, slice: 832233
<4>CPU0<T0:1664464,T1:832224,D:7,S:832233,C:1664467>
<4>Waiting on wait_init_idle (map = 0x0)
<4>All processors have done init_idle
<6>ACPI: Subsystem revision 20040326
<6>ACPI: Interpreter disabled.
<6>PCI: PCI BIOS revision 2.10 entry at 0xfacc6, last bus=14
<6>PCI: Using configuration type 1
<6>PCI: Probing PCI hardware
<4>PCI: ACPI tables contain no PCI IRQ routing entries
<4>PCI: Probing PCI hardware (bus 00)
<6>PCI: Ignoring BAR0-3 of IDE controller 00:1f.2
<4>Transparent bridge - Intel Corp. 82801BAM/CAM PCI Bridge
<6>PCI: Using IRQ router PIIX/ICH [8086/27b9] at 00:1f.0
<6>isapnp: Scanning for PnP cards...
<6>isapnp: No Plug & Play device found
<6>Linux NET4.0 for Linux 2.4
<6>Based upon Swansea University Computer Society NET3.039
<4>Initializing RT netlink socket
<4>Starting kswapd
<4>allocated 32 pages and 32 bhs reserved for the highmem bounces
<5>VFS: Disk quotas vdquot_6.5.1
<6>vesafb: framebuffer at 0xd0000000, mapped to 0xf880d000, size 3072k
<6>vesafb: mode is 1024x768x16, linelength=2048, pages=1
<6>vesafb: protected mode interface info at a5f3:1f5f
<6>vesafb: scrolling: redraw
<6>vesafb: directcolor: size=0:5:6:5, shift=0:11:5:0
<4>Console: switching to colour frame buffer device 128x48
<6>fb0: VESA VGA frame buffer device
<4>pty: 256 Unix98 ptys configured
<6>Floppy drive(s): fd0 is 1.44M
<4>floppy0: no floppy controllers found
<4>RAMDISK driver initialized: 16 RAM disks of 100000K size 1024 blocksize
<6>Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
<6>ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
<4>hda: ST9160823AS, ATA DISK drive
<4>hdc: PHILIPS DVD+/-RW SDVD8820, ATAPI CD/DVD-ROM drive
<4>ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
<4>ide1 at 0x170-0x177,0x376 on irq 15
<4>hda: attached ide-disk driver.
<4>hda: host protected area => 1
<6>hda: 312581808 sectors (160042 MB) w/8192KiB Cache, CHS=19457/255/63
<6>Partition check:
<6> hda: hda1 hda2 hda3 hda4 < hda5 hda6 hda7 >
<4>ide: late registration of driver.
<6>SCSI subsystem driver Revision: 1.00
<3>kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2
<3>kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2
<6>Initializing Cryptographic API
<6>NET4: Linux TCP/IP 1.0 for NET4.0
<6>IP Protocols: ICMP, UDP, TCP, IGMP
<6>IP: routing cache hash table of 16384 buckets, 128Kbytes
<6>TCP: Hash tables configured (established 262144 bind 65536)
<6>NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
<5>RAMDISK: Compressed image found at block 0
<6>Freeing initrd memory: 49295k freed
<4>EXT2-fs warning: maximal mount count reached, running e2fsck is recommended
<4>VFS: Mounted root (ext2 filesystem).
<4>hdc: attached ide-scsi driver.
<6>scsi0 : SCSI host adapter emulation for IDE ATAPI devices
<4>  Vendor: PHILIPS   Model: DVD+-RW SDVD8820  Rev: AD15
<4>  Type:   CD-ROM                             ANSI SCSI revision: 02
<4>Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0
<4>sr0: scsi3-mmc drive: 24x/24x writer cd/rw xa/form2 cdda tray
<6>Uniform CD-ROM driver Revision: 3.12
<6>Highpoint HPT370 Softwareraid driver for linux version 0.02
<5>megaraid: v1.18k (Release Date: Thu Aug 28 10:05:11 EDT 2003)
<4>megaraid: no BIOS enabled.
<7>Promise Fasttrak™ Softwareraid driver 0.03beta: No raid array found
<4>Guestimating sector 312560384 for superblock
<7>driver for Silicon Image™ Medley™ hardware version 0.0.1: No raid array found
<4>cloop: Initializing cloop v2.01
<6>cloop: loaded (max 8 devices)
<4>cloop: /cdrom/KNOPPIX/KNOPPIX: 1883 blocks, 65536 bytes/block, largest block is 65552 bytes.
<7>ISO 9660 Extensions: RRIP_1991A
<4>cloop: unloaded.
<4>cloop: Initializing cloop v2.01
<6>cloop: loaded (max 8 devices)
<4>cloop: /cdrom2/KNOPPIX/KNOPPIX: 1883 blocks, 65536 bytes/block, largest block is 65552 bytes.
<7>ISO 9660 Extensions: RRIP_1991A
<6>Freeing unused kernel memory: 140k freed
<6>Real Time Clock Driver v1.10f
<6>apm: BIOS not found.
<6>Linux Kernel Card Services 3.1.22
<6>  options:  [pci] [cardbus] [pm]
<6>PCI: Assigned IRQ 11 for device 03:01.0
<6>PCI: Sharing IRQ 11 with 03:01.4
<6>Yenta ISA IRQ mask 0x0090, PCI irq 11
<6>Socket status: 30000006
<6>cs: IO port probe 0x0c00-0x0cff: excluding 0xc80-0xc87 0xc90-0xc97
<6>cs: IO port probe 0x0800-0x08ff: clean.
<6>cs: IO port probe 0x0100-0x04ff: excluding 0x3b0-0x3df 0x3f8-0x3ff 0x4d0-0x4d7
<6>cs: IO port probe 0x0a00-0x0aff: clean.
<6>usb.c: registered new driver usbdevfs
<6>usb.c: registered new driver hub
<6>usb-uhci.c: $Revision: 1.275 $ time 19:48:59 Apr 17 2004
<6>usb-uhci.c: High bandwidth mode enabled
<6>PCI: Found IRQ 7 for device 00:1d.0
<6>IRQ routing conflict for 00:1d.0, have irq 10, want irq 7
<6>IRQ routing conflict for 00:1d.7, have irq 10, want irq 7
<7>PCI: Setting latency timer of device 00:1d.0 to 64
<6>usb-uhci.c: USB UHCI at I/O 0xbf80, IRQ 10
<4>usb-uhci.c: Detected 2 ports
<6>usb.c: new USB bus registered, assigned bus number 1
<6>hub.c: USB hub found
<6>hub.c: 2 ports detected
<6>PCI: Found IRQ 1 for device 00:1d.1
<6>IRQ routing conflict for 00:1b.0, have irq 11, want irq 1
<6>IRQ routing conflict for 00:1d.1, have irq 11, want irq 1
<7>PCI: Setting latency timer of device 00:1d.1 to 64
<6>usb-uhci.c: USB UHCI at I/O 0xbf60, IRQ 11
<4>usb-uhci.c: Detected 2 ports
<6>usb.c: new USB bus registered, assigned bus number 2
<6>hub.c: USB hub found
<6>hub.c: 2 ports detected
<6>PCI: Assigned IRQ 9 for device 00:1d.2
<7>PCI: Setting latency timer of device 00:1d.2 to 64
<6>usb-uhci.c: USB UHCI at I/O 0xbf40, IRQ 9
<4>usb-uhci.c: Detected 2 ports
<6>usb.c: new USB bus registered, assigned bus number 3
<6>hub.c: USB hub found
<6>hub.c: 2 ports detected
<6>PCI: Found IRQ 2 for device 00:1d.3
<6>IRQ routing conflict for 00:1d.3, have irq 5, want irq 2
<7>PCI: Setting latency timer of device 00:1d.3 to 64
<6>usb-uhci.c: USB UHCI at I/O 0xbf20, IRQ 5
<4>usb-uhci.c: Detected 2 ports
<6>usb.c: new USB bus registered, assigned bus number 4
<6>hub.c: USB hub found
<6>hub.c: 2 ports detected
<6>usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
<4>usbdevfs: remount parameter error
<6>hub.c: new USB device 00:1d.0-2, assigned address 2
<6>hub.c: USB hub found
<6>hub.c: 4 ports detected
<6>hub.c: new USB device 00:1d.2-1, assigned address 2
<4>usb.c: USB device 2 (vend/prod 0x45e/0x84) is not claimed by any active driver.
<6>Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ SERIAL_PCI ISAPNP enabled
<6>ttyS00 at 0x03f8 (irq = 4) is a 16550A
<6>hub.c: new USB device 00:1d.1-1, assigned address 2
<6>hub.c: USB hub found
<6>hub.c: 3 ports detected
<6>hub.c: new USB device 00:1d.1-2, assigned address 3
<4>usb.c: USB device 3 (vend/prod 0x5dc/0x80) is not claimed by any active driver.
<6>hub.c: new USB device 00:1d.1-1.2, assigned address 4
<4>usb.c: USB device 4 (vend/prod 0xb97/0x7762) is not claimed by any active driver.
<6>usb.c: registered new driver hiddev
<6>usb.c: registered new driver hid
<6>input: USB HID v1.10 Mouse [Microsoft Basic Optical Mouse] on usb3:2.0
<6>hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <vojtech@suse.cz>
<6>hid-core.c: USB HID support drivers
<6>mice: PS/2 mouse device common for all mice
<6>Initializing USB Mass Storage driver...
<6>usb.c: registered new driver usb-storage
<6>scsi1 : SCSI emulation for USB Mass Storage devices
<4>  Vendor: LEXAR     Model: DIGITAL FILM      Rev: /W1.
<4>  Type:   Direct-Access                      ANSI SCSI revision: 02
<4>Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
<4>SCSI device sda: 125952 512-byte hdwr sectors (64 MB)
<4>sda: Write Protect is off
<6> sda: sda1
<7>WARNING: USB Mass Storage data integrity not assured
<7>USB Mass Storage device found at 3
<6>USB Mass Storage support registered.
<3>hw_random: RNG not detected
<4>FAT: Did not find valid FSINFO signature.
<4>Found signature1 0x4e0005 signature2 0xd6e80000 sector=1.
<4>VFS: Can't find a valid FAT filesystem on dev 03:01.
<4>FAT: Did not find valid FSINFO signature.
<4>Found signature1 0x4e0005 signature2 0xd6e80000 sector=1.
<4>VFS: Can't find a valid FAT filesystem on dev 03:01.
<5>NTFS driver v1.1.22 [Flags: R/W MODULE]
<6>Adding Swap: 4096532k swap-space (priority -1)
<4>Registering unionfs 1.0.14
<6>cdrom: open failed.
<6>cdrom: open failed.
<6>ndiswrapper version 1.14 loaded (preempt=no,smp=yes)
<4>FAT: Did not find valid FSINFO signature.
<4>Found signature1 0x4e0005 signature2 0xd6e80000 sector=1.
<4>VFS: Can't find a valid FAT filesystem on dev 03:01.
<4>FAT: Did not find valid FSINFO signature.
<4>Found signature1 0x4e0005 signature2 0xd6e80000 sector=1.
<4>VFS: Can't find a valid FAT filesystem on dev 03:01.
<6>apm: BIOS not found.
<3>NTFS: Warning! NTFS volume version is Win2k+: Mounting read-only
<4>EXT2-fs warning (device ide0(3,3)): ext2_read_super: mounting ext3 filesystem as ext2
<4>

Posted by roberts on Aug. 17 2007,19:51
Looking through this log file, I see usb hub assigned irq 10,11,9,5?
Are you using a usb hub?
Do you have both front and rear usb ports on your computer?
Best to try rear ports first.
Also could be IRQ conflict.
Try looking at...

cat /proc/interrupts

Posted by emunity on Aug. 17 2007,21:46
No Hub.  I  will look for IRQ conflics.   I can get Knoppix 5.1.1 to boot but maybe since thats kernel 26.x it may handle the interrups differently?


I tried all the ports rear and side.  I will try again plus I will remove the USB mouse.  There are two USB ports on the side and one is where I put the USB mouse and the other dsl.

Posted by roberts on Aug. 17 2007,22:13
When you put the mod in are you seeing "Waiting for USB devices" ?

If not, then try moving the ash -c "sleep 6" directly inline like this:

if test -n "$WAITUSB"; then
echo -n "${CRE}{BLUE}Waiting for USB devices${NORMAL}..."
ash -c "sleep 6"
echo "${BLUE}Done.${NORMAL}
fi

I can see the Waiting message and it does wait when I use the waitusb boot option.

Posted by emunity on Aug. 17 2007,22:21
No I don't see that message at all waiting for USB drives.

I am going to try that.  I never lined the script up like that. Will try it that way shortly.

Here is my cat /proc/pci readout

Do you want me to remove the entire usb_wait function and just put in that script or insert that where the sleep 1 is and line it up as you have?

Posted by emunity on Aug. 17 2007,22:44
got a /linuxrc : 101 Syntax Error: "|" unexpected.

Here is some before and after script in the linuxrc file.  I removed as you can from the wait_usb function all the way down to "}" then just added your script.


Please check it not sure why I got the syntax error.

Thanks





mountit(){
# Usage: mountit src dst "options"
# Uses builtin mount of ash.knoppix
for fs in $BUILTIN_FS; do
test -b $1 && mount -t $fs $3 $1 $2 >/dev/null 2>&1 && return 0
done
return 1
}

# Wait for very slow USB devices:
# Host: scsi1 Channel: 00 Id: 00 Lun: 00
#   Vendor:          Model:                  Rev:
#   Type:   <NULL>                ANSI SCSI revision: ffffffff
#wait_usb() {
#    case "$(cat /proc/scsi/scsi)" in
#       *"<NULL>"*|*ffffffff*) ;;
#       *) return ;;
#    esac
#    echo -n "${CRE}${BLUE}Waiting for USB devices${NORMAL}..."
#    for i in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .; do
#       sleep 1
#       case "$(cat /proc/scsi/scsi)" in
#           *"<NULL>"*|*ffffffff*) echo -n .;;
#           *) break ;;
#       esac
#    done
#    echo "${BLUE}Done.${NORMAL}"
#}


if test -n "$WAITUSB"; then
echo -n "${CRE}{BLUE}Waiting for USB devices${NORMAL}..."
ash -c "sleep 6"
echo "${BLUE}Done.${NORMAL}
fi




FOUND_SCSI=""
FOUND_KNOPPIX=""
INTERACTIVE=""

# Clean input/output
exec >/dev/console </dev/console 2>&1

Posted by roberts on Aug. 17 2007,22:47
Delete the wait_usb function and replace the wait_usb function call with the echo & ash statements.

I put mine inline as I have shown and can see and experience the delay.

I used the ash -c "sleep 6"

Posted by emunity on Aug. 17 2007,22:55
Can you show me here what t shoudl look like?  I  printed out some of the script above.

I think I remmed out the wrong lines.

Is this the part I need to modify only?

# Check for user request to wait for slow USB devices
if test -n "$WAITUSB"; then
wait_usb
fi


Remove all that and replace it with your script?  Also don't touch what I rem'd out above?

Posted by roberts on Aug. 17 2007,23:06
Before:

# Check for user request to wait for slow USB devices
if test -n "$WAITUSB"; then
wait_usb
fi

After:
if test -n "$WAITUSB"; then
echo -n "${CRE}{BLUE}Waiting for USB devices${NORMAL}..."
ash -c "sleep 6"
echo "${BLUE}Done.${NORMAL}"
fi



Posted by emunity on Aug. 17 2007,23:23
So I should have never touched this section which I put back to the way it was:

# Wait for very slow USB devices:
# Host: scsi1 Channel: 00 Id: 00 Lun: 00
#   Vendor:          Model:                  Rev:
#   Type:   <NULL>                ANSI SCSI revision: ffffffff
wait_usb() {
   case "$(cat /proc/scsi/scsi)" in
       *"<NULL>"*|*ffffffff*) ;;
       *) return ;;
   esac
   echo -n "${CRE}${BLUE}Waiting for USB devices${NORMAL}..."
   for i in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .; do
       sleep 1
       case "$(cat /proc/scsi/scsi)" in
           *"<NULL>"*|*ffffffff*) echo -n .;;
           *) break ;;
       esac
   done
   echo "${BLUE}Done.${NORMAL}"
}




I found the section you want me to replace did so but getting a different syntax error this time:

/linuxrc: 621: Syntax error "(" unexpected (expecting "fi"

I am assuming this is line 621?  I never modifed anything on 621 only what I just wrote now and put it back and did as you said.



I just edited this post I think there is a Quote missing will try that and let you know.

SHould:

echo "${BLUE}Done.${NORMAL}

Be:

echo "${BLUE}Done.${NORMAL}"


??

Posted by roberts on Aug. 17 2007,23:51
I missed the closing quote on the first {NORMAL} which I have corrected.

The wait_usb function will never be called, so you can delete it or comment it out. Does not matter.

We are really only replacing one line (wait_usb) with three lines:

echo -n "${CRE}{BLUE}Waiting for USB devices${NORMAL}..."
ash -c "sleep 6"
echo "${BLUE}Done.${NORMAL}"

Posted by emunity on Aug. 18 2007,00:03
I thought it was missing so just went ahead and added it and ran dsl.  I still cannot see the waiting for usb anywhere?  It just flips through very fast.  I never see any text displayed "waiting"?


So basically this entire section can be deleted?

# Wait for very slow USB devices:
# Host: scsi1 Channel: 00 Id: 00 Lun: 00
#   Vendor:          Model:                  Rev:
#   Type:   <NULL>                ANSI SCSI revision: ffffffff
wait_usb() {
  case "$(cat /proc/scsi/scsi)" in
      *"<NULL>"*|*ffffffff*) ;;
      *) return ;;
  esac
  echo -n "${CRE}${BLUE}Waiting for USB devices${NORMAL}..."
  for i in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .; do
      sleep 1
      case "$(cat /proc/scsi/scsi)" in
          *"<NULL>"*|*ffffffff*) echo -n .;;
          *) break ;;
      esac
  done
  echo "${BLUE}Done.${NORMAL}"
}


???


Cannot figure out why I cannot see the "waiting" message?  I will try it on another PC to see If I see it there

I'll be right back.

In the meantime I can delete all the script I just displayed?  Isn't that USB function called for in other places?

It didn't even work at all on this PC at work.  I'll have to try it on the one at home I know it does work on to see if I can see the displayed message.

If you think of anything else let me know and thanks so much for the help.  If we can figure out what the problem is it would be great.

By the way I do have a grub boot loader on this version.  SHould I try it without that bootloader?  It should not matter.

Posted by roberts on Aug. 18 2007,00:09
That is the function that can be deleted.
It was never a formal part of Knoppix, it was a user contributed hack.
It is only called from one place, which we have replaced with three lines.

Posted by emunity on Aug. 18 2007,00:47
ok an update.  I have two 64 meg lexar flash drives I created DSL on in a from a dsl boot cd.

One has the initrd around 48 meg file which boots on all of the PC's including my D820.

On the other 64 meg flash drives I have as a backup dsl.  I removed the initrd from it and put back the normal minitrd.gz but modifed the linuxrc with the latest mod. And also obviously put back the Knoppix image.

Both of them are non grub booting devices and boot from syslinux.

Don't confuse these two flash drives with the ones I have been trying to get to work on the D820 which is a 4Gigs lexar and installed grub on it and did it the Wiki method II from  a linux OS.

Thats the one I have been working on with you and it still will not display the waiting message.

On the 64 meg flash I modified the linuxrc file and booted it off a PC I know it works from and I don't see the waiting message there either but it does boot from from this non initrd version.  It does not work on the D820.

As I said above I wanted to make sure the grub was not interferring with out tests and its not.  I just had to check that.

Anyhow why am I not seeing the message?

Since you said it did not matter I did not delete that whole section you said I could delete.

Any more ideas?

Posted by emunity on Aug. 18 2007,01:13
OMG OMG you have done it.  It works!!!!!  Your a GOD!!!!  Thanks so much!!!!!

Read a few remarks below:

I know for a fact the 64 meg Lexars that I created dsl on from the Live CD did not work on the D820.  That is why I put the initrd on both and I had a second one as a backup.

I don't know how to thanks you but your script works 100%.

I still do not see the message but I don't care at this point because you got it to work.

For the 4gig lexar I don't think the Live CD was able to put dsl on it because of its size so I had to revert to the wiki method:

< http://www.damnsmalllinux.org/wiki....h_Drive >

Method II: Using GRUB as boot loader

making two partitions etc and grub.  This USB stick still will not work with the modified script on the D820 although I am able to get it to boot from a couple of other PC's without the modified script.

WHat I have to figure out is how to reinstall dsl onto this 4GB Lexar stick other than the Live CD.

I think the key is to use syslinux?  Is that what the LiveCD uses?

Although with syslinux I will not be able to make two partitions on that 4GB flash drive will I?  Doesn't syslinux only work it there is one partition on the flash drive?

I'll have to figure out another way to install dsl on the 4GB stick and try the unmodified linuxrc file and yor modified version.

Keeping fingers crossed and thanks again for getting this to work.

Why I never see the message is unclear to me.  I tried it both on my D820 which is now boots dsl with your modoifed script and a PC I know that works with or without the modified script.  On that PC it always booted dsl  fand with the modified linuxrc file I don't see the "waiting" message on that one either?

One more important comment I am using DSL-ISO version 3.4 and not yoru current 3.4.1.


Let me know what other testing you want me to try over the weekend.

I won't probably try anything else until later on tonight or Saturday!!!

THanks again

Posted by roberts on Aug. 18 2007,03:36
For your 4GB you can try the new grub usbhdd install script.
It is on dsl v4.0c1 and only works when installing from the booted cdrom. It can be found in the usual place on the menu or under Apps Tools

This new script tries to calculate cyclinders and makes 2 partitions. The second partition is a small 50MB for DSL, the first partition is the remaining size of your pendrive and is vfat. This works for me and allows Windows to see the large partiton to share data, etc.

Caution: It is a new and farily untested script.
Don't run it if your system is SATA.
It expects to find the pendrive as sda.

Try it and let me know.



Posted by emunity on Aug. 19 2007,01:14
Working on it now.  Question can't I clone my now working dsl on the one flash drive using the "dd" command then put that clone on the 4GIger and just partition the rest of it whatever way or partition I want even multiple?

How can I do that and copy the boot sector of the working flash drive?

Just curious to see if it will work.  I am also testing the release candidate as well.

Posted by emunity on Aug. 19 2007,02:18
Release Candidate 4.0rc1 is DaBomb.

Works 100% on the D820.  And I noticed the linuxrc script is the same as before we made any changes to it and that script is working 100% on my D820.

So it is something in Release Candidate that has more support for newer devices is why it boots up fine now?

Thanks for all the help.  Now I have two great working DSL's

I like Release Candidate1 version 4.0 becaus it supports my broadcom ethernet device.

No support yet I see for the wireless ipw3945 but I have it working on Fedora 7 using the iwl3945 built in kernel module but have to use a Network Manager to connect.

ndsiwrapper in fedora froze my ipw3945 wireless but I am wondering if it might work in this dsl version?  Will have to give it a try.

You think that I can get a working kernel driver for the ipw3945?  I will  have to search your forums for that.

Thanks for the marvelous tech support robert.

For anyone who has a D600 or D800 series Dell Latitude Laptop  this thread will be great  for them!!

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