Menu

Checking size of original sda1 partition?

Help
Gilles
2012-03-03
2013-04-05
  • Gilles

    Gilles - 2012-03-03

    Hello,

    After creating/deleting the source partition on which Windows was installed (sda1 is where it was installed, sda2 is where I keep Clonezilla images), Windows no longer boots: It either crashes with the familiar 0xc0000225 (Windows7) or enters a loop with starts/reboots (XP).

    I assume it's due to sda1 no longer having the exact same size it originally had, and Windows ain't happy.

    Is there a way to get this information from the Clonezilla images I made, so that I can try and see if it solves the issue?

    I'd also be interested in any idea about what can cause those issues after restoring Windows from Clonezilla images.

    Thank you.

     
  • Gilles

    Gilles - 2012-03-08

    Tanks for the info.

    I assume CZ uses parted to generate the two files, but I'm not getting the same output, so can't delete/recreate /dev/sda1 before trying to restore Windows7 from an image and check if that solves the problem:

    root@ubuntu:/mnt/image/Win7-2011-08-31-15-img# cat sda-pt.parted
    Model: ATA WDC WD3200BEVT-2 (scsi)
    Disk /dev/sda: 625142448s
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos

    Number  Start       End         Size       Type     File system  Flags
    1      63s         29302559s   29302497s  primary  ntfs         boot
    2      547013250s  625137344s  78124095s  primary  ext3

    root@ubuntu:/mnt/image/Win7-2011-08-31-15-img# cat sda-pt.sf
    # partition table of /dev/sda
    unit: sectors

    /dev/sda1 : start=       63, size= 29302497, Id= 7, bootable
    /dev/sda2 : start=547013250, size= 78124095, Id=83
    /dev/sda3 : start=        0, size=        0, Id= 0
    /dev/sda4 : start=        0, size=        0, Id= 0

    Here's what it says when I run parted myself:

    root@ubuntu:/mnt/image/Win7-2011-08-31-15-img# parted -s /dev/sda print
    Model: ATA WDC WD3200BEVT-2 (scsi)
    Disk /dev/sda: 320GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos

    Number  Start   End     Size    Type     File system  Flags
    1      32.3kB  20.0GB  20.0GB  primary  ext4         boot
    2      280GB   320GB   40.0GB  primary  ext3

     
  • Steven Shiau

    Steven Shiau - 2012-03-08

    It's because we run:
    parted -s /dev/sda unit s print
    "unit s" is used to output that in sectors.

    Steven.

     
  • Gilles

    Gilles - 2012-03-08

    Thanks Steven. I'll investigate how to recreate /dev/sda1 exactly like it was before, and see if that solves the Windows7 issue I'm having.

     
  • Steven Shiau

    Steven Shiau - 2012-03-09

    No problem!

    Steven.

     
  • Gilles

    Gilles - 2012-03-09

    I was told in the Parted mailing list that if we increase the size of a partition before restoring an image with Clonezilla, we must also use an application like Gparted to also resize the filesystem therein. I didn't know this.

    As Clonezilla is text-based, a GUI-based application like Gparted is no-go: Does someone know of a text-based alternative to Gparted that can take care of resizing an NTFS filesystem after it's been restored by CZ?

     
  • Steven Shiau

    Steven Shiau - 2012-03-09

    Actually ntfsresize is included in Clonezilla live, and if you choose the option "-k1" in expert mode, the option "-r" will be used, and ntfsresize will be run for the restored NTFS partition. No idea why it does not work there.

    Steven.

     
  • Gilles

    Gilles - 2012-03-09

    Option "-r" is indeed checked by default, so I don't why 7 stopped working after I restored the image in a bigger partition than the original.

     
  • Steven Shiau

    Steven Shiau - 2012-03-13

    Three things we have to check:
    1. Is the partition size enlarged?
    2. If "-r" is checked, is ntfsresize run after image is restored?
    3. After booting the restored Win 7, does it run "chkdsk", this is triggered by (2).

    Steven.

     

Log in to post a comment.