All Questions

Tagged with
Filter by
Sorted by
Tagged with
2
votes
1answer
58 views

dd if=/dev/zero leaves drive contents in-tact? Bad USB stick?

I thought I could nuke all partitions of a drive by using dd if=/dev/zero of=/dev/sdX. In the past this has always worked for me, but in this case it is not working as expected. #check the partitions ...
1
vote
0answers
47 views

How to wipe a partition quickly with value zero? [duplicate]

I want to wipe a partition quickly.I search the answer in website. such as: dd if=/dev/zero of=/dev/sda1 bs=16M count=96 shred -v -z -n 1 /dev/sda1 But: All the commandline,will overwrite with ...
1
vote
2answers
416 views

Create an image of the partition (only the used space)

I have a partition sdb1 of size 3.3 GB. From 3.3 GB only 1.9 GB is used and 1.2 GB is an empty space. I want to create an image of this partition. But I want the image to only have the used space i.e. ...
-1
votes
2answers
42 views

Data recovery after dd on a sda partition

I had installed opensuse in UEFI mode in my computer but having a legacy Windows so it did not appear in boot menu. Following a weird tutorial on the internet I dd the Windows partition of my sda. I ...
11
votes
4answers
2k views

Why does writing random data using dd result in disk partitions?

Prior to running the dd command, the command lsblk returned the output below: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 931.5G 0 disk The ...
2
votes
1answer
335 views

How can I move a single partition to another empty drive?

I've got a partition P1 (which contains my Linux OS) on a drive A. I've just gotten a completely new drive B (that is larger than partition P1 AND the entire drive A). I'd like to copy across the ...
1
vote
0answers
67 views

loop device not matching file size

I have a sparse backing file (NTFS) (made via dd seek=) that's a partial image of a damaged disk. The size as given by ls matches the original disk. However, when looping it, /proc/partitions shows it ...
1
vote
2answers
1k views

disk image without free space

I've an image of a bootable 16GB SD card. I've created the image with: cat /dev/sdd | gzip >sdcard.img.gz And I was happy because $ du -h sdcard.img.gz 482M sdcard.img.gz 482MB instead of ...
0
votes
0answers
38 views

Only write back changes when restoring a disk image with dd

Given a physical disk and an image created from it, I want to write the image back onto the physical disk, but only write the changed bytes or sectors. The use case is restoring images on an SSD - ...
0
votes
0answers
55 views

Best way to move data with overlap towards the end on same device

I have a rather big disk that's pretty full. I need a new partition at the start of this disk. So I need to move the data towards the back of the disk somehow. Usually I do such things with dd, but ...
1
vote
0answers
205 views

Dumping a single partition with dd (not the entire disk)

I have dumped the raw partition dumped via ssh from an external system using the command: ssh root@10.10.10.10 'dd if=/dev/xvda2 bs=1M | gzip' | gunzip | dd of=xvda2.raw As you can see, only the ...
0
votes
1answer
35 views

Clone Drive with only Partitioned Space

I'm trying to save disk space with drive images, but all of the examples that I could find involve filling empty space with zeros and compressing the resulting image. Not all programs will work with ...
2
votes
1answer
429 views

Creating dual-partition SD card image by a script

I have a system that generates embedded Linux systems. The system outputs three files: a tarball containing rootfs excluding the kernel modules a tarball containing the kernel modules uImage The ...
0
votes
1answer
31 views

Should unused partitions be removed?

I downloaded a jessie raspbian image and it shows two partitions. [Michael@devserver ~]$ fdisk -l 2017-07-05-raspbian-jessie-lite.img You must set cylinders. You can do this from the extra functions ...
0
votes
1answer
350 views

Using variable names for input and output files in dd

I'm creating a bash script that will allow me to clone disks, and allow the user to select the input disk to clone and the output disk to clone to. I've almost finished, but I just have one hang up. ...
1
vote
0answers
424 views

Zero out deprecated ZFS Label from Disk with dd

I recently created a new zpool over 8 disks with 4 mirrors. Today I attached the disks to a linux server and an old deprecated zpool is now showing up with zpool import which uses the same disks as ...
1
vote
0answers
281 views

How to make a USB bootable if there is a partition table that have to be kept

How to create a bootable usb if I want to keep the partition tables of my usb? A simple dd on the subpartition (e.g /dev/sdb1) is not going to work. Example: I have the partition # lsblk /dev/sdb ...
2
votes
1answer
100 views

What might cause a block device to somehow be smaller than its partitions?

I'm trying to wipe an IOSafe external drive, and I'm running into a major problem. When I run dd to wipe the full disk (/dev/sdb) it errors out at the 1.8 GB mark (it's a 2 TB disk), saying no space ...
2
votes
3answers
1k views

dd not using entire disk space

I am trying to create a Live USB using the dd utility. The first thing I did was wipe the USB using the following command: ~ $ dd if=/dev/zero of=/dev/sdb bs=512 count=1 The 8GB USB has a total ...
0
votes
2answers
54 views

Do I need to increase original partition size if I'm simply restoring contents (with dd)?

I'd like to copy a partition to another laptop (to back it up). I'll connect the side-by-side laptops with an ethernet cable. To do the backup, I'd specifically like to use the "dd" command. For ...
1
vote
0answers
257 views

Restore DD Image of Bootcamp Windows to OSX

I made a DD image of my bootcamp partition before I wiped my computer. I restored with Time Machine and everything is great but I can't seem to get my running bootcamp partition back to a running ...
0
votes
1answer
988 views

Using dd to copy MBR results in partition tables double the size

I have a laptop with 500GB internal HD and a external 500GB USB HD. I boot up with a linux live cd over the top of my Windows 8.1 machine. My goal is to clone the MBR, partition 1(350mb), and ...
1
vote
0answers
652 views

dd and cat both reporting no space left on device

I have a windows 8.1 Pro laptop with a 500GB HD and a 500GB portable USB HD. I boot up my laptop with a linux live CD so that I can use dd or cat. Testing cat: cat /dev/sda > /dev/sdc cat: write ...
4
votes
1answer
1k views

Use backup file from dd to restore hard disk and also extract files

I made regular complete backups of my hard disk (with all partitions) using dd tool as backup.img file. I have several such files. Now that my old hard disk died, how can I use backup.img file to ...
1
vote
2answers
846 views

Can I use dd to move my system to another partition?

Currently, my whole system is located at the end of my hdd. I'd like to move that data to the beginning and still have booting and other details working. dd seems to do exactly what I want (to copy ...
0
votes
1answer
164 views

GDiskDump or DD to show partition names? [duplicate]

I have partition names like Data-HD, Yhteinen and W10. I do have lots of other partitions, but I want a little more assurance I am copying a right partition to a correct destination. I am quite ...
2
votes
2answers
672 views

How can I manipulate a partition table file without fdisk checking the validity of it?

I'm creating an image in memory (/tmp is a tmpfs): $ dd if=/dev/zero of=/tmp/sdcard.img bs=512 count=3147775 It's supposed to hold a partition table and the first 3 partitions of a device $ losetup ...
0
votes
0answers
39 views

Backup full drive structure, skipping one partition content

I need to backup laptop drive. But in fact what matters is not data as in my data files kept on laptop but all systems, settings, lvm and in general whole disk structure - partitioning, UUIDs, LUKS ...
3
votes
3answers
4k views

How can I copy three partitions of my disk with a specific beginning and ending using dd?

Using the fdisk -l command I got the following answer: Device Boot Start End Blocks Id System /dev/sda1 * 2048 28266495 14132224 27 Hidden NTFS WinRE /dev/...
1
vote
1answer
1k views

How to clone an MTPFS partition of a mounted Android phone?

Using mtpfs I've mounted a Samsung Galaxy S5 and I need to make an image of its root partition. I want to use dd or the like, but nothing seems to be able to detect/reference an MTP and/or FUSE ...
0
votes
1answer
99 views

Hard Disk Clone Image Size

I've created an image backup for HDDA (partition) from HostA and saved on HostB ssh -c blowfish user@ip-or-hostname "dd if=/dev/sda1 | gzip -1 -" | dd of=sda1.gz conv=sync,noerror The HDD size is ...
4
votes
1answer
1k views

How to inspect the raw contents of a partition?

I'm trying to see the contents in raw bytes of a dummy partition /dev/sda3, which I've made to be 100MiB through gparted. I want to test writing and reading on that partition. Is there a tool that ...
0
votes
2answers
16k views

How to create a new partitioning table on SD card from the command line ? [closed]

I have tried to mount a SD card on Linux Mint, I have found the right device file and tried: mount -t vfat /dev/sdb /mnt/zauberportal ,but it failed and I tried some variations like different types of ...
0
votes
1answer
1k views

Delete labelled partition non interactively with one command

I know about fdisk and parted, but I was not able to figure out an non interactive way to delete a labelled partition. I imagine something like <command> <action> /dev/disk/by-label/LABEL ...
1
vote
0answers
550 views

how to write dd command to replace backup image of root partition?

I have installed rhel6.5 in my pc. After that I have changed some configurations in file system. now I have taken backup image of /dev/sda1 which is a root partition of 15gb in size using the command ...
13
votes
5answers
34k views

can 'dd' be used to clone to a smaller HDD, knowing that partitions will need editing?

I've used dd to clone disks like this: dd if=/dev/sdb of=/dev/sda bs=4096 conv=notrunc,noerror,sync And it's always worked fine. Any and all docs on 'dd' take pains to remind you that the target ...
5
votes
1answer
2k views

Partially overwrote /dev/sda, can I recover anything?

I was messing around with my new hard drive, which only contains some personal files, and to check its write speed, I typed: sudo dd if=/dev/zero of=/dev/sda, /dev/sda/ being the new 2 TB connected to ...
4
votes
2answers
4k views

dd to clone to smaller sdcard

One of my Raspberry Pi's is using a 4GB SDcard for the root/boot filesystem. As seen when mounted on another system: Disk /dev/sdc: 3904 MB, 3904897024 bytes 121 heads, 62 sectors/track, 1016 ...
1
vote
2answers
363 views

`dd` to specific location [closed]

dd is a great tool for copying and conversion. Is there any way by dd (or by any other way), to dump the first few bytes from a file to an unmounted partition? Something like this: dd if=hda2.pbr ...
2
votes
2answers
52 views

Backing up a partition

I am pretty new to linux. I mostly started learning after I purchased a couple of Raspberry Pis. I like to make backups of my images as I have often made the mistake of corrupting my data :). ...
5
votes
1answer
551 views

Partitions same size but different block [closed]

I tried to backup my partition using dd on another disk and I created a partition of the same size. When I finished the copy I had problems mounting the partition since I got bad geometry: block ...
1
vote
0answers
321 views

dd primary partition slow transfer rate

Can someone explain me why if backup ,using dd, a primary partition to a primary partition on other disk the transfer rate (MB/s) is significantly slower compared to the the rate I have if the ...
2
votes
1answer
87 views

dd behavior, default writing and partitions

I am confused about the behavior of dd. Say we have some SD card called /dev/foo and this card has partitions /dev/foop0 and /dev/foop1. Using dd, I can set the of argument to /dev/foo and dd won't ...
6
votes
1answer
374 views

Deploying filesystem images onto a partition of arbitrary size

I would like to establish a deployment process for Ubuntu machines based on root FS images. I would like to restore the image onto a simply-formatted hard drive (I can completely erase the disk during ...
8
votes
3answers
3k views

Linux/GParted can see partition table but dd bs=512 count=1 can't

I have an MBR formatted sd card and when connect to a Linux machine (xubuntu 12.04) it can mount a partition and parse the file system (as can GParted). However, when I try to read the MBR from the ...
6
votes
4answers
8k views

How to use DD to clone a partition off a disk image?

I have a disk image, it's a "whole" disk image, e.g., contains multiple partitions, and I want to clone just one of them (not the first one..) onto a partition on an external drive with multiple ...
2
votes
3answers
896 views

Why does this work: “cp image.bin /dev/mapper/loop0p1”?

Why does this work? cp image.bin /dev/mapper/loop0p1 image.bin is a partition image. I have tried it and works, but why? Shouldn't a dd be used?
4
votes
1answer
2k views

fdisk, dd, and the Rapsberry pi

I was trying to wipe my 4GB SD card which acts as the hard drive for the Raspberry Pi, so I went into Mac OS X Disk Utility* and Erased the entire disk, and specified that the whole disk be one big ...
5
votes
3answers
1k views

Help with unzipping a .dd.gz, possibly corrupted

I recieved this file that I was told was a copy of a hard drive (or disk). The file is "sheeva-mem.dd.gz". I tried to unzip the file in a linux Fedora machine. This yielded "unexpected end of file". ...
7
votes
2answers
18k views

Unpack files and directories from an image created by dd?

I created an image of an NTFS partition using dd. I wonder if I can unload/unpack the files and directories in the image to any partition whose size is larger than the image size, so that I can ...