PDA

View Full Version : [ubuntu] Can't boot after using dd



stamatiou
March 31st, 2013, 03:21 PM
I was trying to write an iso in my usb flash drive by using dd but instead of writing it on the flash drive I did it on my hard drive. Now when I try to boot, I get stuck on the Compaq Logo before and I am unable to boot from other sources because it is frozen. What can I do now?

darkod
March 31st, 2013, 03:43 PM
Get your latest backup. Reinstall ubuntu and restore your personal data from the backup.

And try to avoid copying ISOs with dd, it's really not a good practice. You have to be very, very careful with dd.

Right now I would guess your partition table is gone, together with the data that was at the start of the disk, the part the ISO overwrote.

If you want to, you can try recovering the partitions with testdisk but the data that was overwritten can't be restored.

stamatiou
March 31st, 2013, 03:56 PM
I tried to boot the ubuntu live cd but as soon as I try to enter in the boot options menu, the computer freezes completely. I also tried to boot in the default source by not pressing anything but it freezes too.

darkod
March 31st, 2013, 04:10 PM
The cd should boot into live mode regardless of the hdd. Even when there is no hdd you should be able to boot into live mode, it's working from the cd. If you can't boot into live mode then you have another problem. Maybe video driver issue, or similar.

What boot options are you talking about, the bios boot options? Is your bios freezing?

stamatiou
March 31st, 2013, 04:14 PM
Yes. it is stuck in the bios before anything starts up and it seems like I can't boot from any source...

oldfred
March 31st, 2013, 11:59 PM
A few systems that have multiple boot issues seem to lock up. A full power shutdown often fixes that. with laptops you have to remove battery, wait and usually holding boot key without battery may help to get capacitors to discharge.

Laptop full power reset. post #4
http://ubuntuforums.org/showthread.php?p=12401315

stamatiou
April 1st, 2013, 03:42 PM
I tried the cold finger reset without disconnecting the keyboard and it didn't work. Also I tried this and it didn't work either: http://youtu.be/D72M6wpEhZE
EDIT: Here says that the problem was a damaged drive: HP Logo boot screen(Stuck!) - HP Support Forum - 157688 (http://h30434.www3.hp.com/t5/Notebook-Operating-Systems-e-g-Windows-8-and-Software/HP-Logo-boot-screen-Stuck/td-p/157688)

darkod
April 1st, 2013, 04:40 PM
Can you take out the hdd and connect it to another desktop so you can try restoring the partitions, or write a new empty partition table, which ever you decided to do?

stamatiou
April 1st, 2013, 05:18 PM
I got the hdd out and it didn't freeze... Is there a way I can create an empty partition table using a live cd without putting the hdd into another pc?

oldfred
April 1st, 2013, 05:22 PM
Does your system boot the flash drive or DVD? And if you have hard drive in a caddy you should be able to see it.

But then the issue just may have been that BIOS/UEFI was always set to boot hard drive first and the corruption on the hard drive was the issue. Changing boot order in BIOS so hard drive was last then should have worked??

stamatiou
April 1st, 2013, 05:29 PM
It could only detect the DVD. Also, I have no spare hard drive, except of an external one.
EDIT: I tried changing the boot order and moving the hdd last but it is stuck again...

darkod
April 1st, 2013, 05:56 PM
So, just boot with the ubuntu cd in the dvd drive. Is that not working?

stamatiou
April 1st, 2013, 06:21 PM
Yes it does, but how do I install it? I tried to boot the live cd and then connect the hard drive, but it did not detect it...

oldfred
April 1st, 2013, 06:33 PM
Does BIOS see drive at all, if shown in BIOS you should be able to see it in Ubuntu.

Post this from liveCD:

sudo fdisk -lu

darkod
April 1st, 2013, 06:39 PM
Yes it does, but how do I install it? I tried to boot the live cd and then connect the hard drive, but it did not detect it...

I hope you didn't connect the disk with the machine powered on. This is not a server with hot-plug disks, on standard desktop machines you can't connect disks while it's powered on. It should be powered off.

Connect the disk and then boot with the ubuntu cd. Open terminal and post the output of the command oldfred posted. You can also post the output of this command:

sudo parted -l (small L)

stamatiou
April 1st, 2013, 06:47 PM
the bios does not detect the hard drive and the command gives no output

stamatiou
April 1st, 2013, 06:49 PM
When the disk is connected, the bios gets stuck and does not boot from any source

oldfred
April 1st, 2013, 06:58 PM
If BIOS cannot see drive, no system will be able to see drive as BIOS lets systems know what hardware is available.
You then might try another system, but it sounds like drive died in the middle of all of this. May just be coincidence.

darkod
April 1st, 2013, 07:00 PM
When the disk is connected, the bios gets stuck and does not boot from any source

But that doesn't mean you can connect sata disks online. That is one of the ways to kill a disk.

If the bios doesn't see it, it's either dead or there is another huge problem with it. One thing is for sure, if bios can't recognize it, you can't use it ain the machine, it's like it's not there.

Try connecting it to another machine to see if it wil detect it.

stamatiou
April 3rd, 2013, 08:37 PM
Ok, I found an old laptop and took the hard drive out of it and plugged it in mine. Now the system can boot but when I plug the bootable usb in, it freezes... :/