Menu

#254 Unable to find target partition "sda4".

testing_clonezilla
closed-fixed
None
5
2016-10-19
2016-07-05
Mircea Dan
No

Finding extended partition(s) in parted table /home/partimag/image6/sda-pt.parted...
Restoring extended boot record (EBR) in extended partition /dev/sda4...
Unable to find target partition "sda4".
Check if the partition sda4 really exists, otherwise maybe the kernel is too old.
ubuntu 16.04 LTS kernel 4.4 i doubt is too old

i have attached the logs from creating and restoring the image + all the small files in the image.

1 Attachments

Related

Bugs: #254

Discussion

  • Steven Shiau

    Steven Shiau - 2016-07-12

    For the files you provide, it looks like /dev/sda4 does not exist on your hard drive:
    8 0 976762584 sda
    8 1 512000 sda1
    8 2 512000 sda2
    8 3 32768000 sda3
    8 5 32768000 sda5
    8 6 32768000 sda6
    8 7 865357824 sda7

    This is weird... From the results of sfdisk, apparently it's created.
    After you see the errors, can you verify that by running:
    cat /proc/partitions
    then post the results.
    Thanks.

    Steven

     
  • Mircea Dan

    Mircea Dan - 2016-07-14

    after clonezila writes the image back sda4 is missing, based on the image i attached, does it even saves it ?

    redone the steps using:
    drbl-2.20.33-drbl1 clonezilla-3.22.8-drbl1 partclone-0.2.89-drbl1 drbl-chntpw-20110511-1drbl mkpxeinitrd-net-2.3.11-drbl1 ipxe-20140910-drbl1 freedos-1.0-19drbl util-linux-2.27.1-6ubuntu3.1 gdisk-1.0.1-1build1

    installed pristine source HDD, and rebooted

    sudo more /proc/partitions
    major minor  #blocks  name
    
       1        0      65536 ram0
       1        1      65536 ram1
       1        2      65536 ram2
       1        3      65536 ram3
       1        4      65536 ram4
       1        5      65536 ram5
       1        6      65536 ram6
       1        7      65536 ram7
       1        8      65536 ram8
       1        9      65536 ram9
       1       10      65536 ram10
       1       11      65536 ram11
       1       12      65536 ram12
       1       13      65536 ram13
       1       14      65536 ram14
       1       15      65536 ram15
       *8        0  976762584 sda
       8        1     512000 sda1
       8        2     512000 sda2
       8        3   32768000 sda3
       8        4          1 sda4
       8        5   32768000 sda5
       8        6   32768000 sda6
       8        7  865357824 sda7*
       8       16   60653568 sdb
       8       17   58061824 sdb1
       8       18          1 sdb2
       8       21    2588672 sdb5
     252        0  861118464 dm-0
     252        1    4194304 dm-1
    

    issued

    /usr/sbin/ocs-sr -q2 -c -j2 -rescue -gm -z1p -i 4096 -fsck-y -p true savedisk image8 sda
    

    issued while clonezilla was creating the image from the sda disk

    sudo more /proc/partitions
    major minor  #blocks  name
    
       1        0      65536 ram0
       1        1      65536 ram1
       1        2      65536 ram2
       1        3      65536 ram3
       1        4      65536 ram4
       1        5      65536 ram5
       1        6      65536 ram6
       1        7      65536 ram7
       1        8      65536 ram8
       1        9      65536 ram9
       1       10      65536 ram10
       1       11      65536 ram11
       1       12      65536 ram12
       1       13      65536 ram13
       1       14      65536 ram14
       1       15      65536 ram15
       *8        0  976762584 sda
       8        1     512000 sda1
       8        2     512000 sda2
       8        3   32768000 sda3
       8        4          1 sda4
       8        5   32768000 sda5
       8        6   32768000 sda6
       8        7  865357824 sda7*
       8       16   60653568 sdb
       8       17   58061824 sdb1
       8       18          1 sdb2
       8       21    2588672 sdb5
     252        0  861118464 dm-0
     252        1    4194304 dm-1
    

    clonezilla finished makeing the image
    it does not mention anything about sda4

    All the images of partition or LV devices in this image were checked and they are restorable: image8
    Summary of image checking:
    ==========================
    Partition table file for disk was found: sda
    MBR file for this disk was found: sda
    The image of this partition is restorable: sda1
    The image of this partition is restorable: sda2
    The image of this partition is restorable: sda3
    Image was saved by dd. No need to check the file system integrity: sda5
    The image of this partition is restorable: sda6
    The image of this partition is restorable: vg_01-lv_home
    All the images of partition or LV devices in this image were checked and they are restorable: image8
    ==========================
    *****************************************************
    *****************************************************
    Checking if udevd rules have to be restored...
    This program is not started by Clonezilla server, so skip notifying it the job is done.
    Finished!
    Now syncing - flush filesystem buffers...
    
    Ending /usr/sbin/ocs-sr at 2016-07-13 18:47:39 PDT...
    

    the sda4 is still there after clonezilla finished creating the image

    sudo more /proc/partitions
    major minor  #blocks  name
    
       1        0      65536 ram0
       1        1      65536 ram1
       1        2      65536 ram2
       1        3      65536 ram3
       1        4      65536 ram4
       1        5      65536 ram5
       1        6      65536 ram6
       1        7      65536 ram7
       1        8      65536 ram8
       1        9      65536 ram9
       1       10      65536 ram10
       1       11      65536 ram11
       1       12      65536 ram12
       1       13      65536 ram13
       1       14      65536 ram14
       1       15      65536 ram15
       *8        0  976762584 sda
       8        1     512000 sda1
       8        2     512000 sda2
       8        3   32768000 sda3
       8        4          1 sda4
       8        5   32768000 sda5
       8        6   32768000 sda6
       8        7  865357824 sda7*
       8       16   60653568 sdb
       8       17   58061824 sdb1
       8       18          1 sdb2
       8       21    2588672 sdb5
     252        0  861118464 dm-0
     252        1    4194304 dm-1
    

    now writing the image back

    /usr/sbin/ocs-sr -g auto -e1 auto -e2 -c -j2 -p true restoredisk image8 sda
    .......................
    
    Unable to find target partition "sda4".
    *****************************************************.
    The disk and partition in this system:
    major minor  #blocks  name
    
       1        0      65536 ram0
       1        1      65536 ram1
       1        2      65536 ram2
       1        3      65536 ram3
       1        4      65536 ram4
       1        5      65536 ram5
       1        6      65536 ram6
       1        7      65536 ram7
       1        8      65536 ram8
       1        9      65536 ram9
       1       10      65536 ram10
       1       11      65536 ram11
       1       12      65536 ram12
       1       13      65536 ram13
       1       14      65536 ram14
       1       15      65536 ram15
       *8        0  976762584 sda
       8        1     512000 sda1
       8        2     512000 sda2
       8        3   32768000 sda3
       8        5   32768000 sda5
       8        6   32768000 sda6
       8        7  865357824 sda7*
       8       16   60653568 sdb
       8       17   58061824 sdb1
       8       18          1 sdb2
       8       21    2588672 sdb5
     252        0  861118464 dm-0
     252        1    4194304 dm-1
    *****************************************************.
    Check if the partition sda4 really exists, otherwise maybe the kernel is too old.
    
    sudo more /proc/partitions
    major minor  #blocks  name
    
       1        0      65536 ram0
       1        1      65536 ram1
       1        2      65536 ram2
       1        3      65536 ram3
       1        4      65536 ram4
       1        5      65536 ram5
       1        6      65536 ram6
       1        7      65536 ram7
       1        8      65536 ram8
       1        9      65536 ram9
       1       10      65536 ram10
       1       11      65536 ram11
       1       12      65536 ram12
       1       13      65536 ram13
       1       14      65536 ram14
       1       15      65536 ram15
      * 8        0  976762584 sda
       8        1     512000 sda1
       8        2     512000 sda2
       8        3   32768000 sda3
       8        5   32768000 sda5
       8        6   32768000 sda6
       8        7  865357824 sda7*
       8       16   60653568 sdb
       8       17   58061824 sdb1
       8       18          1 sdb2
       8       21    2588672 sdb5
     252        0  861118464 dm-0
     252        1    4194304 dm-1
    
     

    Last edit: Mircea Dan 2016-07-14
  • Mircea Dan

    Mircea Dan - 2016-07-21

    any sugestion on what may be wrong, or any other logs that are needed ?

     
  • Steven Shiau

    Steven Shiau - 2016-07-23

    The case is really weird to me. I have no idea why it happens. What's the OS which you are restoring?
    If there is no classified data, and if it's not very huge, maybe share the image to me so that I can try to reproduce the issue here.

    Steven

     
  • Mircea Dan

    Mircea Dan - 2016-07-28

    in the sda4.zip i included all the files except the data files, see picture with the files i included and the files i left out, will it be posible to use some standard junk data files (i assume those shoudl play no role in the partition table)

     
  • Mircea Dan

    Mircea Dan - 2016-08-01

    the OS i try to restore is centos 7

     
  • Steven Shiau

    Steven Shiau - 2016-08-07

    Still I can not find any clues abut why it happens there. No idea what to do next. I wish I can access that machine and check more.

    Steven

     
  • Mircea Dan

    Mircea Dan - 2016-08-09

    so i cannot provide the original image but i did as much as posible to provide something similar, i zeroed the disk

    dd if=/dev/zero of=/dev/sda -seek=0
    

    than created same 7 partitions and the logic volumes

    # aproximate code it may miss a command or two here and there that refreshes the partition tables or a reboot here and there, but the bulk is in here to create same partition structure.
    
    export DISK1="/dev/sda"
    echo -e "n\np\n1\n2048\n1026047\nt\n6\n\nn\np\n2\n1026048\n2050047\nt\n2\n83\n\nn\np\n3\n2050048\n67586047\nt\n3\n83\n\nn\ne\n67586048\n1953525167\n\nn\n67588096\n133124095\nt\n5\n83\n\nn\n133126144\n198662143\nt\n6\n83\n\nn\n198664192\n1953523711\nt\n7\n8e\n\np\nw\n" | fdisk ${DISK1}
    echo -e "a\n2\nw\n" | fdisk ${DISK1}
    
    mkdosfs -F 16 ${DISK1}1
    mkfs.ext4 ${DISK1}2
    mkfs.ext4 -F ${DISK1}3 
    mkfs.ext4 -F ${DISK1}5
    mkfs.ext4 -F ${DISK1}6
    
    reboot
    
    pvcreate ${DISK1}7
    vgcreate vg_02 ${DISK1}7
    lvcreate -n lv_swap -L 4G vg_02
    lvcreate -n lv_home -l 100%FREE vg_02
    lvchange -a y /dev/vg_02/lv_swap
    lvchange -a y /dev/vg_02/lv_home
    
    lvdisplay
    kpartx -av ${DISK1}
    vgscan
    lvscan
    mkswap /dev/vg_02/lv_swap
    mkfs.ext4 -F /dev/vg_02/lv_home
    
    reboot
    

    now i looked to see if i have same disk structure

    lsblk -o TYPE,NAME,KNAME,UUID,MOUNTPOINT,SIZE
    

    and i got same structure exctley like in the above posts

    now i started clonezilla and this is the command that was generated

    /usr/sbin/ocs-sr -q2 -c -j2 -z1p -i 4096 -scs -p choose savedisk 7part2 sda
    

    and you can find attached the full image (a bunch of partitions with no data in them)

    now i deleted all the partitions and cleaned /dev/sda and rebooted (this is how i deleted teh partitions: fdisk /dev/sda d1d2d3d4w)

    and now i tried to restore this image and the problem reproduced
    Unable to find target partition "sda4".

     

    Last edit: Mircea Dan 2016-08-09
  • Mircea Dan

    Mircea Dan - 2016-08-10

    had a breakthrough and i belive is all related to the cleanup.
    i deleted everything, partitions, lvms, zeroed the disk, went all out of wiping everything. (clearley overboard)
    rebooted
    restored the image and it restored properley
    rebooted
    executed same exact command to restore the image and surprise unable to find targeted partition "sda4" error.

    somehow i belive clonezilla does not wipes etc etc properley the hdd before writing it.

    i think this comamnds are doing the job of cleaning up
    export DISK1="/dev/sda"
    sudo vgremove vg_02
    sudo pvremove ${DISK1}7
    sudo dd if=/dev/zero of=${DISK1}7 bs=1M count=1
    sudo kpartx -dv ${DISK1}
    echo -e "d\n1\nd\n2\nd\n3\nd\n4\nw\n" | sudo fdisk ${DISK1}

    i also noticed some of this commands are not blocking or how to say, if you just paste them sometimes the ydon't work, but if you do them 1 by one the OS has enough time to propagate the changes so maybe a timeing issue

    so at this time i have 2 speculations: cleanup issue (wipeing lvm and old partitions from targed disk) or timing issue.

     

    Last edit: Mircea Dan 2016-08-10
  • Steven Shiau

    Steven Shiau - 2016-08-15

    Thanks for this bug report. I have confirmed this issue, and it was fixed in the git repository. Tomorrow we should have another testing release, and this fix will be included.

    Steven

     
  • Mircea Dan

    Mircea Dan - 2016-08-15

    thanks very much, will give it a try once available and report back

     
  • Steven Shiau

    Steven Shiau - 2016-08-16

    Please give testing Clonezilla live 2.4.7-28 a try:
    http://clonezilla.org/downloads.php
    Let us know the results.
    Thanks.

    Steven

     
  • Steven Shiau

    Steven Shiau - 2016-10-07
    • status: open --> closed-fixed
     
    • Mircea Dan

      Mircea Dan - 2016-10-07

      Hi,
      when i create a live usb, i believe this fix is not present.although i use the latest clonezilla/drbl version, did this fix also made it to the iso that is being downloaded and modified when the live usb image is created ?i still see the issue even today when i create a live usb stick from an image.
      Thanks,Mircea Dan

      On Thursday, October 6, 2016 5:14 PM, Steven Shiau <steven_shiau@users.sf.net> wrote:
      
      • status: open --> closed-fixed
      • Comment:
        Fixed in
        https://github.com/stevenshiau/clonezilla/commit/1923d4381302e3fc637e63dbb46e0d293335fd43
        Feel free to reopen this if this issue is still remain.Steven [bugs:#254] Unable to find target partition "sda4".Status: closed-fixed
        Group: testing_clonezilla
        Created: Tue Jul 05, 2016 06:23 PM UTC by Mircea Dan
        Last Updated: Tue Aug 16, 2016 05:58 AM UTC
        Owner: Steven Shiau
        Attachments:
      • sda4.zip (86.5 kB; application/x-zip-compressed)
        Finding extended partition(s) in parted table /home/partimag/image6/sda-pt.parted...
        Restoring extended boot record (EBR) in extended partition /dev/sda4...
        Unable to find target partition "sda4".
        Check if the partition sda4 really exists, otherwise maybe the kernel is too old.
        ubuntu 16.04 LTS kernel 4.4 i doubt is too oldi have attached the logs from creating and restoring the image + all the small files in the image.Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/clonezilla/bugs/254/To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
       

      Related

      Bugs: #254

  • Mircea Dan

    Mircea Dan - 2016-10-19

    the version from 20161010 works perfectley thanks very much for all the fixes and improvments made

     

Log in to post a comment.