Step 1: dd if=/dev/zero of=/tmp/virtual bs=1k count=512 Step 2: mke2fs -q -F -o Linux -b 1024 -g 256 /tmp/virtual 1024 Step 3: resize2fs -p /tmp/virtual 10000 Results of step 3: resize2fs 1.38 (30-Jun-2005) Resizing the filesystem on /tmp/virtual to 10000 (1k) blocks. Begin pass 1 (max = 35) Extending the inode table XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXIllegal block number passed to ext2fs_mark_block_bitmap #9729 for block bitmap for /tmp/virtual Illegal block number passed to ext2fs_mark_block_bitmap #9729 for block bitmap for /tmp/virtual Illegal block number passed to ext2fs_mark_block_bitmap #9729 for block bitmap for /tmp/virtual Illegal block number passed to ext2fs_mark_block_bitmap #9730 for block bitmap for /tmp/virtual Illegal block number passed to ext2fs_mark_block_bitmap #9731 for block bitmap for /tmp/virtual Illegal block number passed to ext2fs_mark_block_bitmap #9732 for block bitmap for /tmp/virtual XX Segmentation fault Expected outcome: No segmentation fault or illegal block warnings. emerge --info Portage 2.1_pre7-r5 (default-linux/alpha/2006.0, gcc-3.4.4, glibc-2.3.5-r3, 2.6.16.1 alpha) ================================================================= System uname: 2.6.16.1 alpha EV56 Gentoo Base System version 1.6.14 ccache version 2.3 [enabled] dev-lang/python: 2.3.5, 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r2 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r4 ACCEPT_KEYWORDS="alpha" AUTOCLEAN="yes" CBUILD="alpha-unknown-linux-gnu" CFLAGS="-mieee -O2 -mcpu=ev56 -pipe" CHOST="alpha-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-mieee -O2 -mcpu=ev56 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks metadata-transfer sandbox sfperms strict test" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="alpha X alsa arts berkdb bitmap-fonts bzip2 cli crypt dri dvd eds encode esd fortran gdbm gif gnome gpm gstreamer gtk2 imlib input_devices_mouse jpeg libg++ libwww mad mikmod motif mp3 mpeg ncurses nptl nptlonly ogg opengl pam pcre pdflib perl png python readline reflection sdl session spell spl ssl tcltk tcpd tiff truetype truetype-fonts type1-fonts udev usb userlocales video_cards_radeon vorbis xml xml2 xmms xorg xv zlib elibc_glibc input_devices_keyboard kernel_linux userland_GNU video_cards_vga" Unset: ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
(In reply to comment #0) > Step 1: dd if=/dev/zero of=/tmp/virtual bs=1k count=512 > Step 2: mke2fs -q -F -o Linux -b 1024 -g 256 /tmp/virtual 1024 You are telling mke2fs that the device it is on is bigger than it actually is. The final arguement in Step 2 is 1024 (ie 1024 blocks) while your file from Step 1 is only 512 blocks (count=512). Changing the last arguement of mke2fs to 512 worked for me.
(In reply to comment #0) > Step 2: mke2fs -q -F -o Linux -b 1024 -g 256 /tmp/virtual 1024 From mke2fs man page: -g blocks-per-group ... There is generally no reason the user to ever set this parameter, as the default is optimal for the filesystem....