I need to create the same encrypted partition on the destination as /dev/sda3 on the source I might as well do the same for this recovery partition: dest# cryptsetup luksFormat /dev/sda3 -verify-passphraseĭest# cryptsetup luksFormat /dev/sda4 -verify-passphrase I'm deleting the last partition and giving myself about 15 GB of space for a final partition. I began by copying the MBR over: src# dd if=/dev/sda of=/tmp/sda-mbr.dat bs=512 count=1īefore proceeding, I thought it would help at least to make a recovery partition this time. UPDATE: The next thing I'm trying is simply recreating the partitions on the destination drive by hand. Please ensure the 'nbd' module is loaded. This method now uses the newstyle protocol with a default exportĮrror: Cannot open NBD: No such file or directory Unfortunately, I'm getting an error when trying this I can't even mount the remote device: Warning: the oldstyle protocol is no longer supported. and mount locally on the destination computer: dest# nbd-client src 8000 /mnt/nbd-sda Here is what I tried so far to expose the source drive. UPDATE: I'm considering using NBD to expose the source drive's partitions over the LAN in order to use ddrescue from the destination. Here is the destination: dest# fdisk -l /dev/sda I believe I'm also trying to transfer between drives of like capacity: a 40 GB PATA drive to another 40 GB PATA drive. Src# cryptsetup -verbose isLuks /dev/sda3 Src# cryptsetup -verbose isLuks /dev/sda2ĭevice /dev/sda2 is not a valid LUKS device. Src# cryptsetup -verbose isLuks /dev/sda1ĭevice /dev/sda1 is not a valid LUKS device.Ĭommand failed with code 22: Invalid argument I/O size (minimum/optimal): 512 bytes / 512 bytesĭevice Boot Start End Sectors Size Id Type Sector size (logical/physical): 512 bytes / 512 bytes It appears I have three partitions and only the last one is encrypted: src # fdisk -l /dev/sdaĭisk /dev/sda: 37.3 GiB, 40027029504 bytes, 78177792 sectors UPDATE: I'm looking at how the Debian installer set up the source drive. I was considering using ddrescue as described here however, it only describes transferring the data locally. It's possible that the source drive has a larger capacity than the destination drive, so ideally I would want to transfer only the used space rather than run through the entire empty drive. I'm not too sure about the sizes of the source drive and the destination drive. The computers are available over the LAN, and I'm connecting to both of them remotely over SSH via a terminal with no graphical interface. I have booted both computers via the CD-ROM drive to bring up System Rescue CD 5.0.3, and I'm considering my options to get the failing drive cloned as best as possible. To get around this, I have a second computer with the same single PATA connector on the motherboard, in which I've attached another CD-ROM drive for booting and the destination hard drive. I'm also dealing with older PATA drives-no available SATA drives-and the computer has one PATA connector on the motherboard, into which a PATA ribbon cable is attached with the CD-ROM drive for booting and the near-failing hard drive, so there is no room to attach any second PATA drive in order for a local transfer. If I recall, I went through the options when installing Debian to set it up as an encrypted drive, so I believe /dev/sda shows up as an unencrypted boot partition and the rest is encrypted, and then in that "rest", I have a small 10 GB root partition inside the encrypted area and the remainder is unused currently. The drive does not have much on it-probably under 10 GB of used space, with very little data, so I'm not too concerned with time because I'm not expecting this to take an extraordinary amount of time. I do have backups and I can reinstall the OS on a new drive as well however, my first preference at the moment would be to clone the drive, and I currently have no other option than using System Rescue CD 5.0.3 from a bootable CD. I have a hard drive running Debian that looks like it's failing according to its SMART data. I would like to know what would be the best way to proceed with cloning my hard drive to the point that I can simply insert the cloned drive into my PC and seamlessly boot from it as I currently do with the existing drive.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |