1. 21 Oct, 2009 1 commit
    • Gerardo Exequiel Pozzi's avatar
      Fix how mkarchiso makes usb image · db1dde54
      Gerardo Exequiel Pozzi authored
      
      
      The current implementation in how partition is created for ext2 img
      it looks a bit bad.
      
      This patch makes the partition in more standarized way, respecting
      cylinder alignement:
      * The size of resulting image will be in cylinder multiple ~8MB.
      * Use fdisk instead of sfdisk (sfdisk write some bad information)
      * Make the result image in one pass, instead of concatenating.
      
      Also the advantage is that with this can add another partitions
      without any issues in the usb-flash-drive with this .img.
      
      For example of current situation:
      
      qemu-system-x86_64 -hda archlinux-avr.toolchain.img -serial stdio
      ---------------------------------------------------------------------
      [root@avr ~]# fdisk /dev/sda
      
      Command (m for help): p
      
      Disk /dev/sda: 223 MB, 223974400 bytes
      59 heads, 41 sectors/track, 180 cylinders
      Units = cylinders of 2419 * 512 = 1238528 bytes
      Disk identifier: 0x00000000
      
         Device Boot      Start         End      Blocks   Id  System
      /dev/sda1   *           1         181      218693+  83  Linux
      Partition 1 has different physical/logical beginnings (non-Linux?):
           phys=(0, 1, 1) logical=(0, 1, 23)
      Partition 1 has different physical/logical endings:
           phys=(27, 58, 41) logical=(180, 49, 21)
      
      Command (m for help): v
      Partition 1 has different physical/logical beginnings (non-Linux?):
           phys=(0, 1, 1) logical=(0, 1, 23)
      Partition 1 has different physical/logical endings:
           phys=(27, 58, 41) logical=(180, 49, 21)
      Partition 1: previous sectors 437449 disagrees with total 67731
      62 unallocated 512-byte sectors
      
      Command (m for help):
      ---------------------------------------------------------------------
      
      qemu-system-x86_64 -hda archlinux-avr.toolchain-fix.img -serial stdio
      ---------------------------------------------------------------------
      [root@avr ~]# fdisk /dev/sda
      
      Command (m for help): p
      
      Disk /dev/sda: 230 MB, 230307840 bytes
      255 heads, 63 sectors/track, 28 cylinders
      Units = cylinders of 16065 * 512 = 8225280 bytes
      Disk identifier: 0x5c94ca4f
      
         Device Boot      Start         End      Blocks   Id  System
      /dev/sda1   *           1          28      224878+  83  Linux
      
      Command (m for help): v
      62 unallocated 512-byte sectors
      ---------------------------------------------------------------------
      
      Signed-off-by: default avatarGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
      db1dde54
  2. 27 Jul, 2009 2 commits
  3. 29 Jun, 2009 1 commit
  4. 27 Jan, 2009 1 commit
  5. 24 Jan, 2009 1 commit
  6. 24 Dec, 2008 2 commits
  7. 23 Dec, 2008 3 commits
  8. 21 Dec, 2008 1 commit
  9. 20 Dec, 2008 3 commits
  10. 19 Dec, 2008 3 commits
  11. 25 Oct, 2008 1 commit
  12. 21 Oct, 2008 4 commits
  13. 20 Oct, 2008 9 commits
  14. 19 Oct, 2008 1 commit
  15. 14 Sep, 2008 2 commits
  16. 07 Sep, 2008 2 commits
  17. 02 Apr, 2008 1 commit
  18. 30 Mar, 2008 2 commits