LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-04-2006, 07:50 AM   #1
JohnKFT
Member
 
Registered: Aug 2003
Location: NW Scotland
Distribution: Slackware 10
Posts: 169

Rep: Reputation: 30
SD card & USB stick format chaos


Slack 10.1, kernel 2.6. Usually inserting my SD cards into PCMCIA slot or card reader generates a device /dev/hde1 or /dev/sda1. Inserting a second one produces hdg1 and sdb1. Some cards/usb sticks however, generate just the hde, hdg, sda, sdb without the 1, causing chaos to my carefully set up fstab. If I format a card or stick using mkdosfs /dev/whatever (because something has corrupted) the thing always then produces the device with no number,even if it used to produce a numbered device. It also seems to say "unknown partition table" in dmesg.

I feel in a complete muddle and do not know what to do next. My family cannot cope with trying to figure which device their card is going to show up in. Can anyone guide me please?
 
Old 10-04-2006, 08:16 AM   #2
sfaz32
LQ Newbie
 
Registered: Sep 2005
Posts: 16

Rep: Reputation: 0
Hi JohKFT,

You need to umount the device and create a partition on the drive.
"/dev/sda1" refers to the device sda on partition 1.

As root,
Code:
fdisk /dev/sda
at the command prompt, do

"n" to create a new partition
"p" for primary
"1" for partition 1
Now set the size correctly.

Next you need to change the type to FAT16 (assuming you want to use mkdosfs)
at the command prompt, do

"t" to change the type
"1" for partition 1
"6" for FAT16

after that you need to save the changes with "w"

then proceed to
Code:
mkdosfs /dev/sda1
 
Old 10-04-2006, 08:32 AM   #3
dennisk
Member
 
Registered: May 2004
Location: Southwestern USA
Distribution: CentOS
Posts: 279

Rep: Reputation: 30
Managing multiple USB devices is not something that Slackware does yet. I believe HAL (Hardware Abstraction Layer) is designed to handle this but Hal isn't compiled into Slackware.

Dennisk
 
Old 10-04-2006, 06:56 PM   #4
JohnKFT
Member
 
Registered: Aug 2003
Location: NW Scotland
Distribution: Slackware 10
Posts: 169

Original Poster
Rep: Reputation: 30
Hey sfaz - brilliant, thank you. Not only have I fixed the problem but I understand it. No more "Why isn't my card mounting?" Don't quite know how the problem arose. When I printed the partition table from one of the cards I got this:

Disk /dev/sda: 2059 MB, 2059403264 bytes
64 heads, 62 sectors/track, 1013 cylinders
Units = cylinders of 3968 * 512 = 2031616 bytes

This doesn't look like a partition table
Probably you selected the wrong device.

Device Boot Start End Blocks Id System
/dev/sda1 ? 196103 483782 570754815+ 72 Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(357, 116, 40) logical=(196102, 51, 11)
Partition 1 has different physical/logical endings:
phys=(357, 32, 45) logical=(483781, 40, 51)
Partition 1 does not end on cylinder boundary.
/dev/sda2 ? 42513 530423 968014120 65 Novell Netware 386
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(288, 115, 43) logical=(42512, 30, 47)
Partition 2 has different physical/logical endings:
phys=(367, 114, 50) logical=(530422, 52, 42)
Partition 2 does not end on cylinder boundary.
/dev/sda3 ? 471241 959151 968014096 79 Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(366, 32, 33) logical=(471240, 18, 30)
Partition 3 has different physical/logical endings:
phys=(357, 32, 43) logical=(959150, 39, 39)
Partition 3 does not end on cylinder boundary.
/dev/sda4 ? 1 916640 1818613248 d Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(372, 97, 50) logical=(0, 0, 1)
Partition 4 has different physical/logical endings:
phys=(0, 10, 0) logical=(916639, 47, 30)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

Yikes!! I did o to get a new partition table then followed your instructions. Card now has nice neat single partition and registers on /dev/sda1.

dennisk - I seem to be able to mount multiple devices no problem - just had to run dmesg to find out where they are, then set them in my fstab.

2GB cards still won't register in my Palm pda although apparently changing them from FAT32 to FAT16 should make them do so according to the Palm forums. Any idea off your head if this might be related to the original problem in any way, or should I open a new thread?
 
Old 10-04-2006, 06:59 PM   #5
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274

Rep: Reputation: 63
If you have udev running I'd recommend making some udev rules to manage them. That's what I did for mine to create automatic symlinks for each.
 
Old 10-04-2006, 07:31 PM   #6
Denes
Member
 
Registered: Mar 2004
Distribution: CentOS 4.3/4.5
Posts: 72

Rep: Reputation: 15
I have had issues mounting SD devices in Linux as well. I am running CentOS4.3 but I assume that these issues are in all Linux distro's that use similar versions of software. My problems all seem to go away magically when the HAL daemon is running. If I just turned on my Linux box for example and have the locking tab on the SD card, the SD card will not mount. Once I turn the HAL daemon on this magically is fixed or if I insert media that is not write protected I am okay from that point on. I wonder since your distro doesn't have a HAL daemon if you see this as well. Hmmm.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Stick = no mount & errors fogcat SUSE / openSUSE 1 02-27-2006 04:06 AM
MDK 2005LE & Freecom DVB-T USB Stick slothpuck Linux - Hardware 0 11-23-2005 05:45 PM
Mandriva LE - Memory stick USB 2.0 card reader silverbirch Mandriva 2 04-26-2005 04:46 AM
need help with TWINMOS G240 USB STICK WLAN CARD pyenos Linux - Hardware 3 03-01-2005 02:55 AM
USB card reader and memory stick PROBLEM Zhenya SUSE / openSUSE 18 02-24-2005 10:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration