Disk /dev/loop0: 2147 MB, 2147483648 bytes 255 heads, 63 sectors/track, 261 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x567b812e Device Boot Start End Blocks Id System /dev/loop0p1 1 261 2096451 83 Linux Command (m for help): The partition table has been altered! Calling ioctl() to re-read partition table. WARNING: Re-reading the partition table failed with error 22: Invalid argument. The kernel still uses the old table. The new table will be used at the next reboot. Syncing disks. # refresh the view of the disk by disconnecting and reconnecting it losetup -d /dev/loop0 && losetup /dev/loop0 linux-2.6.25.img # find out which sector the partition begins at and how large it is fdisk -ul /dev/loop0 Disk /dev/loop0: 2147 MB, 2147483648 bytes 255 heads, 63 sectors/track, 261 cylinders, total 4194304 sectors Units = sectors of 1 * 512 = 512 bytes Disk identifier: 0x567b812e Device Boot Start End Blocks Id System /dev/loop0p1 63 4192964 2096451 83 Linux # Start is sector 63 so, in bytes, the partition starts at: 512 bytes-per-sector x 63 sectors = 32256 bytes # create a device for the partition starting at offset 32,256 bytes, so it can be formatted losetup -o 32256 /dev/loop1 linux-2.6.25.img # fdisk will have reserved some free space at the end of the 'drive' but mkfs.ext won't # be aware of it. Therefore, specifically set the file-system size to match the partition size. # In the fdisk report above it shows the number of 1024-byte blocks used by the partition: 2096451 # That is used, with some added calculation, to correct the file-system: mkfs.ext3 -b 4096 /dev/loop1 $(fdisk -lu /dev/loop0 | awk '$1 ~ /^\/dev\/loop0p1.*/ {print ($4 * 1024/4096)-1;}') e2fsck -f /dev/loop1 # At this point the file-system should be consistent with the partition table /boot/grub/grub.conf : default=0 timeout=5 #splashimage=(hd0,0)/boot/grub/splash.xpm.gz #hiddenmenu title Fedora (2.6.35.11-83.fc14.i686.PAE) root (hd0,0) kernel /boot/vmlinuz-2.6.35.11-83.fc14.i686.PAE ro root=/dev/xvda1 console=/dev/hvc0 rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM KEYTABLE=us nomodeset rhgb quiet initrd /boot/initramfs-2.6.35.11-83.fc14.i686.PAE.img /etc/fstab: /dev/xvda1 / ext3 defaults,noatime 1 1 /pagefile.sys swap swap defaults 0 0 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 !!!! Add /dev/hvc0 to /etc/securetty !!!!! !!!! Replace tty[1-7] with hvc0 in /etc/sysconfig/init !!!!!