Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Linux and Unix
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory monitor motherboard netgear network printer problem ram registry router security server slow software sound trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
Solved: Get Windows files using Ubuntu live CD

Reply  
Thread Tools
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
30-Aug-2007, 10:48 PM #31
Always issue the copy command with the -p parameter to preserve permissions and ownership.

If you issue: cp -p /mnt/sda1/Tootsie
you forgot the destination directory

The syntax of the copy command is: cp [params] [source files or dir] [destination directory]

Yes, its getting late, so I'll pick up the thoughts I have tonight in the AM.

-- Tom
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
31-Aug-2007, 01:21 PM #32
Note: Issuing the cd command without any parameters gets you back to the home directory for the account. So, from the root account with th # prompt, if you are located at the My Pictures folder and want to go up a directory the
parameter to give is ".." without the quotes, as in:
# cd ..

Assuming the following, i.e. both drives are mounted under Ubuntu Live CD:
Please verify that the external hard drive is writable when the mount command
is given - I assume it is mounted by a mount command? Isn't it? Or, is it just
plugged in and automatically detected by the Live CD Ubuntu environment?

1) usb device name = /dev/sda1; mount dir = /mnt/sda1 (fat 32 formatted)
2) WinXP device name = /dev/hda2; mount dir = /mnt/hda2 (ntfs formatted)

The following example is to ascertain whether a file can be written to the usb
device and read afterwards:
$ sudo -i
# cd /mnt/hda2/Document*/My*Pictures
# ls -lt

(choose one file, e.g. assume it is named birthday.jpg for this example, i.e.
choose any file you want and substitute its real name for birthday.jpg)
# cp -p birthday.jpg /mnt/sda1/Tootsie/
# pushd /mnt/sda1/Tootsie
#ls -lt

Did the copy work or not, i.e. did the ls -lt command list the file?

If that did not work, try the following (substituting the real file name again):
# popd
# dd if=birthday.jpg of=/mnt/sda1/Tootsie/birthday.jpg
# pushd
# ls -lt

Did that work, if necessary to try?

If it did work, it gives you a mechanism to copy one file at a time if there
are only a handful of files instead of multiple 10s or 100s.

If at this point we are not able to write to the usb external drive formatted
as a fat32 disk, then if I am not mistaken, there is a set of msdos tools -
mtools - that can be used to write to an msdos formatted disk from Linux.
We would have to import them into the Live CD environment (in one session)
using the Synaptic Package Manager (i.e. be connected to the Internet) and
then use them to write to the external drive. Its been a while since I have
used them, so I would need to import them myself and test them initially, but
they just might do the job if we need them (I hope they do at any rate).

-- Tom

P.S. While you do this stuff, I'll be taking a break for lunch and then updating my Live CD environment with mtools to give them a tryout.
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein
lotuseclat79's Avatar
Distinguished Member with 21,345 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
31-Aug-2007, 03:06 PM #33
I found out that Linux can read/write to FAT32 partitions, so you should be able to accomplish either using the cp -rp <source file|dir> <destination dir> or the dd command to the external drive - so, no need for mtools or dd command variant.

Let us know how things are going that you try.

-- Tom
__________________
The independence created by philosophical insight is - in my opinion - the mark of distinction
between a mere artisan or specialist and a real seeker after truth. - Einstein 1944
Imagination is more important than knowledge. - Einstein
saikee's Avatar
Senior Member with 3,409 posts.
 
Join Date: Jun 2004
Location: Newcastle
Experience: A Linux user gone nuts on multi-boot
31-Aug-2007, 06:23 PM #34
I really can't believe how long this thread has dragged on.

Can the OP download the current version of Slax and burn it into a CD?

This distro automatically mounts every NTFS partition with ntfs-3g and allows you to log in as root to the desktop. Copying XP files out is just a simple drag and drop in the desktop.

Absolutely nothing is needed to be done and you don't even need to see a text terminal! Just drag files from one ntfs partition to another one.
ljbirns's Avatar
Computer Specs
Deceased with 159 posts.
 
Join Date: Mar 2006
Location: Williamsburg, VA
Experience: follows instructions well
31-Aug-2007, 10:43 PM #35
lotuseclat79

Had a long day on other stuff. Ok I followed your very clear instruction and I CAN copy
a file from hda2 ( NTFS ) to sda1 ( FAT). My biggest problem now seems to be that the files I think I need are in hda2/Documents and Settings/Mary Lou Birns. ls (list) gives input / output error Also I cannot find a listing for the MY DOCUMENTS directory whichi is where I would think the majority of the files she wants would have been.

How can I READ or look at the contents of a file ?

Thanks
Lew

saikee
Tried to burn SLAX as you suggested,( although the external is now FAT32.) from
http://www.slax.org/download.php. download was ok but niether ImageBurn
( which I used to burn the Ubuntu ) or Nero made me a good live CD. Tried it twice.
__________________
In the land of the blind, the one-eyed man is king.
saikee's Avatar
Senior Member with 3,409 posts.
 
Join Date: Jun 2004
Location: Newcastle
Experience: A Linux user gone nuts on multi-boot
01-Sep-2007, 07:24 AM #36
Files not belonging to a user that doesn't own them are not shown in UBuntu desktop. That is the price you pay to use Ubuntu.

In root terminal you can see and use these files because as root you are the equivalent admin.

There you can see them by

"ls /media/hda2/Document\ and\ Settings/Username/My\ documents"

You can use the tab key to get you there because of there are a lot of spaces which need "\" in the terminal command.

Basically you type "ls /media" first to see all the choices inside /media directory.

You then hit the "upward direction" key to reproduce the last terminal command and add "hda2" to make the next command

"ls /media/hda2/"

You then repeat the same process but only add "docu" to make the command

"ls /media/hda2/docu" and hit the tab key. Bash will try to present to you choices available to continue with the command. Therefore you never need to type the full line because a space in bash shell has its own meaning.

I can see your problem can disappear if you either clone the whole disk or copy the whole partition. In the latter case it is just
Code:
 cp -R /media/hda2/* /media/sda1/
Do adjust the device names as reported in your own circumstance.
ljbirns's Avatar
Computer Specs
Deceased with 159 posts.
 
Join Date: Mar 2006
Location: Williamsburg, VA
Experience: follows instructions well
03-Sep-2007, 12:16 PM #37
Hi Tom
saikee
Ok I got the files copied to the external and my win XP can read them.

There are apparently quite a number of files that are either corupted or missing from my wifes HD ( her E-Mail files in Thunderbird, her Pictures etc ) I believe the entire " My Documents " directory is gone or unreadable since I cannot find it anywhere.
Strangely Thunderbird resides in ( in Windows) Documents and Settings/Application Data
and it does not show up. Actually the Directory /mnt/hda2/Documents and Settings/Mary Lou Birns returns an Input/Output error when I try ls. That is where I believe the files should be.
However I did salvage what I could thanks to your time and efforts and I thank you very much. And I learned a bit about Linux and I am going to play with it and learn some more.

Without your help I would have gotten nowhere. Thanks for putting up with my lack of knowledge.

Lew
__________________
In the land of the blind, the one-eyed man is king.

Last edited by ljbirns; 03-Sep-2007 at 09:23 PM..
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 12:23 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.