LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 07-23-2005, 12:23 PM   #1
guldo
Member
 
Registered: Aug 2003
Location: Morio Cho
Distribution: debian sid
Posts: 124

Rep: Reputation: 15
usb key partition table


Hello.
I've been trying to make a usb key work with both windows xp and windows 98.
I couldn't. The key does not work.

So, eventually, I tried to rebuild its partition, using my Linux pc.
I first ran:
badblocks -vw /dev/sda
that finished successfully after some time.
Then I tried to run cfdisk, but:
Quote:
FATAL ERROR: Cannot get disk size
I tried parted, too:
Quote:
Error: Unable to open /dev/sda - unrecognized disk label.
I also tried to wipe it all out:
dd if=/dev/zero of=/dev/sda bs=1K count=1
but it didn't work; I mean, dd executed successfully, but the partition trouble is still there.

What's wrong?!?

Thanks.
 
Old 07-24-2005, 06:19 AM   #2
nixcraft
Member
 
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
try fdisk /dev/sda
 
Old 07-24-2005, 09:47 AM   #3
guldo
Member
 
Registered: Aug 2003
Location: Morio Cho
Distribution: debian sid
Posts: 124

Original Poster
Rep: Reputation: 15
Code:
# fdisk  /dev/sda
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

You must set cylinders.
You can do this from the extra functions menu.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): p

Disk /dev/sda: 0 MB, 0 bytes
255 heads, 63 sectors/track, 0 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

Command (m for help): n
You must set cylinders.
You can do this from the extra functions menu.

Command (m for help): q
What should I do next?

Thanks
 
Old 07-24-2005, 12:59 PM   #4
nixcraft
Member
 
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
Type x > Type m - to read help it will show you menu to setup the cylinders
 
Old 07-24-2005, 02:24 PM   #5
guldo
Member
 
Registered: Aug 2003
Location: Morio Cho
Distribution: debian sid
Posts: 124

Original Poster
Rep: Reputation: 15
Thank you for your reply, but my problem is: how should I guess the number of cylinders? I don't even know what a cylinder is...
 
Old 07-24-2005, 03:10 PM   #6
jimdaworm
Member
 
Registered: Aug 2003
Location: Spain
Distribution: Ubuntu
Posts: 888

Rep: Reputation: 30
have you tried the key in another machine just to rule out that there is a hardware fault?
 
Old 07-24-2005, 03:42 PM   #7
guldo
Member
 
Registered: Aug 2003
Location: Morio Cho
Distribution: debian sid
Posts: 124

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by jimdaworm
have you tried the key in another machine just to rule out that there is a hardware fault?
Yes, thanks.

Anyway, looking at cfdisk on a working disk:
Code:
Disk /dev/hde: 120.0 GB, 120034123776 bytes
16 heads, 63 sectors/track, 232581 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
So I see that 516096 bytes * 232581 cylinders = 120034123776 bytes
My usb key has a capacity of 256MB, that *should* be 268435456 bytes; so it's
512 * x * y = 268435456
like: 512 * 1008 * 232581 = 120034123776
am I right?
How could I know x (or y) ?

Thanks

Last edited by guldo; 07-24-2005 at 03:45 PM.
 
Old 07-26-2005, 02:28 AM   #8
guldo
Member
 
Registered: Aug 2003
Location: Morio Cho
Distribution: debian sid
Posts: 124

Original Poster
Rep: Reputation: 15
 
  


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux, usb-storage... how to mount them and see their partition table Saradas Programming 5 11-12-2008 08:09 AM
Trouble reading usb key partition table BNI Linux From Scratch 1 11-02-2005 10:13 AM
Issues reading usb key partition table BNI Linux - Hardware 2 11-02-2005 08:23 AM
Changing ownership of partition and USB key a thing Linux - Newbie 7 01-27-2005 05:37 PM
mounting second partition of USB RAM key Armgas Linux - Hardware 0 05-17-2003 01:10 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration