Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sfdisk -l no worky [SOLVED - ALMOST]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
todw1fd
Tux's lil' helper
Tux's lil' helper


Joined: 21 Mar 2003
Posts: 93

PostPosted: Thu May 19, 2005 1:59 pm    Post subject: sfdisk -l no worky [SOLVED - ALMOST] Reply with quote

was trying to dump my partition tables using sfdisk -d /dev/sdX sdX.out and got an error:
Code:

sniffer root # sfdisk -d /dev/sda sda.out

sfdisk: seek error: wanted 0x0000000000000000, got 0x0000000000000000
 /dev/sda: unrecognized partition table type
No partitions found


So tried to list partitions using sfdisk -l and got this collection of errors:
Code:
login as: root
Password:
Last login: Thu May 19 09:45:43 2005 from is-02.cherrydale.local
sniffer root # sfdisk -l

Disk /dev/hda: 79408 cylinders, 16 heads, 63 sectors/track

sfdisk: seek error: wanted 0x0000000000000000, got 0x0000000000000000
 /dev/hda: unrecognized partition table type
No partitions found

Disk /dev/sda: 17849 cylinders, 255 heads, 63 sectors/track

sfdisk: seek error: wanted 0x0000000000000000, got 0x0000000000000000
 /dev/sda: unrecognized partition table type
No partitions found

Disk /dev/sdb: 2213 cylinders, 255 heads, 63 sectors/track

sfdisk: seek error: wanted 0x0000000000000000, got 0x0000000000000000
 /dev/sdb: unrecognized partition table type
No partitions found
sniffer root #



fdisk and cfdisk work fine :
Code:

sniffer root # cfdisk -P s
Partition Table for /dev/hda

               First       Last
 # Type       Sector      Sector   Offset    Length   Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
   Pri/Log           0       16064      0#      16065 Free Space           None
 2 Primary       16065    80035829      0    80019765 W95 Ext'd (LBA) (0F) None
 5 Logical       16065    80035829     63    80019765 W95 FAT32 (0B)       None
sniffer root # cfdisk -P s /dev/sda
Partition Table for /dev/sda

               First       Last
 # Type       Sector      Sector   Offset    Length   Filesystem Type (ID) Flag
-- ------- ----------- ----------- ------ ----------- -------------------- ----
 1 Primary           0      417689     63      417690 Linux (83)           Boot
 2 Primary      417690    75939254      0    75521565 Extended (05)        None
 5 Logical      417690     2522204     63     2104515 Linux swap / So (82) None
 6 Logical     2522205    65448809     63    62926605 Linux (83)           None
 7 Logical    65448810    75939254     63    10490445 Linux (83)           None
   Pri/Log    75939255   286744184      0   210804930 Free Space           None
sniffer root # fdisk -l

Disk /dev/hda: 40.9 GB, 40982151168 bytes
255 heads, 63 sectors/track, 4982 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda2               2        4982    40009882+   f  W95 Ext'd (LBA)
/dev/hda5               2        4982    40009851    b  W95 FAT32

Disk /dev/sda: 146.8 GB, 146815733760 bytes
255 heads, 63 sectors/track, 17849 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes


   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          26      208813+  83  Linux
/dev/sda2              27        4727    37760782+   5  Extended
/dev/sda5              27         157     1052226   82  Linux swap / Solaris
/dev/sda6             158        4074    31463271   83  Linux
/dev/sda7            4075        4727     5245191   83  Linux

Disk /dev/sdb: 18.2 GB, 18210036736 bytes
255 heads, 63 sectors/track, 2213 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb2   *           2        2213    17767890    5  Extended
/dev/sdb5               2        2213    17767858+  83  Linux
sniffer root #


Anyone else having the same problem? Was using sys-apps/util-linux-2.12i-r1. Upgraded the package to 2.12p and 2.12q with same errors present. sfdisk -g works fine

Code:
sniffer util-linux # sfdisk -g
/dev/hda: 79408 cylinders, 16 heads, 63 sectors/track
/dev/sda: 17849 cylinders, 255 heads, 63 sectors/track
/dev/sdb: 2213 cylinders, 255 heads, 63 sectors/track
sniffer util-linux #


Last edited by todw1fd on Sat May 21, 2005 2:30 am; edited 1 time in total
Back to top
View user's profile Send private message
todw1fd
Tux's lil' helper
Tux's lil' helper


Joined: 21 Mar 2003
Posts: 93

PostPosted: Fri May 20, 2005 1:31 pm    Post subject: Reply with quote

AFter some searching, appears to be related to gcc 3.4. Should affect all Jackass project users.

Quote:
Submitted By: Jeremy Utley (jeremy@linuxfromscratch.org)
Date: 2004-09-13
Initial Package Version: 2.12b
Upstream Status: Not submitted - fixes GCC miscompilation
Origin: Created from troubleshooting on IRC
Description: When using GCC 3.4.{1,2}, the sfdisk program is miscompiled,
causing a seek error to be output. Troubleshooting narrowed the problem down
to the fact that Util-Linux by default uses the -O2 optimization level,
which includes the unit-at-a-time optimization, exposing this problem. This
patch passes -fno-unit-at-a-time to the sfdisk, fdisk, and cfdisk programs,
resolving this error. Developed by Matthew Burgess, Ronald Hummelink, and
Jeremy Utley.


diff -Naur util-linux-2.12b/fdisk/Makefile util-linux-2.12b-new/fdisk/Makefile
--- util-linux-2.12b/fdisk/Makefile 2002-11-24 17:33:58.000000000 +0000
+++ util-linux-2.12b-new/fdisk/Makefile 2004-09-14 00:45:31.303286087 +0000
@@ -6,6 +6,8 @@
include ../make_include
include ../MCONFIG

+CFLAGS:=$(CFLAGS) -fno-unit-at-a-time
+
MAN8=
SBIN=
CFDISK=cfdisk


Any chance of fixing this in the util-linux packages?
Back to top
View user's profile Send private message
Bob P
Advocate
Advocate


Joined: 20 Oct 2004
Posts: 3355
Location: Jackass! Development Labs

PostPosted: Fri May 20, 2005 3:05 pm    Post subject: Reply with quote

can you provide a link to your bug report in bugzilla?
_________________
.
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
Back to top
View user's profile Send private message
todw1fd
Tux's lil' helper
Tux's lil' helper


Joined: 21 Mar 2003
Posts: 93

PostPosted: Sat May 21, 2005 2:18 am    Post subject: Reply with quote

Here's the link to the Bugzilla post

https://bugs.gentoo.org/show_bug.cgi?id=79454

Short version...

After many recompiles to test. It's the -O3 optimization that seems to cause the problem with sfdisk mentioned above. Backing off to -O2 with all other Jackass optimizations solves the problem. Sorry, don't know how to get that into the ebuild for just sfdisk as the rest of the util-linux package doesn't seem to care. This bug affects util-linux 2.12i 2.12p and 2.12q the same way.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum