You are not logged in.

#1 2011-06-21 12:33:56

agkbill
Member
Registered: 2011-06-13
Posts: 85

[SOLVED] Partition disapear after running fdisk.

When I start my computer with disk connected (firewire) and run fdisk it looks like this.

[root@arch ~]# fdisk -ls

Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders, total 78140160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00077627

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    52537343    26267648   83  Linux
/dev/sda2        77160195    78140159      489982+  83  Linux
/dev/sda3   *    52537344    77160194    12311425+  83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 82.0 GB, 81963515904 bytes
255 heads, 63 sectors/track, 9964 cylinders, total 160084992 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table
[root@arch ~]# 

Then I try to make a partition: fdisk /dev/sdb

[root@arch ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x68cf70a8.
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): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4, default 1): 1
First sector (2048-160084991, default 2048): 
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-160084991, default 160084991): 
Using default value 160084991

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 5: Input/output error.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)

Error closing file
[root@arch ~]#

I run partprobe, but still /dev/sdb is not there

[root@arch ~]# partprobe
Warning: Unable to open /dev/fd0 read-write (Read-only file system).  /dev/fd0 has been opened read-only.
[root@arch ~]# fdisk -ls

Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders, total 78140160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00077627

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    52537343    26267648   83  Linux
/dev/sda2        77160195    78140159      489982+  83  Linux
/dev/sda3   *    52537344    77160194    12311425+  83  Linux

Partition table entries are not in disk order
[root@arch ~]# 

After reboot "fdisk -ls"  give the same result, no /dev/sdb

But if I turn the external disk on/off, I get back to square one.

[root@arch ~]# fdisk -ls

Disk /dev/sda: 40.0 GB, 40007761920 bytes
255 heads, 63 sectors/track, 4864 cylinders, total 78140160 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00077627

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    52537343    26267648   83  Linux
/dev/sda2        77160195    78140159      489982+  83  Linux
/dev/sda3   *    52537344    77160194    12311425+  83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 82.0 GB, 81963515904 bytes
255 heads, 63 sectors/track, 9964 cylinders, total 160084992 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/sdb doesn't contain a valid partition table
[root@arch ~]# 

Any idea what is going on here?

All input most appreciated,

Best regards,
/Christer

Last edited by agkbill (2011-06-21 18:05:23)

Offline

#2 2011-06-21 13:34:07

ChoK
Member
From: France
Registered: 2008-10-01
Posts: 346

Re: [SOLVED] Partition disapear after running fdisk.

partprobe
Warning: Unable to open /dev/fd0 read-write (Read-only file system).  /dev/fd0 has been opened read-only.

Shouldn't you partprobe /dev/sdb ?

Also there is an I/O error on sdb when fdisk tries to reload the partition table. Did this disk work before/with another PC ? Can it be connected over USB, maybe firewire is the source of the problems.


Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry

Offline

#3 2011-06-21 18:04:56

agkbill
Member
Registered: 2011-06-13
Posts: 85

Re: [SOLVED] Partition disapear after running fdisk.

Thank you ChoK,

The problem was the firewire. The External HD-drive also have USB and connecting that one it worked perfect.

So, something is wrong with the firewire.

All the best,

/Christer

Offline

Board footer

Powered by FluxBB