Results 1 to 3 of 3
This is on Debian Lenny 5.0.7 with a LXDE desktop.
Using Root Terminal I have just been trying to mount a SATA drive NTFS file system using the command:
mount ...
- 01-21-2011 #1Just Joined!
- Join Date
- Jan 2011
- Posts
- 2
How to restore user directory after trying to mount a SATA drive
This is on Debian Lenny 5.0.7 with a LXDE desktop.
Using Root Terminal I have just been trying to mount a SATA drive NTFS file system using the command:
mount -t ntfs /dev/sdb1 /dev/
unfortunately the /sdb1 should of been 'sdc1', I think, and what's happened is that my username and files have been moved somewhere else. PCMan File manager has ceased to work and open applications have ceased to be able to save files.
How do I discover where they went, and how do I restore them back to the original place of
debian:/home/username/ ?
I'm about 8 hours in to learning Linux/Debian and desperately trying leave behind about 15 years of Windows use for something better. I'm used to troubleshooting electronics/hardware/all manner of things but the syntax here is, at the moment, a slippery slope. So please bear that in mind!
Thanks
- 01-21-2011 #2
Have you tried switching it off and on again?
The reason I ask is that when you mount a device into a directory, you appear to overwrite that directory but don't actually.
Now you don't want mount anything over /dev as it's where all your device info is stored. I usually make a directory under /mnt and mount my device into that.
[edit]You could also tryto unmount it (there is no n) but I'm not sure what would happen in this instance.[/edit]Code:umount /dev
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
- 01-22-2011 #3Just Joined!
- Join Date
- Jan 2011
- Posts
- 2
Firstly, elija, thankyou for the reply.
>Have you tried switching it off and on again?
Its a well tried and tested technique and usually quite effective but I'd left things as they were, hoping for an answer, in case the loaded tools would easily sort something out that might be a major headache after a reboot.
>The reason I ask is that when you mount a device into a directory, you appear to overwrite that directory but don't actually. Now you don't want mount anything over /dev as it's where all your device info is stored. I usually make a directory under /mnt and mount my device into that.
Yes, now its been fixed thats exactly what happened, the existing files/directories remained intact and became hidden. And it's reinforced for me, again, that we're mounting a file system not a device. I originally tried the command:
mount -t ntfs /dev/sdb1 /dev/sata1
but it didn't appear to do anything. Was that because the directory sata1 didn't exist prior? My original intention was to mount the sata1 volume along the rest of the devices and I now realise it can be mounted anywhere.
You could also try
umount /dev
to unmount it (there is no n) but I'm not sure what would happen in this instance.
Well, I've read so many unanswered post of problems where people never finished the thread to say how they'd got on and it makes it harder to learn from their mistakes. So....first I tried:
umount /dev
Thankyou for pointing out the lack of the 'n' ! I'm still wrestling with the graphics driver at the mo and all this is 4pt text!. All it did first was return a prompt with no error. Checking the filespace and it was still as it was.trying it again i got:
umount: /dev: device is busy
back. At which point, having no other option, I pulled the power. Thankfully it appears to have caused no harm and the filespace has reappeared although in hindsight what might of been better would to have issued a tidy shutdown command from the command line.
The effects of the mistake were pretty drastic, it was like a ghost ship and the lights were on but nobody was home!
Cheers elija, much appreciated
Kind regards
Pete


Reply With Quote
