usbimg2disk erased my data
by agdv from LinuxQuestions.org on (#6CSRT)
Hi,
A few days ago I tried to make a bootable install USB drive with the usbimg2disk.sh script provided in the install ISO. I had made a bootable drive with it before, but this time, since I wasn't burning the ISO image to a DVD to install, I decided to use the option to copy the install directories with the packages. The documentation says that the script, unless formatting the drive, should preserve the existing files. It didn't. (Side note: I have been able to recover all the important files in it with recovery software, although I have lost a lot of not quite so important files, many of them might have been recoverable but the effort to do it wasn't worth it, others were unrecoverable). In hindsight, I should have backed up the data before doing sensitive stuff to the drive, but at the time I thought it was safe.
I have tracked the issue to the rsync command that is used to copy the install tree, in particular to the --delete option. In fact, this option deletes everything that was in the drive, including the newly saved boot files, so the boot drive doesn't even boot.
I saw that Alienbob was the author of the script, so I contacted him. He was nice enough to read it and answer, but he said he no longer maintains the script, and that the option had been added by somebody else, possibly Pat. He suggested that I write about the issue here, since Pat is likely too busy to answer emails from random people with problems, which I totally understand.
Has nobody been foolish enough to try what I did in the years since that change was introduced? Does anybody want to confirm my findings (without any actual important files in the drive)? If the findings are confirmed, how do we go about fixing the issue, seeing how the file is already in the wild?
A few days ago I tried to make a bootable install USB drive with the usbimg2disk.sh script provided in the install ISO. I had made a bootable drive with it before, but this time, since I wasn't burning the ISO image to a DVD to install, I decided to use the option to copy the install directories with the packages. The documentation says that the script, unless formatting the drive, should preserve the existing files. It didn't. (Side note: I have been able to recover all the important files in it with recovery software, although I have lost a lot of not quite so important files, many of them might have been recoverable but the effort to do it wasn't worth it, others were unrecoverable). In hindsight, I should have backed up the data before doing sensitive stuff to the drive, but at the time I thought it was safe.
I have tracked the issue to the rsync command that is used to copy the install tree, in particular to the --delete option. In fact, this option deletes everything that was in the drive, including the newly saved boot files, so the boot drive doesn't even boot.
I saw that Alienbob was the author of the script, so I contacted him. He was nice enough to read it and answer, but he said he no longer maintains the script, and that the option had been added by somebody else, possibly Pat. He suggested that I write about the issue here, since Pat is likely too busy to answer emails from random people with problems, which I totally understand.
Has nobody been foolish enough to try what I did in the years since that change was introduced? Does anybody want to confirm my findings (without any actual important files in the drive)? If the findings are confirmed, how do we go about fixing the issue, seeing how the file is already in the wild?