Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Notorious b.s.d.
Jan 25, 2003

by Reene

Jonny 290 posted:

dd if=/dev/deadharddrivepartition0 of=/dev/goodharddrivepartition0 bs=1M

_do not mix up the if and of arguments._

it's a completely silent op so don't expect progress bars or anything. just let it go.

you gotta `kill -USR1 $PID` to get regular gnu dd to print a status report

Chumbawumba4ever97 posted:

is

sudo ddrescue - f /dev/sdc1 /dev/sdb1

OK to run?

ddrescue will take forever because you didn't specify a block size or anything

Adbot
ADBOT LOVES YOU

Chumbawumba4ever97
Dec 31, 2000

by Fluffdaddy

Jonny 290 posted:

dd if=/dev/deadharddrivepartition0 of=/dev/goodharddrivepartition0 bs=1M

_do not mix up the if and of arguments._

it's a completely silent op so don't expect progress bars or anything. just let it go.

ok thank you so much

i used the exact command:

sudo dd if=/dev/sdc1 of=/dev/sdb2 bs=1M

that should be OK for an 8TB drive going to another 8TB drive?

also like you said it's just chillin at the terminal, not really showing me anything. the only thing i noticed different is if i double click the new good drive in the file manager it's empty (i had a few test files in there).

how will i know it's done? when i double click the new drive and see my old files in there?

are the files on the new good drive going to be readable in windows or will i have to do some trickery to the drive after this is all done?

Notorious b.s.d.
Jan 25, 2003

by Reene

Chumbawumba4ever97 posted:

also like you said it's just chillin at the terminal, not really showing me anything. the only thing i noticed different is if i double click the new good drive in the file manager it's empty (i had a few test files in there).

you have to `kill -USR1 $PID` to get dd to print a progress report, i already posted that

also you should not have the source or target drive mounted while you do this -- it could gently caress up the copy if the mounted fs decides it needs to fix its book-keeping data

Chumbawumba4ever97
Dec 31, 2000

by Fluffdaddy

Notorious b.s.d. posted:

you have to `kill -USR1 $PID` to get dd to print a progress report, i already posted that


where do i type that? at the end of the dd command from jonny? isn't it too late now that it started?

also i unmounted the drives. thanks!

Notorious b.s.d.
Jan 25, 2003

by Reene

Chumbawumba4ever97 posted:

where do i type that? at the end of the dd command from jonny? isn't it too late now that it started?

you need to get the pid of the active dd process

e.g.

ps -ef | grep dd

then you need to send it the SIGUSR1 signal, using the tool "kill." for obscure historical reasons, the signal-sending tool is called "kill." i have no loving idea why

kill -USR1 $PID

where $PID is the pid for the running dd

Chumbawumba4ever97 posted:

also i unmounted the drives. thanks!

you should stop the active dd and start over, because you may have an inconsistent copy if you started the process while the drives were mounted

you can stop it in its tracks by sending the SIGKILL signal

kill -KILL $PID

Chumbawumba4ever97
Dec 31, 2000

by Fluffdaddy

Notorious b.s.d. posted:

you need to get the pid of the active dd process

e.g.

ps -ef | grep dd

then you need to send it the SIGUSR1 signal, using the tool "kill." for obscure historical reasons, the signal-sending tool is called "kill." i have no loving idea why

kill -USR1 $PID

where $PID is the pid for the running dd


you should stop the active dd and start over, because you may have an inconsistent copy if you started the process while the drives were mounted

you can stop it in its tracks by sending the SIGKILL signal

kill -KILL $PID

this is what i get:

ubuntu@ubuntu:~$ pidof dd
6176
ubuntu@ubuntu:~$ kill -KILL $6176
bash: kill: (176) - No such process

code:
ps -ef | grep dd
root         2     0  0 20:49 ?        00:00:00 [kthreadd]
root       138     2  0 20:49 ?        00:00:00 [ipv6_addrconf]
message+  1217     1  0 20:50 ?        00:00:01 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root      1674  1251  0 20:50 ?        00:00:00 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /run/dhclient-enp2s0.pid -lf /var/lib/NetworkManager/dhclient-c888d219-dd51-34b9-966d-04a2c9dcea77-enp2s0.lease -cf /var/lib/NetworkManager/dhclient-enp2s0.conf enp2s0
ubuntu    1799  1785  0 20:50 ?        00:00:01 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
ubuntu    4350  4345  0 20:50 ?        00:00:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
ubuntu    4762  1785  0 20:51 ?        00:00:00 /usr/lib/evolution/evolution-addressbook-factory
ubuntu    4769  4762  0 20:51 ?        00:00:00 /usr/lib/evolution/evolution-addressbook-factory-subprocess --factory all --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.AddressBookx4762x2 --own-path /org/gnome/evolution/dataserver/Subprocess/Backend/AddressBook/4762/2
root      6175  6165  0 20:55 pts/0    00:00:00 sudo dd if=/dev/sdc1 of=/dev/sdb2 bs=1M
root      6176  6175 46 20:55 pts/0    00:17:54 dd if=/dev/sdc1 of=/dev/sdb2 bs=1M
ubuntu    6806  6740  0 21:33 pts/1    00:00:00 grep --color=auto dd

Chumbawumba4ever97 fucked around with this message at 22:33 on May 16, 2020

Notorious b.s.d.
Jan 25, 2003

by Reene

Chumbawumba4ever97 posted:

this is what i get:

ubuntu@ubuntu:~$ pidof dd
6176
ubuntu@ubuntu:~$ kill -KILL $6176
bash: kill: (176) - No such process

code:
ps -ef | grep dd
root         2     0  0 20:49 ?        00:00:00 [kthreadd]
root       138     2  0 20:49 ?        00:00:00 [ipv6_addrconf]
message+  1217     1  0 20:50 ?        00:00:01 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
root      1674  1251  0 20:50 ?        00:00:00 /sbin/dhclient -d -q -sf /usr/lib/NetworkManager/nm-dhcp-helper -pf /run/dhclient-enp2s0.pid -lf /var/lib/NetworkManager/dhclient-c888d219-dd51-34b9-966d-04a2c9dcea77-enp2s0.lease -cf /var/lib/NetworkManager/dhclient-enp2s0.conf enp2s0
ubuntu    1799  1785  0 20:50 ?        00:00:01 /usr/bin/dbus-daemon --session --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only
ubuntu    4350  4345  0 20:50 ?        00:00:00 /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
ubuntu    4762  1785  0 20:51 ?        00:00:00 /usr/lib/evolution/evolution-addressbook-factory
ubuntu    4769  4762  0 20:51 ?        00:00:00 /usr/lib/evolution/evolution-addressbook-factory-subprocess --factory all --bus-name org.gnome.evolution.dataserver.Subprocess.Backend.AddressBookx4762x2 --own-path /org/gnome/evolution/dataserver/Subprocess/Backend/AddressBook/4762/2
root      6175  6165  0 20:55 pts/0    00:00:00 sudo dd if=/dev/sdc1 of=/dev/sdb2 bs=1M
root      6176  6175 46 20:55 pts/0    00:17:54 dd if=/dev/sdc1 of=/dev/sdb2 bs=1M
ubuntu    6806  6740  0 21:33 pts/1    00:00:00 grep --color=auto dd

you don't need the dollar sign

$PID was a variable in the example; for just a number, write the number

kill -KILL 6176

also ubuntu is loving dogshit, you're gonna want to reinstall your system with something that is actually supportable

i can see in your ps output that you use evolution -- do note that evolution is not a supported package in ubuntu, so god knows who or what is in the package. i would not trust that package.

(this is the major reason ubuntu is such dogshit -- almost every useful tool in the distribution is third party mystery meat, making the system unusable)

spankmeister
Jun 15, 2008






8TB is going to take forever to copy btw.

Chumbawumba4ever97
Dec 31, 2000

by Fluffdaddy

Notorious b.s.d. posted:

you don't need the dollar sign

$PID was a variable in the example; for just a number, write the number

kill -KILL 6176

also ubuntu is loving dogshit, you're gonna want to reinstall your system with something that is actually supportable

i can see in your ps output that you use evolution -- do note that evolution is not a supported package in ubuntu, so god knows who or what is in the package. i would not trust that package.

(this is the major reason ubuntu is such dogshit -- almost every useful tool in the distribution is third party mystery meat, making the system unusable)

thanks a million! also i am only live booting from a usb stick for ubuntu. i just downloaded whichever one came up in google first :shobon:

so now i have both drives unmounted. what exactly should i type so that i can see a status of when the process is over? is it:

sudo dd if=/dev/sdc1 of=/dev/sdb2 bs=1M kill -USR1 6176


sorry i'm so confused; i am guessing that's not correct but i'm not sure cuz i'm dumb

edit: or are you saying to run the command: kill -USR1 6176 in a new window after a day or two to see if it's done?

Chumbawumba4ever97 fucked around with this message at 22:45 on May 16, 2020

Notorious b.s.d.
Jan 25, 2003

by Reene

Chumbawumba4ever97 posted:

thanks a million! also i am only live booting from a usb stick for ubuntu. i just downloaded whichever one came up in google first :shobon:

ok well that's fine

i was afraid you might be trying to use ubuntu on a daily basis, like, putting your personal information into it or something

Chumbawumba4ever97 posted:

so now i have both drives unmounted. what exactly should i type so that i can see a status of when the process is over? is it:

sudo dd if=/dev/sdc1 of=/dev/sdb2 bs=1M kill -USR1 6176


sorry i'm so confused; i am guessing that's not correct but i'm not sure cuz i'm dumb

when the process is over, dd will print a status report no matter what, showing the final statistics

while the process is running, at any time, you can open a second terminal and use "kill -USR1 $PID" to force dd to print a status report on-the-spot, showing what it has done so far

the pid will almost certainly not be 6176 the next time you launch it. every new process gets a new pid

Tankakern
Jul 25, 2007

why the partition

copy the whole disk

Notorious b.s.d.
Jan 25, 2003

by Reene

spankmeister posted:

8TB is going to take forever to copy btw.

yeah

an average hard drive is good for what, 200 mb/s? that works out to about 12 hours...

Chumbawumba4ever97
Dec 31, 2000

by Fluffdaddy

Notorious b.s.d. posted:

ok well that's fine

i was afraid you might be trying to use ubuntu on a daily basis, like, putting your personal information into it or something


when the process is over, dd will print a status report no matter what, showing the final statistics

while the process is running, at any time, you can open a second terminal and use "kill -USR1 $PID" to force dd to print a status report on-the-spot, showing what it has done so far

the pid will almost certainly not be 6176 the next time you launch it. every new process gets a new pid

ok that makes a lot more sense. thank you so much!

Tankakern posted:

why the partition

copy the whole disk

what do i have to change in the command for that?

Notorious b.s.d.
Jan 25, 2003

by Reene

Chumbawumba4ever97 posted:

what do i have to change in the command for that?

on linux the "whole disk" device will be /dev/sdb or /dev/sdc, no number afterwards. the partitions are numbered, the disk itself is just a letter

Chumbawumba4ever97
Dec 31, 2000

by Fluffdaddy
ah ok thanks!

so just change it to:

sudo dd if=/dev/sdc of=/dev/sdb bs=1M

and i should be good?

Notorious b.s.d.
Jan 25, 2003

by Reene

Chumbawumba4ever97 posted:

ah ok thanks!

so just change it to:

sudo dd if=/dev/sdc of=/dev/sdb bs=1M

and i should be good?

yep.

Helianthus Annuus
Feb 21, 2006

can i touch your hand
Grimey Drawer
lgtm

my only concern is if the disks have a different block count, and the new one isn't big enough to accommodate the last few blocks of the old one

you can use fdisk to see the block counts

but even if that happens, chances are you won't lose anything important

Helianthus Annuus
Feb 21, 2006

can i touch your hand
Grimey Drawer
i learned the hard way that when a hdd maker says 8TB, that's more of a ballpark estimate than an exact count

Chumbawumba4ever97
Dec 31, 2000

by Fluffdaddy
so linux finished doing its copying

i plug the new hard drive into windows....and it blue screens lmao :cripes:

so clearly it's not that my hard drive was dying, it's something else. a file on the drive is crashing both windows and linux alike??

here's the error i get in linux when i try to access the old drive or the new drive with everything copied:



windows simply blue screens

what the hell is going on and how do i get around this? :psyduck:

Helianthus Annuus
Feb 21, 2006

can i touch your hand
Grimey Drawer
that's on the new drive??

input output error makes me think the new drive is faulty

but it's possible that i'm wrong and it's actually just a hosed up filesystem. i would work the file system angle first, and if that doesn't work, repeat your dd copy using a fresh drive

the process of fixing the filesystem is specific to the kind of filesystem you are using. but in any case, you have to make sure you unmount the filesystem before you get started

ext3 or ext4? fsck.

xfs? xfsrepair or something like that.

ntfs? click something in windows?

fat32? no fuckin idea, you are probably gotta copy blocks by hand or something

Helianthus Annuus
Feb 21, 2006

can i touch your hand
Grimey Drawer
hey but check this out: the fact that you can list the files on the new drive is very encouraging even if you had the rotten luck of getting a bad disk

Chumbawumba4ever97
Dec 31, 2000

by Fluffdaddy
i tested the new drive before doing anything, the new drive is fine. it's definitely not that. it's producing the exact same error the old drive does now that i copied all the data to it.

reminder that i had the DOS version of Western Digital data lifeguard do a deep scan on the old drive and it found no errors

the drive(s) are NTFS. however i can't do anything in windows because as soon as i plug it in, it blue screens. it will even do this in safe mode! :cripes:

e:

Helianthus Annuus posted:

hey but check this out: the fact that you can list the files on the new drive is very encouraging even if you had the rotten luck of getting a bad disk

i've never actually gotten a file list; the best i got is linux spitting out some error about some SNES rom folder as soon as i try to access the drive, but then it kicks me out and i can't see anything in the drive(s)

i'm not sure if that SNES rom folder is the one causing all my issues, or if it's just alphabetically the first folder on the drive that linux decided to spit out at me or what

Chumbawumba4ever97 fucked around with this message at 18:25 on May 17, 2020

Helianthus Annuus
Feb 21, 2006

can i touch your hand
Grimey Drawer
so what file system is it? i forgot if you said already. whatever it is, unmount it before you continue with recovery

and do you have this plugged straight into the motherboards SATA port? or using a USB enclosure?

Chumbawumba4ever97
Dec 31, 2000

by Fluffdaddy

Helianthus Annuus posted:

so what file system is it? i forgot if you said already. whatever it is, unmount it before you continue with recovery

and do you have this plugged straight into the motherboards SATA port? or using a USB enclosure?

it's NTFS. and yeah it was unmounted the entire time the dd command was running in linux.

i have tried it with it plugged into the motherboard's SATA port, a completely different computer's SATA port, and two different USB enclosures. doesn't make a difference. windows crashes as soon as it is about to show up as a drive, and linux bugs out when i try to access the drive. i do not have this issue with any other drives (i can see files on my other ntfs drives in linux just fine).

something is hosed up on this drive and it transferred to the new drive with the dd command.

what exact issue that is i have no idea. could a single corrupt file cause all this?

Helianthus Annuus
Feb 21, 2006

can i touch your hand
Grimey Drawer
oh word. you literally just said it's ntfs.

that's good, if you had said fat32 you would be hosed

we are almost at the limits of my knowledge here. linux is not the right choice for fixing ntfs filesystems, and idk what to say about that blue screen. maybe event viewer can tell you more?

i would be looking for a way to tell windows "don't mount this poo poo automatically, just show me the block device"

and then i would be researching ntfs recovery tools and techniques

again, the fact that it's listing files on linux is extremely good news

Chumbawumba4ever97
Dec 31, 2000

by Fluffdaddy
it's not exactly listing files in linux, it's just mentioning some SNES rom folder before making GBS threads itself and locking me out of the drive

i really appreciate your help; i think if i can somehow access the drive where i can delete a bunch of useless poo poo (i don't really need those SNES roms) i can hopefully get the drive to stop crashing whatever OS i plug it into (besides DOS)

or maybe like you said it's some sort of file system error but i have no idea how to fix those :sigh:

anyone here that can help me, i'd greatly appreciate it.

Helianthus Annuus
Feb 21, 2006

can i touch your hand
Grimey Drawer
https://superuser.com/a/948527

looks like you gotta use the diskpart windows cli utility to turn off auto mount before you plug that drive in

Helianthus Annuus
Feb 21, 2006

can i touch your hand
Grimey Drawer
looks like ntfs recovery software generally costs money

there might be free alternatives, and you can afford to gently caress around now that you have made a block-level copy

Chumbawumba4ever97
Dec 31, 2000

by Fluffdaddy

Helianthus Annuus posted:

https://superuser.com/a/948527

looks like you gotta use the diskpart windows cli utility to turn off auto mount before you plug that drive in

thank you!

and then you recommend doing what with the drive? will a program even be able to "repair" it if it isn't mounted as a drive letter?

flakeloaf
Feb 26, 2003

Still better than android clock

Yup. I know NTFS Phoenix (q.v.) is smart enough to read a drive without a letter, it's saved my rear end a few times now.

Helianthus Annuus
Feb 21, 2006

can i touch your hand
Grimey Drawer
https://www.easeus.com/data-recovery/ntfs-partition-file-recovery-freeware.html

i mean, this might work? or it might turn your computer into a bitcoin miner? i dunno, we are at the limits of my knowledge, i'm just googling poo poo now

i wonder if it's possible to buy a legit software license for a reputable recovery tool, and receive support from the company that made it?

maybe a windows-head can get in here and show us the way

Chumbawumba4ever97
Dec 31, 2000

by Fluffdaddy
yeah i've used undelete programs before but they typically lose all folder structure which sucks (just a billion files in one location) and often all images like bitmaps and jpegs are corrupted, and often times for whatever reason the filesizes are like triple what they are supposed to be.

i don't think anything was ever deleted. so i guess i am just looking for something that repairs something else? the file system? i would think Western Digital diagnostics tool would have caught something like that but i fully admit i am extremely stupid

Helianthus Annuus
Feb 21, 2006

can i touch your hand
Grimey Drawer

flakeloaf posted:

Yup. I know NTFS Phoenix (q.v.) is smart enough to read a drive without a letter, it's saved my rear end a few times now.

try this imo

Chumbawumba4ever97
Dec 31, 2000

by Fluffdaddy
i legit googled NTFS phoenix and NTFS Phoenix QV but nothing is coming up.

is it PhoenixOS?

flakeloaf
Feb 26, 2003

Still better than android clock

Helianthus Annuus posted:

maybe a windows-head can get in here and show us the way

this was always more gromit's thing, i merely dabble

getdataback and phoenix both work fine and may be worth what you pay for them, with the usual caveats that apply to consumer-grade data recovery programs . Corrupted files are just part of the gig; if the data's damaged then there's nothing anyone can do. "all my poo poo in the same place" is an annoying habit of ancient programs and there's no good reason why a modern program would act like this

nothing in the DLG kit will help you recover files; if anything, it'll make your problem worse by overwriting pieces of files that could be turned into useful data by actual Data Recovery Software

oh, and on the topic of easeus, they will spam the everliving poo poo out of you forever and ever, and its backup software wants system-jesus-level access for reasons i only sort of understand, but the software otherwise does what it said it would and the tech support is very responsive

flakeloaf
Feb 26, 2003

Still better than android clock

Chumbawumba4ever97 posted:

i legit googled NTFS phoenix and NTFS Phoenix QV but nothing is coming up.

is it PhoenixOS?

"(q.v.)" stands for quod vide; it's latin for "i mentioned this elsewhere, look it up", but that won't help you here because apparently phoenix is dead and the copy i got in 2012 won't help you. Sorry about that!

getdataback is still being actively developed

I can't speak to the usefulness of the easeus recoverry tool but I'd prefer not to buy their program if another less creepy one exists

Helianthus Annuus
Feb 21, 2006

can i touch your hand
Grimey Drawer
i just can't believe windows will fatally poo poo itself if a non-boot drive has filesystem corruption

like, what's the big deal? just cut it loose if there's a problem, dont kernel panic and crash the machine!

flakeloaf
Feb 26, 2003

Still better than android clock

i wouldn't be at all surprised to learn a zipped rom that's malformed just-so is confusing the windows zip handler into pissing in its hair

a client of mine had a perfectly innocent rar file that hardlocked my data auditing software, which admittedly isn't a great feat because that program is loving garbage but it was still cool to see how it worked

Helianthus Annuus
Feb 21, 2006

can i touch your hand
Grimey Drawer
it's messed up, because i expect windows to provide everything you need to recover a corrupted ntfs without having to download some exe off of a website

like, i would expect to be able to go into disk manager, right click the naughty device, and then select "repair" or whatever

but windows is throwing its hands up and refusing to deal with it lol

e: actually, have you tried this yet, chumba? ^^

maybe windows can do the needful by itself without crashing after you turn off automount

Helianthus Annuus fucked around with this message at 19:22 on May 17, 2020

Adbot
ADBOT LOVES YOU

flakeloaf
Feb 26, 2003

Still better than android clock

chkdsk prioritizes getting the filesystem running again, and will gleefully erase all of your unrecovered files in the process

i wouldn't expect much more out of the version that runs from within windows, but i say this knowing nothing about it

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply