SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Trying to better understand handling of USB disks.
It would help if anyone can explain something that I notice when I boot
using the original slackware install DVD.
dmesg indicates that the boot has seen the USB disk. For example, At the
very end of dmesg I get following references to the USB drive (sdb on
my machine):
sdb: sdb1 sdb2
sd 3:0:0:0: Attached scsi disk sdb
However, immediately after booting I can't mount either of these partitions.
(e.g. SPECIAL DEVICE /dev/sdb1 DOES NOT EXIST)
(If I look in /dev there are no devices sdb1 or sdb2).
By accident I discovered that if I do a "cfdisk sdb" the special files get
created and then I can mount them etc.
Is this expected - that you should have to run cfdisk before the /dev/sdb1
and /dev/sdb2 special files exist.
immediately after booting with slackware 12 install DVD,
with usb disk connected, dmesg indicates that usb disk (sdb)
was detected (dmesg entries as above).
Then as root:
# mkdir /mountpoint
# mount /dev/sdb2 /mountpoint
mount : special device /dev/sdb2 does not exist
# ls /dev/*sd*
sda sda1 .......sda10 (but NO sdb files shown in /dev)
#fdisk -l
Disk /dev/sda: (gives details of sda)
(also lists all partitions on sda)
(But Gives No indication of sdb)
However....
#mount /dev/sdb2 /mountpoint
(Now this works fine)
# ls /dev/*sd*
(now shows sda, sda1...sda10 plus sdb, sdb1, sdb2)
So it appears that the "fdisk " achieves the
same thing as the "cfdisk" , i.e. creates the
special files for the usb disk.
Just confirming - looking at the time stamps on the /dev/sdb, sdb1,sdb2
special files confirms they are created at the time the fdisk is done.
Anyway this is not a 'problem' as such, just interesting. I thought it might be a clue to some other issues I'm having actually booting off
the sdb disk, and thought perhaps someone more experienced with slackware may have seen it before.
I've fdisk'd, cfdisk's many many different types of drives, plenty of USB. Never once have I ran into what your describing. What did you use to partition the usb in the first place?
Only thing that comes to mind, is that udev is for some reasong getting delayed in scanning for devices and creating the special files. Perhaps it doesn't understand something about the partition table, and somehow fdisk helps it make sense. Really really wierd.
If at all possible I'd try writing zero's to the whole drive, repartitioning cfdisk and see if it keeps it up.
Glad you also think this is a 'stumper'! Thought I was losing the plot alone here.
To answer your question. The partition in question (/dev/sdb2) is a slackware install on the second partition of the USB harddrive. It was partitioned with cfdisk during the slackware install. (The first partition had been created earlier during a SUSE install -not sure what 'tool' was used there)
The main reason I put this problem on the forum was I thought it might throw light on my 'real' problem. When booting off the /dev/sdb2 slackware installation I got a panic - (unable to mount /dev/sdb2).
This has now been solved by including an initrd with a "sleep 10" to allow USB devices to settle (courtesy of a note on the explodingpanda website). So overall I'm now up and running slackware- just thought it was an interesting' thing that I hadnt ever seen before.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.