vovchick,
hmm have two external usb harddrives, will dig out the PC from underneath the table and attach them to check .

A first potential source of error is that the REMOVABLE variable does not get reset each time ,
so if the file /sys/block/$drive/removable does not exist , the REMOVABLE value of the last device would be used .
The former sdg in your case would have passed REMOVABLE=1 to sdh which it did not as it seems .

Expect some answers in a few hours, since I will to have check for different kernels , too .

Booted kernel 2.6.30 and also here : For everything related to usb-hdd I could not find a file that would indicate a removable feature to them , neither in /proc/scsi/[scsi|sg/*|usb-storage/*] or anywhere in /sys .

You can observe where the /sys/block/sda symlink is pointing to.
If the path contains "usb" in it then it is likely to be on the USB bus - which means it is an external drive.

"readlink /sys/block/sda" will tell you what you need to know (replace "sda" with the drive you want to check)._________________Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.

It's a server machine, and has different setup over a desktop machine, I got it at deep discount. It came with windows server setup disks but could not be setup using those. Setup disks lack the lan card drivers for the newer hardware and windows requires a call home to finish installing. But puppylinux never had a problem with it. The lack of a sound card was unexpected.

#!/bin/ash
# Karl Reimer Godt May, 2013
# Thanks to jamesbond, R-S-H, Ted Dog, vovchick.
# Different probedisk attempt to be used in
# the init script of the Puppy Linux initrd.gz
# Since the actually used PMEDIA values are
# cd, usb and [hd|flash|zip] , it is uncertain about how to
# use them except for the cd parameter .
# There could be a dozen USB non-cd drives attached and four internal
# ones ... and vice-versa (|:---D )..

for p in $*
do
P=${p//-/}
case $P in
everything) EVERYTHING=YES;;
esac
done

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot vote in polls in this forumYou cannot attach files in this forumYou can download files in this forum