Results 1 to 4 of 4

Thread: Restoring dd image issues

  1. #1
    Junior Member
    Join Date
    Aug 2006
    Location
    Colorado
    Posts
    3

    Restoring dd image issues

    Hello,
    First I would like to thank you all for the great wealth of information that I have found here and used in my use of NIX servers.

    I have a server which I created an image of by using the following commands:
    1.
    Code:
    dd if=/dev/zero of=/tmp/zero bs=64k
    zero out free space
    2.
    Code:
    dd if=/dev/zero of=/home/zero bs=64k
    because /home is largest partition on server wanted to make sure I compressed well there as well.
    3.
    Code:
    dd if=/dev/sda bs64k | gzip -9 >/remotemnt/testimage/test1.img.gz
    Create the image compressed.
    The size of the image compressed is 606250630 Aug 28 17:48 test1.img.gz Fairly large since the drives are 250GB

    So not to endure network slowness by restoring the image via network I have copied the compressed image to a CD as well as a USB Flashdrive.
    I am attempting to use the FlashDrive to restore the image.

    ---------------------------------
    now for the restore process.

    1. Boot knoppix Live cd with bot option knoppix 2 text mode only

    2. I make sure that the disk is not being used for anything including swap
    Code:
    swapon -s
    Code:
    swapoff /dev/sdaX
    Code:
    umount /dev/sdaX
    3.
    Code:
    mkdir /mnt/usb
    4.
    Code:
    mount /dev/sdbX /mnt/usb
    Mounts USB so I can read it to sbdX ususally /dev/sbd1 if I boot initially and then plug usb in.

    5.
    Code:
    gzip -d /mnt/usb/test1.img.gz |dd of=/dev/sda bs=64k
    This is failing due to not enough space on device.
    I am thinking this is because gzip wants to uncompress the image on the usb device which only has 1 GB of space of which is already more then 58% used due to the image file being compressed there.

    Is there a way I can uncompress the image and not have it write it to the usb device or the disk where it is going to be restored to ?
    possibly a loop device ?
    If so can you please show me how ?
    Thank you very much as I am a Noob to SysAdmin responsibilities

  2. #2
    Junior Member
    Join Date
    Aug 2006
    Location
    Colorado
    Posts
    3
    After further review I am trying to run the following which I believe is working
    Code:
    zcat /mnt/usb/test1.img.gz >/dev/sda
    I will update this thread once I complete my test to let you know if it all works smooth.

  3. #3
    Junior Member
    Join Date
    Aug 2006
    Location
    Colorado
    Posts
    3
    this process worked great. Now I just have to duplicate the process and make sure I can use the knoppix Live CD to mount a network drive (which I am sure it will be able to do)

  4. #4
    Senior Member registered user
    Join Date
    Sep 2005
    Posts
    205

    Re: Restoring dd image issues

    Quote Originally Posted by RobertCo
    5.
    Code:
    gzip -d /mnt/usb/test1.img.gz |dd of=/dev/sda bs=64k
    This is failing due to not enough space on device.
    I am thinking this is because gzip wants to uncompress the image on the usb device which only has 1 GB of space of which is already more then 58% used due to the image file being compressed there.
    You should use -c switch for gzip which will write the output to stdout, i.e.
    Code:
    gzip -cd /mnt/usb/test1.img.gz |dd of=/dev/sda bs=64k

Similar Threads

  1. restoring knoppix 5.0 configuration
    By knophack in forum General Support
    Replies: 1
    Last Post: 08-18-2008, 01:17 PM
  2. Restoring Knoppix Partition From an image File
    By sakiZ in forum Customising & Remastering
    Replies: 1
    Last Post: 01-24-2005, 07:34 PM
  3. Restoring win98 MBR with Knoppix CD
    By knophead in forum MS Windows & New to Linux
    Replies: 12
    Last Post: 09-25-2004, 12:26 PM
  4. restoring partition
    By thesystem in forum Hardware & Booting
    Replies: 1
    Last Post: 05-08-2003, 06:32 PM
  5. Kernel image not found - Issues
    By kulwen in forum General Support
    Replies: 3
    Last Post: 01-10-2003, 05:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


SFP TO RJ45 TRANSCEIVER SFP MODULE COPPER SFP OPTICAL PORT TO RJ45 ETHERNET PORT picture

SFP TO RJ45 TRANSCEIVER SFP MODULE COPPER SFP OPTICAL PORT TO RJ45 ETHERNET PORT

$7.99



NEW Sealed Cisco SFP-10G-LR 10GBASE-LR SFP+ 1310nm 10km *US Shipping* picture

NEW Sealed Cisco SFP-10G-LR 10GBASE-LR SFP+ 1310nm 10km *US Shipping*

$24.00



Intel SPTSLP2SLCDE 100G-DR1 QSFP28 500m 1311nm Transceivers - Lot of 10 - New picture

Intel SPTSLP2SLCDE 100G-DR1 QSFP28 500m 1311nm Transceivers - Lot of 10 - New

$200.00



Dell Intel X710-DA2 5N7Y5 Dual-Port 10GbE SFP+ PCIe 3.0 x8 Network Adapter picture

Dell Intel X710-DA2 5N7Y5 Dual-Port 10GbE SFP+ PCIe 3.0 x8 Network Adapter

$27.50



Genuine Cisco SFP-10G-SR 0-2415-03 10 Gigabit Transceiver picture

Genuine Cisco SFP-10G-SR 0-2415-03 10 Gigabit Transceiver

$5.40



HP 560SFP+ 10GB 2-port  PCIe NIC Ethernet ADAPTER 669279-001 w/ (2) 10GB SFP+ picture

HP 560SFP+ 10GB 2-port PCIe NIC Ethernet ADAPTER 669279-001 w/ (2) 10GB SFP+

$16.99



10Gtek ASF-10G-T 10GBase-T SFP+ to RJ45 Copper Transceiver Module picture

10Gtek ASF-10G-T 10GBase-T SFP+ to RJ45 Copper Transceiver Module

$19.98



Intel X520-DA2 10Gb 10Gbe 10 Gigabit Network Adapter NIC Dual Port E10G42BTDA picture

Intel X520-DA2 10Gb 10Gbe 10 Gigabit Network Adapter NIC Dual Port E10G42BTDA

$28.94



Cisco WS-C3650-12X48UR-L 48-Port Stackable Layer 3 8x10G SFP+ Port Switch picture

Cisco WS-C3650-12X48UR-L 48-Port Stackable Layer 3 8x10G SFP+ Port Switch

$129.99



New Sealed Cisco GLC-LH-SMD 1000BASE-LX/LH SFP Transceiver Module *US picture

New Sealed Cisco GLC-LH-SMD 1000BASE-LX/LH SFP Transceiver Module *US

$17.00