Score:0

Connecting a Ubuntu Device to a Windows Device

ng flag

Is there any way to do this, for example through an Ethernet cable?

I shift-deleted some files inadvertently on the Ubuntu device, and would like to run data recovery software on its file system from the Windows device.

Nmath avatar
ng flag
Why would you use Windows to fix anything in Ubuntu? This is an [XY problem](https://meta.stackexchange.com/a/66378). You can use a live session of Ubuntu by selecting "Try Ubuntu" when booting installation media. A live session is the perfect place to make changes to your Ubuntu installation without being able to boot that installation. If you still want to proceed with your proposed path, please search/research before asking and if you are still lost, be sure to tell us what you found and why it didn't work for you. It's expected that you research your question before asking.
Montmorency avatar
ng flag
I didn't see your comment earlier. The Windows recovery software I have in mind is designed to analyze ext4 filesystems, and if I could simply connect the devices directly it would be so much easier to sort and manipulate recovered files from the Windows device. Alternatively I could use one of these LiveCDs with the Ubuntu device and recover files to a USB HDD and move that back and forth between devices, but it seems far less convenient. https://www.cgsecurity.org/wiki/TestDisk_Livecd
Nmath avatar
ng flag
Can you explain what files you deleted and how you deleted them? If you deleted system files and Ubuntu won't boot, then you aren't going to be able to connect to another device unless you boot a live session anyway. The only other option at that point would be to remove the hard drive and plug it into your Windows box. It's really not a good idea to use Windows-based tools to deal with Linux/Ubuntu file systems. A regular Ubuntu USB can also be booted into a live session which gives you a fully functional Ubuntu system on that device.
Nmath avatar
ng flag
You can file share, but since the files are deleted, they will not show up on your Windows device. It's a catch 22; they would need to show up in the file system for them to be shared to a Windows device. Windows can't access the hard drive otherwise unless the hard drive is directly connected to your Windows device. You can only share files over Ethernet when they are recognized in a file system.
Montmorency avatar
ng flag
Just regular photos and documents were deleted. Based on my experience with programs like Disk Drill (which claim to work with ext4), a drive scan will present me with a list of detected files. I have to export these files to a different drive anyway (since doing so to the scanned drive would likely overwrite the files themselves), so if I'm managing these operations from a Windows device I can just select space on the Windows drive and explore the recovered files there. Using a LiveCD/USB, I will have to export to a portable drive.
Montmorency avatar
ng flag
Maybe I could also explore those recovered files from within the LiveCD environment, working from the Ubuntu device itself , but realistically I will reconnect the portable media to the Windows device - because the Ubuntu device is a laptop rather than a desktop, and because it is old and slow. It's not feasible to sort through hundreds of files there.
Nmath avatar
ng flag
If you're more comfortable using the Windows software and certain that it will recover from ext4 and realize that mistakes could render files unrecoverable-- you'd need to disconnect the drive from Ubuntu and connect it to your Windows PC. SATA would be fastest. If you can, make a bit-for-bit copy/image of the drive just in case something goes wrong. Personally I would not use Windows tools however. Windows historically doesn't know how to handle ext4.
Score:1
in flag

If you are using data recovery software (like https://www.sleuthkit.org/) you would need to attach the recovery drive to the PC that is hosting it.

Since good data recovery tools are filesystem-agnostic, generally what you need to do is to remove the drive from the Ubuntu PC and attach it to the technicians PC directly.

Things like "SATA to USB adapters" are typical when the drive cannot be connected to the technician PC directly.
Here's what a lazy newegg search looks like for such a tool: https://www.newegg.com/p/pl?d=sata+to+usb+adapters

I will caution you about using Windows because it won't recognize the default Ubuntu Linux filesystem, EXT. . Windows will think the drive is not formatted and prompt you to format it. Don't format it. Just let your recovery tools scan it instead. Good tools will scan it on a "block level" (aka, just unstructured ones and zeroes) and then interpret the data after scanning the whole disk.

Also - You could try booting the Ubuntu PC from a thumbstick using a live linux distro and try running the recovery tools that way - no special hardware or second PC required.

Montmorency avatar
ng flag
I intend to use Disk Drill and Active@ for recovery software.
Montmorency avatar
ng flag
I would strongly prefer not to disassemble the Ubuntu device (an old laptop). Is there a way, USB-to-USB or by Ethernet, to just connect the two devices?
Kim Kip avatar
in flag
I could talk hypothetically and say maybe iSCSI? Assuming your recovery software likes it. Assuming you could set it up error-free. Doing that translation/interfacing sounds like unnecessary risk and frustration when your beloved data is on the line. If it were my precious data - I would sacrifice the laptop. If the laptop is too expensive to sacrifice, maybe hire a pro to recover the data and spare the laptop.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.