Summary: | sys-fs/e2fsprogs-1.42: mkfs.ext* corrupts main gpt header on usb stick | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Justin C <charetjc> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED WORKSFORME | ||
Severity: | critical | CC: | gokturk |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
URL: | http://forums.gentoo.org/viewtopic-t-929452-highlight-.html | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
001-sdc-new-gpt.hex
002-sdc-new-ext2.hex 003-sdc-fix-gpt.hex 005-sdc1-fix-gpt.hex |
Description
Justin C
2012-07-09 07:37:21 UTC
Portage 2.1.10.49 (default/linux/x86/10.0/desktop, gcc-4.5.3, glibc-2.14.1-r3, 3.2.12-gentoo i686) ================================================================= System uname: Linux-3.2.12-gentoo-i686-AMD_Athlon-tm-_64_Processor_3500+-with-gentoo-2.1 Timestamp of tree: Tue, 03 Jul 2012 23:00:01 +0000 app-shells/bash: 4.2_p20 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.4.6, 2.5.4-r3, 2.6.8, 2.7.3-r1, 3.1.3-r1, 3.2.3 dev-util/cmake: 2.8.7-r5 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.1-r1 sys-apps/openrc: 0.9.8.4 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.4_p6::<unknown repository>, 1.5, 1.6.3::<unknown repository>, 1.7.9-r1, 1.8.5-r3::<unknown repository>, 1.9.6-r3, 1.10.3, 1.11.1 sys-devel/binutils: 2.21.1-r1 sys-devel/gcc: 4.4.5, 4.5.3-r2 sys-devel/gcc-config: 1.5-r2 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r1 sys-kernel/linux-headers: 3.1 (virtual/os-headers) sys-libs/glibc: 2.14.1-r3 Repositories: gentoo seden x-portage ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="* -@EULA" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=k8 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -march=k8 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -march=i686 -pipe" FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -march=i686 -pipe" GENTOO_MIRRORS="ftp://gentoo.netnitco.net/pub/mirrors/gentoo/source/ http://gentoo.cites.uiuc.edu/pub/gentoo/ http://gentoo.netnitco.net http://chi-10g-1-mirror.fastsoft.net/pub/linux/gentoo/gentoo-distfiles/" LC_ALL="en_US.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/seden /usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="3dnow 3dnowext X a52 aac accessibility acl acpi alsa avahi bash-completion beagle berkdb bluetooth branding bzip2 cairo cdda cdr cli consolekit cracklib crypt cups cxx dbus dnd dri dts dvd dvdr emboss encode exif fam fbcon firefox flac fortran gdbm gif glitz gpm gtk gtk3 inkjar ipv6 jpeg lcms ldap libnotify lua mad mmx mmxext mng modules mozilla mp3 mp4 mpeg mudflap ncurses nls nptl nsplugin ogg openal opengl openmp pam pango pcre pdf png policykit ppds pppd qt4 readline samba sdl session spell sse sse2 ssl startup-notification svg tcpd theora threads tiff truetype udev udisks unicode upower usb vdpau vorbis wifi wxwidgets x264 x86 xcb xine xml xorg xulrunner xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="access auth auth_dbm auth_anon auth_digest authz_host alias file-cache echo charset-lite cache disk-cache mem-cache ext-filter case_filter case-filter-in filter deflate mime-magic cern-meta expires headers usertrack unique_id proxy proxy-connect proxy-ftp proxy-http info include cgi cgid dav dav-fs vhost-alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions userdir so" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="keyboard mouse evdev joystick wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" PHP_TARGETS="php5-3" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby18 ruby19" USERLAND="GNU" VIDEO_CARDS="dummy nvidia vesa" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LINGUAS, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON Created attachment 317662 [details]
001-sdc-new-gpt.hex
hexdump of usbstick after creating the partition table with gdisk.
Created attachment 317664 [details]
002-sdc-new-ext2.hex
hexdump after creating the ext2 filesystem on the first/only partition with mkfs.ext2.
Correction to #7 in description investigation: 7. diffing the two hex files reveals that: a. the partition modified bytes 0x200-443, and b. the filesystem cleared bytes 0x200-*443*. Further analysis shows that /dev/sdc1 overlaps part of the guid partition table. I used gdisk to restore the main header from the backup header. I then performed a hexdump of /dev/sdc and /dev/sdc1 using: # dd if=/dev/sdc | hexdump > 003-sdc-fix-gpt.hex # dd if=/dev/sdc1 | hexdump > 005-sdc1-fix-gpt.hex Attachments to follow. Shouldn't the partition table be excluded from /dev/sd1? Created attachment 317670 [details]
003-sdc-fix-gpt.hex
Created attachment 317672 [details]
005-sdc1-fix-gpt.hex
Does your kernel have GUID support enabled? Regardless of the userspace program you are using, it's the kernel that looks at the partition table and creates device nodes. Just wanted to double check. @gokturk you nailed it. originally I checked my /usr/src/linux/.config where the option is enabled. since you asked, I also checked /proc/config.gz where the option is missing. I don't know why those two configs are out of sync, but building a new kernel to test and close this bug. Thanks for asking the obvious question :p (In reply to comment #9) > @gokturk > you nailed it. originally I checked my /usr/src/linux/.config where the > option is enabled. since you asked, I also checked /proc/config.gz where > the option is missing. > > I don't know why those two configs are out of sync, but building a new > kernel to test and close this bug. > > Thanks for asking the obvious question :p I was about to say sorry for asking the obvious, good timing :) I also tried to reproduce your problem with no success. Can you recompile it with CONFIG_EFI_PARTITION enabled and confirm that it works? Just finished the recompile. It works when the kernel is compiled with the CONFIG_EFI_PARTITION. Do you mind closing this bug? I don't see a "Resolved:User Headspace" option, so not sure which is the preferred status. Thanks again :) Marking as resolved per comment 9. |