Fdisk on PowerPC doesn't support OSF/1 disklabel. When I try to repartition a disk that has such a disklabel, I get: Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Then it tries to build a DOS partition table. Reproducible: Always Steps to Reproduce: 1. Install util-linux 2. Get a disk with an OSF/1 disklabel 3. Try to edit the partition table Alternative: 1. Install util-linux 2. Tell fdisk to use a disk 3. Tell it "b" for BSD disklabel Actual Results: It says there is no OSF disklabel, it tries to make a DOS partition table. If you tell it "b" it complains that there is no *BSD partitions/slices arrangement. Expected Results: Get rid of the "there is no OSF disklabel" message if fdisk can't recognize it. Better, get fdisk to be able to edit OSF disklabels. It seems to be the same package that I installed on my Alpha workstation. Gentoo Base System version 1.4.16 Portage 2.0.51.19 (default-linux/ppc/2005.0, gcc-3.4.3, glibc-2.3.4.20041102-r1, 2.4.30 ppc) ================================================================= System uname: 2.4.30 ppc 740/750 Python: dev-lang/python-2.3.5 [2.3.5 (#1, May 5 2005, 02:36:50)] distcc 2.16 powerpc-unknown-linux-gnu (protocols 1 and 2) (default port 3632) [enabled] dev-lang/python: 2.3.5 sys-apps/sandbox: [Not Present] sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5 sys-devel/binutils: 2.15.90.0.3-r4 sys-devel/libtool: 1.5.16 virtual/os-headers: 2.6.8.1-r4 ACCEPT_KEYWORDS="ppc" AUTOCLEAN="yes" CFLAGS="-O2 -pipe -mcpu=750" CHOST="powerpc-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -fno-strict-aliasing -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distcc distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j6" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="ppc X aalib acl alsa arts berkdb bitmap-fonts cjk crypt cscope cups curl emacs emboss esd fam fortran gdbm gif gnome gnutls gpm gtk gtk2 imagemagick imlib ipv6 jack jpeg kde lesstif libwww mad motif mp3 mpeg ncurses nls ogg oggvorbis opengl pam pdflib perl png python qt readline ruby samba silc spell ssl tcpd tiff truetype truetype-fonts type1-fonts unicode vorbis xinerama xml2 xprint xv zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
if you rebuild util-linux with CFLAGS="-O1 -pipe", does it work ?
(In reply to comment #1) > if you rebuild util-linux with CFLAGS="-O1 -pipe", does it work ? Huh? No, it doesn't. Remember, I'm trying to partition a disk for my Alpha, while using my PowerPC.
util-linux's fdisk isnt very friendly like that ... the code has a lot of macro's to compile in support for diff things based upon the host arch
seems that the fdisk code really only enables OSF handling on alpha systems ... so dont bother trying to access it on anything else for now
Upstream fdisk is broken this way. Use parted for now, I think it supports OSF labels.