Linux 14.982 Themen, 106.363 Beiträge

Partitionstabelle zerschossen

Kuehlwalda / 4 Antworten / Flachansicht Nickles

Partitionstabelle des 1GB Memorysticks zerschossen. Sieht so aus:

In der /var/log/messages steht:
Jan 16 11:46:29 Wallace kernel: sda: sda1
Jan 16 11:46:29 Wallace kernel: sd 0:0:0:0: Attached scsi removable disk sda
Jan 16 11:46:29 Wallace kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0
Jan 16 11:49:20 Wallace kernel: FAT: bogus number of reserved sectors
Jan 16 11:49:20 Wallace kernel: VFS: Can't find a valid FAT filesystem on dev sda1.
Jan 16 11:49:20 Wallace kernel: hfs: can't find a HFS filesystem on dev sda1.
Jan 16 11:49:20 Wallace kernel: VFS: Can't find a Minix or Minix V2 filesystem on device sda1.
Jan 16 11:49:20 Wallace kernel: ReiserFS: sda1: warning: sh-2021: reiserfs_fill_super: can not find reiserfs on sda1
Jan 16 11:49:20 Wallace kernel: VFS: Can't find an ext2 filesystem on dev sda1.
Jan 16 11:49:20 Wallace kernel: Unable to identify CD-ROM format.
Jan 16 11:49:20 Wallace kernel: VFS: Can't find ext3 filesystem on dev sda1.
Jan 16 11:52:43 Wallace kernel: FAT: bogus number of reserved sectors
Jan 16 11:52:43 Wallace kernel: VFS: Can't find a valid FAT filesystem on dev sda1.


Ich habe mit cfdisk die (einzig bestehende) Partition gelöscht, den Stick abgezogen und wieder neu eingesteckt. Dann wieder eine neue einzige Partition angelegt und als Typ FAT16 (=06) angelegt. Erneut lässt sich der Stick nicht mounten. Das ganze habe ich auch mit dem normalen fdisk probiert. Gleiches Ergebnis.


Ein "fdisk -l /dev/sda1" meldet:

Disk /dev/sda1: 1011 MB, 1011677184 bytes
255 heads, 63 sectors/track, 122 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sda1 doesn't contain a valid partition table


Mit "mkfs -v -c /dev/sda1" werden die Blocks auf Funktionsfaehigkeit hin ueberprueft, scheinbar sind die alle in Ordnung.

mkfs -v -c /dev/sda1
mke2fs 1.38 (30-Jun-2005)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
125184 inodes, 250224 blocks
12511 blocks (5.00%) reserved for the super user
First data block=0
8 block groups
32768 blocks per group, 32768 fragments per group
15648 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376

Running command: badblocks -b 4096 -s /dev/sda1 250224
Checking for bad blocks (read-only test): done 224
Writing inode tables: done
Writing superblocks and filesystem accounting information: done


Danach kann man den Stick wieder mounten, aber die Kapazität sinkt mit jedem Versuch das Ganze wieder hinzubekommen jedesmal ein Stückchen mehr.

Ein "df -h" bringt derzeit:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 963M 20K 914M 1% /mnt

Das waren ursprünglich mal 976MB und beim vorletzten Versuch waren noch 949MB frei. Ich will das jetzt nicht nochmal machen um nicht noch mehr Platz zu verlieren. Aber davon mal abgesehen, steht
ja oben noch immer dass die Partitionstabelle hinüber ist.

Hat jemand einen Rat wie man dem Stick wieder die volle Kapazität abverlangen und ihm eine einzige FAT16 Partition verschaffen kann?

Danke

Kuehlwalda

Yesterday is history, tomorrow is a mistery, today is a gift - that's why it's called the present.
bei Antwort benachrichtigen
Kuehlwalda KarstenW „Ist denn /dev/sda1 die richtige Gerätedatei für diesen USB Stick , oder ist...“
Optionen

Hallo Karsten,

Danke für deine Antwort. Wie du vielleicht noch aus der Vergangenheit weisst schätze ich deine Antworten hier sehr und ich habe mir wieder insgeheim gewuenscht, dass du etwas schreibst.

Ich habe keinerlei sata-Platten, nur IDEs eingebaut. Ich habe auch keine externe HDD und sonst keine USB-Gerät angeschlossen. Wenn ich den Memorystick von 1 GB einstecke, dann bekomme ich den neuen Eintrag "/dev/sda1 on /media/usbdisk-1 type ext2 (rw,nosuid,nodev,sync)" unter dem Befehl "mount" zu sehen.

Wenn ich dann "fdisk /dev/sda" als root in der Konsole starte, wie du es empfiehlst, sieht die Ausgabe so aus:


Wallace:~ # fdisk /dev/sda

Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help): p

Disk /dev/sda: 1024 MB, 1024966656 bytes
32 heads, 62 sectors/track, 1009 cylinders
Units = cylinders of 1984 * 512 = 1015808 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1009 1000897 83 Linux

Command (m for help):

"System" ist deshalb "Linux" weil ich erst mal wieder die volle Kapazität haben möchte, bevor ich ihn wieder als FAT formatiere.


Jetzt habe ich mir nochmal mit "df -h" die Kapazität von "/dev/sda" und "/dev/sda1" angesehen und schau mal was da herauskommt:

Wallace:~ # df -h /dev/sda
Filesystem Size Used Avail Use% Mounted on
udev 507M 176K 506M 1% /dev
Wallace:~ # df -h /dev/sda1
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 963M 20K 914M 1% /media/usbdisk-1
Wallace:~ #


Warum werden unter "/dev/sda" nur 507MB (Size) angezeigt ?


Ich habe mal ein "fdisk /dev/sda1" ausprobiert und erhalte folgende Ausgabe:

Wallace:~ # fdisk /dev/sda1
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.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help):


Ich verstehe die "Warning" nicht, weil der 1GB Stick doch nur EINE Partition enthält, woher dann 4 Partitionstabellen?

Jetzt formatiere ich das Ding mal unter Windoof !

So, dort hat das Ding jetzt wieder 977MB. Ich habe es mit FAT formatiert und unter meinem SuSE 10.1 sieht die /var/log/messages jetzt so aus:

Jan 17 06:57:02 Wallace kernel: sda: Mode Sense: 03 00 00 00
Jan 17 06:57:02 Wallace kernel: sda: assuming drive cache: write through
Jan 17 06:57:02 Wallace kernel: SCSI device sda: 2001888 512-byte hdwr sectors (1025 MB)
Jan 17 06:57:02 Wallace kernel: sda: Write Protect is off
Jan 17 06:57:02 Wallace kernel: sda: Mode Sense: 03 00 00 00
Jan 17 06:57:02 Wallace kernel: sda: assuming drive cache: write through
Jan 17 06:57:02 Wallace kernel: sda: sda1
Jan 17 06:57:02 Wallace kernel: sd 1:0:0:0: Attached scsi removable disk sda
Jan 17 06:57:02 Wallace kernel: sd 1:0:0:0: Attached scsi generic sg0 type 0
Jan 17 06:57:02 Wallace kernel: usb-storage: device scan complete

Mehr wird beim Einstecken des Sticks nicht mehr ausgegeben.


Hier mein jetziges "df -h" auf /dev/sda1 und /dev/sda:

Wallace:~ # df -h /dev/sda1
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 978M 0 978M 0% /media/VOLUME
Wallace:~ # df -h /dev/sda
Filesystem Size Used Avail Use% Mounted on
udev 507M 176K 506M 1% /dev
Wallace:~ #

Und noch mein jetziges "fdisk -l /dev/sda" und "fdisk -l /dev/sda1", wobei es ja bei /dev/sda1 jetzt heißt "This doesn't look like a partition table. Probably you selected the wrong device", was deine Aussage bestätigt, das es unter /dev/sda1 keine Partitionstabelle gibt. (Im Gegensatz zu vorher, s. oben, wo es hieß: "Disk /dev/sda1 doesn't contain a valid partition table". Gerade dies lies ja vermuten, dass es dort eine geben könnte).

Wallace:~ # fdisk -l /dev/sda

Disk /dev/sda: 1024 MB, 1024966656 bytes
32 heads, 62 sectors/track, 1009 cylinders
Units = cylinders of 1984 * 512 = 1015808 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1009 1000897 6 FAT16
Wallace:~ # fdisk -l /dev/sda1

Disk /dev/sda1: 1024 MB, 1024918528 bytes
32 heads, 62 sectors/track, 1008 cylinders
Units = cylinders of 1984 * 512 = 1015808 bytes

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

Device Boot Start End Blocks Id System
/dev/sda1p1 ? 891224 1748689 850605874+ 6e Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(357, 114, 46) logical=(891223, 12, 38)
Partition 1 has different physical/logical endings:
phys=(10, 255, 13) logical=(1748688, 31, 48)
Partition 1 does not end on cylinder boundary.
/dev/sda1p2 ? 984740 1479050 490354992+ ff BBT
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(370, 108, 37) logical=(984739, 25, 24)
Partition 2 has different physical/logical endings:
phys=(78, 13, 10) logical=(1479049, 8, 22)
Partition 2 does not end on cylinder boundary.
/dev/sda1p3 ? 908107 993113 84326194+ 74 Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(371, 84, 33) logical=(908106, 16, 19)
Partition 3 has different physical/logical endings:
phys=(100, 101, 32) logical=(993112, 24, 7)
Partition 3 does not end on cylinder boundary.
/dev/sda1p4 1 1790767 1776440832 0 Empty
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(0, 0, 0) logical=(0, 0, 1)
Partition 4 has different physical/logical endings:
phys=(0, 0, 0) logical=(1790766, 30, 60)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order
Wallace:~ #

Nun bin ich insofern zufrieden, dass ich jetzt sogar 978MB habe, also sogar noch 2 mehr als ursprünglich. Kannst du aber etwas mit dieser langen Ausgabe anfangen? Was kann man daraus schließen ? - Ist das vielleicht eine Erklärung für weitere fehlende MB ? Und falls ja, wie bekommt man die wieder aus der Versenkung ?

Schon jetzt danke für deine Antwort, wie immer sie auch ausfallen mag.

Grüße

Kuehlwalda

P.S.: Bitte stör dich nicht an der komischen Uhrzeit. Ich muss mal die Batterie im PC tauschen, denn jedesmal wenn ich ihn ausschalte ist danach die Uhr verstellt.


Yesterday is history, tomorrow is a mistery, today is a gift - that's why it's called the present.
bei Antwort benachrichtigen