cleary
04-05-2005, 02:17 AM
I've just been doing a bit of testing with the Knoppix 3.8 CeBit 2005 edition, and I just thought I'd go over some of the problems I've had with USB storage devices.
New naming convention for USB storage
They are now referred to as ub[a-z] instead of the old sd[a-z] - this is basically where all the problems stem from.
I can't quite work out why it's been changed. Initially I had no experience with any distros using the 2.6 kernel, and figured the change was related to that. Except that I've now used the kubuntu hoary preview with the 2.6.10 kernel, and it still refers to the devices as sd[a-z]. I don't know the reasons behind the change, but it's certainly a more intuitive name than before (starts with a 'u' for usb), and it no longer has to share with sata disks.
Some specific issues as a result
There are a few scripts that are supposed to search for storage devices, generally matching entries in /etc/fstab. Unfortunately, these scripts don't seem to have been updated to include the new naming convention.
Example: /etc/init.d/knoppix-autoconfig
The "findfile" function which is called when you use the cheatcode myconfig=scan searches for existing knoppix configs on storage devices
findfile(){
...
for i in /mnt/[sh]d[a-z] /mnt/[sh]d[a-z][1-9] /mnt/[sh]d[a-z][1-9]?*; do
...
}
If I have a knoppix config file stored on my usb stick /dev/ub[a-z][1-9] then the code above will not find it.
It's a simple fix:
/mnt/[shu][db][a-z]
But I'm not sure how many different scripts reference the storage devices in this way.
Another I've found is /usr/sbin/saveconfig (run from K Menu -> KNOPPIX ->Configure -> Save Knoppix configuration)
# Directory selector
for i in `awk '/^\/dev\/[hs]d[a-z].*\/mnt\/[hs]d[a-z]/...
Wouldn't it be easier to use the old naming convention?
Not knowing the reasons behind the change, I don't know for sure, but it would make sense to me :)
Does anyone have any thoughts/comments/insights?
New naming convention for USB storage
They are now referred to as ub[a-z] instead of the old sd[a-z] - this is basically where all the problems stem from.
I can't quite work out why it's been changed. Initially I had no experience with any distros using the 2.6 kernel, and figured the change was related to that. Except that I've now used the kubuntu hoary preview with the 2.6.10 kernel, and it still refers to the devices as sd[a-z]. I don't know the reasons behind the change, but it's certainly a more intuitive name than before (starts with a 'u' for usb), and it no longer has to share with sata disks.
Some specific issues as a result
There are a few scripts that are supposed to search for storage devices, generally matching entries in /etc/fstab. Unfortunately, these scripts don't seem to have been updated to include the new naming convention.
Example: /etc/init.d/knoppix-autoconfig
The "findfile" function which is called when you use the cheatcode myconfig=scan searches for existing knoppix configs on storage devices
findfile(){
...
for i in /mnt/[sh]d[a-z] /mnt/[sh]d[a-z][1-9] /mnt/[sh]d[a-z][1-9]?*; do
...
}
If I have a knoppix config file stored on my usb stick /dev/ub[a-z][1-9] then the code above will not find it.
It's a simple fix:
/mnt/[shu][db][a-z]
But I'm not sure how many different scripts reference the storage devices in this way.
Another I've found is /usr/sbin/saveconfig (run from K Menu -> KNOPPIX ->Configure -> Save Knoppix configuration)
# Directory selector
for i in `awk '/^\/dev\/[hs]d[a-z].*\/mnt\/[hs]d[a-z]/...
Wouldn't it be easier to use the old naming convention?
Not knowing the reasons behind the change, I don't know for sure, but it would make sense to me :)
Does anyone have any thoughts/comments/insights?