hard disk and sub flash disk issues

Liam Proven lproven at gmail.com
Thu Dec 8 14:12:37 UTC 2022


On Thu, 8 Dec 2022 at 14:40, Semih Ozlem <semihozlemlinuxuser at gmail.com> wrote:
>
> (i) I accidentally turned one of the partitions on the hard disk of the machine I currently have to linux swap. That partition contained files that I may need to review or use later. Is there a way to recove those files and if so how

Oh my word. How? That is the key question. If you changed the
partition type in `fdisk`, say, then that should be relatively easy to
undo. If you reformatted it as swap, though, no -- that would be much
harder to undo.

> (ii) I installed debian and ubuntu on various usb flash disks of size 64 gb or 32 gb or even I think 16 gb not live systems but either full installations or some persistence.

Which? Again, not enough info.

If you installed onto the USB key, which is fine and perfectly doable,
then with what settings and what partitioning etc?

I do this sometimes. I recommend using ext2, as journaling causes more
disk writes and flash keys wear out easily. Disable all swap, both
partition and file. Install ZRAM for swapping to RAMdisk instead.
Mount with `noatime` in `/etc/fstab`, again to minimize disk writes.
With all this, a key can be usable for years.

Live media with persistence are a totally different thing.

So we need to know more.

> Some of them broke down meaning they wont boot or run a full system they may drop to busybox or simply refuse to start at all. Some of those filesystems are still viewable if I start the machine with a live system or persistence system. Can they be fixed if so how and is it worth the effort

If the key has worn out, then no. Copy off any files you want,
reformat and test the medium. If it will reformat at all, it may be
OK. If it won't, it's probably time to recycle it.

> (iii) I have an external hard drive seagate that appears in lsusb command but the disk does not mount or appear under blkid or lsblk even with sudo. Can I recover that device external hard disk

Oh my word. What do you *do* to all this kit?!

By the sound of it, no, it's dead.

I defer to others with more recent data recovery experience, though.

> (iv) I have another machine that was working with windows that no longer recognizes its usb ports or the hard drive. One of the ports copper wires I think got bent

You think? On what basis? How? What is the evidence?

> so I removed that usb port

How?

> now the bios screen appears but windows wont boot and the hard disk does not get recognized by the bios this is a laptop i7 asus

Remove the HDD, attach to a  cheapo USB cable -- something like this:
https://www.amazon.com/StarTech-com-SATA-USB-Cable-USB3S2SAT3CB/dp/B00HJZJI84
... and recover your data if possible.

> the temporary machine I am running is i3 and is Casper
>
> Any help would be great. Thanks

Er, in general, learn to be much more gentle with hardware,  and make
lots and lots of backups!

-- 
Liam Proven ~ Profile: https://about.me/liamproven
Email: lproven at cix.co.uk ~ gMail/gTalk/FB: lproven at gmail.com
Twitter/LinkedIn: lproven ~ Skype: liamproven
UK: (+44) 7939-087884 ~ Czech [+ WhatsApp/Telegram/Signal]: (+420) 702-829-053



More information about the ubuntu-users mailing list