0

So I installed ubuntu on an external portable hard drive I was using, but now my computer won't detect it when I plug it in. The drive does turn on though. When I go to click on the change boot device option when booting up the computer, everything freezes.

I installed ubuntu on another drive just to see if I could recover the files, but it won't recognize that another drive is connected. I checked in files in other locations and in the disk application and neither one can detect that the drive is connected.

All I really want is to recover the files that the hard drive had. Any help is appreciated

  • 1
    Before going in to the depths, Have you tried with live USB. Like start your machine with any live os, And whether the 'specified disk' is identified by the os? – Aravinth Jun 21 '22 at 08:57
  • Does UEFI see drive? Is drive set for AHCI, not RAID, nor Intel RST? If dual booting with Windows you must first install AHCI drivers into Windows. – oldfred Jun 21 '22 at 13:09
  • @Aravinth I am currently using ubuntu on another drive, my computer is able to boot into it, but I can't read my original disk – Karl_Jansky Jun 21 '22 at 18:01

1 Answers1

0

You havent said what type of drive this is. I am assuming that by "hard drive" it is a actually a disk unit that requires both power and data connections. Specifically, its not a pluggable USB drive.

There are a few things you can check. Can you do a scan on the disks? There are two ways to do this:

ls /dev/sd* 
sudo lsscsi 

You may have to install lsscsi. It lists whatever is on the SCSI connectors to your motherboard. Don't fret that you will probably have used SATA rather then SCSI. For this purpose the two are synonymous.

Lets assume that you have a good electrical connection now, and that the drive is seen by the motherboard. It should, all things being equal, be the highest letter drive in /dev/sd* and thers should be a couple of partitions.

Next, we need one (or more) directories to mount the drive on. And we mount the drive. I am going to use the example /dev/sde1 as the partition. YOUR DISK MAY VERY WELL BE DIFFERENT!

sudo mkdir /mnt/disk 
sudo mount /dev/sde1 /mnt/disk 

The other thing you have not shared is how this drive was formatted. I am assume is ext4, or similar, and not one of the exotic formats. If it is an exotic format that is not known to you Ubuntu setup then it will need the drivers installed.

One thing to note: taking a boot drive from one machine to another, and expecting to boot from it, is going to be tricky. The boot and OS installers add a number of firmware bits of code that are specific to the CPU and motherboard. It does this silently when the OS is installed or upgraded. Unless your motherboards and CPU are identical, booting from another machines harddrive may cause issues.

  • Hi! Thank you for your response. I am not trying to recover the files.

    By hard drive, I meant a portable external hard drive. I was able to see it connect with sudo fdisk -l, I am now trying to see if I can read the files by following this

    https://askubuntu.com/questions/318987/ubuntu-doesnt-see-external-usb-hard-disk

    – Karl_Jansky Jun 21 '22 at 17:21