On 9/23/19 5:17 AM, Ed Greshko wrote:
On 9/23/19 4:39 PM, ToddAndMargo via users wrote:
> On 9/23/19 12:45 AM, Samuel Sieb wrote:
>> On 9/22/19 11:33 PM, ToddAndMargo via users wrote:
>>> Digging through my history (which I did not think I still had):
>>>
>>>
>>> # dd status=progress bs=4096 if=/dev/sdb | gzip -v >
>>> DeadStick.FC30_$(date +%Y-%m-%d).dd.gz
>>>
>>> This is a 64 GB stick. It compressed down to 4 GB,
>>> which made senses most of the stick is zeros
>>>
>>> # gunzip --to-stdout DeadStick.FC30_2019-09-06.dd.gz | dd
>>> status=progress bs=4096 of=/dev/sdb
>>
>> If those are the exact commands you used then the one you wrote to
>> should be identical. What is the problem? If the stick you write to
>> is not the exact same one as the one you read from, the size might
>> not be exactly the same which could cause a problem. You would need
>> to compare the output from dd in both cases.
>
> The stick is a dual Legacy, EUFI dual boot install
> of Fedora 30, x64.
>
> On boot, the new stick recognized EUFI boot, gave me a choice
> of kernels, then dropped to the emergency prompt.
>
> When I redid it with only a dd and no gzip, joy,
>
> Me things I got everything back, but not in the right
> physical locations.
Simple test. But no issues here
# parted /dev/sdg
GNU Parted 3.2
Using /dev/sdg
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: JetFlash Transcend 8GB (scsi)
Disk /dev/sdg: 8032MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 8032MB 8031MB primary ext4
(parted)
# mount /dev/sdg1 /mnt
# ls /mnt
lost+found
# touch /mnt/x
# umount /mnt
# dd status=progress bs=4096 if=/dev/sdg | gzip -v >
DeadStick.FC30_$(date +%Y-%m-%d).dd.gz
# ll DeadStick.FC30_2019-09-23.dd.gz
-rw-r--r--. 1 root root 24337880 Sep 23 18:37
DeadStick.FC30_2019-09-23.dd.gz
# parted /dev/sdg
GNU Parted 3.2
Using /dev/sdg
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) rm 1
(parted) print
Model: JetFlash Transcend 8GB (scsi)
Disk /dev/sdg: 8032MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
(parted) quit
Information: You may need to update /etc/fstab.
# mount /dev/sdg1 /mnt
mount: /mnt: special device /dev/sdg1 does not exist.
# gunzip -c DeadStick.FC30_2019-09-23.dd.gz | dd status=progress bs=4096
of=/dev/sdg
# mount /dev/sdg1 /mnt
# ls /mnt
lost+found x
You need to complicate up your partition structure and
try it again.
# parted /dev/sdb
GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: Samsung Type-C (scsi)
Disk /dev/sdb: 64.2GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 2097kB 1049kB
bios_grub
2 2097kB 212MB 210MB fat16 EFI System Partition
boot, esp
3 212MB 1286MB 1074MB ext4
4 1286MB 61.9GB 60.7GB ext4
5 61.9GB 64.2GB 2220MB linux-swap(v1) swap
(parted) quit