Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Linux and Unix Linux and Unix
Search Search
Search for:
Tech Support Guy > > >

Solved: Get Windows files using Ubuntu live CD


(!)

ljbirns's Avatar
ljbirns ljbirns is offline
Computer Specs
Deceased with 155 posts.
THREAD STARTER
 
Join Date: Mar 2006
Location: Williamsburg, VA
Experience: follows instructions well
27-Aug-2007, 01:39 PM #1
Solved: Get Windows files using Ubuntu live CD
My wife's laptop ( XP SP) crashed. Machine will not boot. Tried several window remedies to no avail. I loaded a Ubuntu Live CD. That boots. I can " see "
the HD ( 18.6GB Vol ) when I look in places. I put a thumb drive in and the Ubuntu sees it fine and I can access it but I cannot acces the HD. I tried to mount it but it
says 'unable to Mount Selected Volumne "
I tried to install the Ubuntu on the HD but the install says " Not Enough Room ' when it goes to partition the HD. I used 12 % as a partition amount .
It is very possible the HD is shot but if there is a way for me to get some files off it using the Ubuntu live CD that would be great. I ( obviously ) know little about linux
so any help will be appreciated.

screenshots attached

Lew
Attached Thumbnails
Solved: Get Windows files using Ubuntu live CD-screenshot-2.png   Solved: Get Windows files using Ubuntu live CD-screenshot.png  
lotuseclat79's Avatar
Member with 20,583 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
27-Aug-2007, 03:23 PM #2
What version of Ubuntu Live CD are you using?

What kind of disks do you have: IDE or SATA (scsi)?

-- Tom
ljbirns's Avatar
ljbirns ljbirns is offline
Computer Specs
Deceased with 155 posts.
THREAD STARTER
 
Join Date: Mar 2006
Location: Williamsburg, VA
Experience: follows instructions well
27-Aug-2007, 03:34 PM #3
6.06
IDE

Lew
saikee's Avatar
Member with 3,765 posts.
 
Join Date: Jun 2004
Location: Newcastle
Experience: A Linux user gone nuts on multi-boot
27-Aug-2007, 06:50 PM #4
You can have all your Windows files if the partition is still healthy and not corrupted. This should be the majority case if Windows fails to boot due to possibly just one failed system file.

Ubuntu has a good security feature and protects the XP partition from unauthorized access by a normal user. You can access it as a super user in terminal.

This is what you have to do, click terminal
Code:
sudo su
Ubuntu will change you status to a root user. As root you can access all files but only in the terminal. So if you have USB hard disk with a fat32 partition bigger than the XP 18.6 Volume partition and it has been mounted as /media/diskA you can copy the content of the XP drive to it by command
Code:
cp -R /media/18.6 GB Volume/*   /media/diskA/
If you find terminal in Ubuntu tough going you can download the current version of Slax 6.0.0. and burn it into a bootable CD. It allows you to boot to the desktop as root, mount all your partitions and loaded with ntfs-3g so that you can drag and drop every files in any ntfs partition.

--------------------------
Lastly I would in your case clone the XP into another hard disk, put away the original for safe keeping, install the clone into its position and start doing whatever I need with it knowing there is a good copy to go back to. Cloning details are in here
ljbirns's Avatar
ljbirns ljbirns is offline
Computer Specs
Deceased with 155 posts.
THREAD STARTER
 
Join Date: Mar 2006
Location: Williamsburg, VA
Experience: follows instructions well
28-Aug-2007, 11:00 AM #5
This is what you have to do, click terminal
Code:
sudo su
Ubuntu will change you status to a root user. As root you can access all files but only in the terminal. So if you have USB hard disk with a fat32 partition bigger than the XP 18.6 Volume partition and it has been mounted as /media/diskA you can copy the content of the XP drive to it by command
Code:
cp -R /media/18.6 GB Volume/*   /media/diskA/
I have an 80 GB external USB drive. I have used it to BU my computer. I created a Directory called Tootsie then I attached it to wife's computer. Ubuntu called it 74.5 GB volume I could access the files that were already on it in Ubuntu. Tried the above copy.
using 74.5 GB Volume as destination It ran for about 20 seconds and completed and now the external drive is unreadable on both Ubuntu and on my windows computer.
Windows says " Unable to access drive."

Lew

I
lotuseclat79's Avatar
Member with 20,583 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
28-Aug-2007, 01:23 PM #6
When you tried to mount the HD from your wife's laptop, what was the full mount command you used - did you try to issue a mount command from a terminal window or did you use the Ubuntu System>Disks graphical interface?

In this mount command, I assume that the mkdir /mnt/hda2 command has previously been given from the root account user. Was it something like:
# mount -t ntfs /dev/hda2 /mnt/hda2

Have you tried doing this? I assume your wife's file system for WinXP is an NTFS file system. Is it in fact an NTFS file system or a FAT32 file system?

As I recall, by default, Ubuntu 6.0.6 LTS will mount the first disk it sees, however, you may not have the proper partition. The System>Disks selection will take you through a graphic disk browser, and if the data partition is not mounted, it will guide you through creating a directory and mount details, i.e. the equivalent of the mount command I have used above.

Using the Ubuntu Live CD, you should be able to mount your wife's laptop HD using the above mount command, and given that you have created a Tootsie directory (I presume on your USB drive), the Ubuntu environment should see your USB drive.

I prefer using the tar command myself, but let's use Saikee's cp command, and this is how I would have tried to copy the contents of the laptop computer to the USB assuming Saikee's USB mount and my mount of the HD (if I got all of the facts straight?).

cp -R /mnt/hda2/* /media/diskA/Tootsie

That said, what windows remedies did you try? A console recovery? A Reinstall?

-- 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
ljbirns's Avatar
ljbirns ljbirns is offline
Computer Specs
Deceased with 155 posts.
THREAD STARTER
 
Join Date: Mar 2006
Location: Williamsburg, VA
Experience: follows instructions well
28-Aug-2007, 02:38 PM #7
In my previous post I said that I can no longer access the 80 GB external drive that I tried to copy to.( Neither in Ubuntu or using Windows on my good computer )
When I try to mount the 18.6 GB Volume ( dev/hda2 ) using # mount /mnt/dev/hda2
I get :" mount: can't find /mnt/dev/hda2 in /etc/fstab or etc/mtab "
I tried to edit filesystem table to add /dev/hda2 but can't figure out how to edit the file (even from sudo su ) File system is FAT 32

Screeshot 5 shows error message when trying to mount the external 80 GB HD using the interface not terminal which gives message as above
Screenshot 6x is the error message for the HD I am trying to access ( wife's Windows FAT 32) labeled 18.6 Gb Volume

Appreciate the help

Lew
Attached Thumbnails
Solved: Get Windows files using Ubuntu live CD-screenshot5.png   Solved: Get Windows files using Ubuntu live CD-screenshot6x.png  
lotuseclat79's Avatar
Member with 20,583 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
28-Aug-2007, 04:14 PM #8
The command: # mount /mnt/dev/hda2 is not a proper mount command.

From the Ubuntu 6.0.6 LTS Live CD:

If the file system on the laptop for WinXP is FAT32, then do (as root - i.e. sudo -i):
$ sudo -i
# mkdir /mnt/hda2
# mount -v -t fat32 /dev/hda2 /mnt/hda2

-- Tom
saikee's Avatar
Member with 3,765 posts.
 
Join Date: Jun 2004
Location: Newcastle
Experience: A Linux user gone nuts on multi-boot
28-Aug-2007, 05:49 PM #9
Current Ubuntu on 2.6.20 or newer kernel has abondoned Pata disk names and call the old hda as sda now. So forget hda, hdb etc. If you are nor sure read the output from
Code:
sudo fdisk -l
If the partition didn't get copied I think it was because you didn't create a fat32 partition or format it. To write on a ntfs partition you need to load ntfs-3g and mount it as type ntfs-3g.

If Ubuntu mounted it automatically then you will not be able to write it because Ubuntu only allows you to read the USB disk partitioned in ntfs filing system.

Follow loyuseclat79 steps and adjust hda2 for sda2 if necessary. You can then write the data out.

The writing speed should be about 20Mb/s for an external USB disk.
ljbirns's Avatar
ljbirns ljbirns is offline
Computer Specs
Deceased with 155 posts.
THREAD STARTER
 
Join Date: Mar 2006
Location: Williamsburg, VA
Experience: follows instructions well
28-Aug-2007, 08:57 PM #10
lotuseclat79

Thanks. Your instructions worked and the drive mounted. However, when I go to look
at the drive ( click on the icon ) the circle in use thing ( Hourglass in XP ) goes and goes and the computer freezes up. I had to unplug it and remove the battery to quit. Tried three times. I think I'm done. And as I said I still have problem now with the external HD
which shows completely full and I can't access that either. ( my post # 5 above )
( Did the copy WORK and it filled the drive ?)

Thanks for all your help. You too saiklee.

Lew
lotuseclat79's Avatar
Member with 20,583 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
28-Aug-2007, 09:33 PM #11
Hi ljbirns,

I would solely use commands from the terminal window in this case. If by looking at the drive after mounting it means you used the graphic interface - my advice would be not to use any graphical software to do what needs to be done - i.e. as in your click on the icon which probably contributed to the software hanging.

The idea of using a Live CD with Ubuntu allowed you to successfully mount the HD which is one step in the process.

Now, if the external HD filled up (but as I understand it you cannot read it currently), then try at least the following:
1) verify with the HD in the laptop after you mount it successfully, cd to /mnt/hda2 and issue an ls command which would be equivalent to a dir command of the C:\ folder in WinXP - can you do that? Was it successful? If so, this verifies that you can read the HD and if you can read it, logic dictates that you can also read it and write what you read to another drive - do you see where I am going with this?
2) If the ls command was successful, then the next thing is to decide that if you currently cannot read anything in the external drive - the idea is to once again make it read/writeable by destroying everything on it, if that is ok and works for you. To do that, I think it could be reformatted as a FAT32 drive to be compatible with the HD in the laptop. I am only suggesting this only if there is nothing on the external drive that you need - it can't be read anyway - and what I am suggesting is that now that we can mount the HD in the laptop (hopefully also verifying that we can read it as demonstrated by the ls command), then if we can reformat the external HD, and then mount it properly - we have another chance at either doing a copy or a tar with compression to store the data on the HD in the laptop to the external HD - and come away with an external HD that can be read thus preserving the data you are trying to get off of the laptop's HD.

Let me know if you follow this and we will take it one step at a time command by command.

-- Tom
ljbirns's Avatar
ljbirns ljbirns is offline
Computer Specs
Deceased with 155 posts.
THREAD STARTER
 
Join Date: Mar 2006
Location: Williamsburg, VA
Experience: follows instructions well
29-Aug-2007, 09:43 AM #12
lotuseclat79

Ok I followed your excellent suggestions and the " ls" command on the HD ( /mnt/hda2)
brought up a dir> see screenshot. I follow your logic with the external HD. I will attach it to my good laptop and re- format.
BTW drive is ntfs not fat32 my fault for screwing that info up.
Will let you know when I have completed ( Also putting in a new Kitchen countertop today )

Thanks for NOT giving up when I was ready to do so.

Lew
Attached Thumbnails
Solved: Get Windows files using Ubuntu live CD-screenshot-3.png  
ljbirns's Avatar
ljbirns ljbirns is offline
Computer Specs
Deceased with 155 posts.
THREAD STARTER
 
Join Date: Mar 2006
Location: Williamsburg, VA
Experience: follows instructions well
29-Aug-2007, 10:32 AM #13
lotuseclat79

OK I formatted the external HD, using my good windows laptop, to NTFS.

I copied one of my directories ( using Karen's Replicator ) to the External HD as a test. Worked fine.

Attached external HD to my wife's laptop and low and behold it is MOUNTED without my doing anything.
The directory that I made ( Lew ) is there and Ubuntu reads it and I can view the files. I now have great expectations !

I will await your giving me step by step instructions .

Thanks

Lew

Last edited by ljbirns; 29-Aug-2007 at 12:16 PM..
lotuseclat79's Avatar
Member with 20,583 posts.
 
Join Date: Sep 2003
Location: -71.45091, 42.27841
29-Aug-2007, 01:44 PM #14
Hi Lew,

Where there is a will, there is a way, so never give up unless it is already lost.

Ok, so - what we have now is that you have reformatted the external HD to ntfs, and the laptop is an ntfs file system HD.

Previously, we mounted the laptop HD with the mount command as follows:
$ sudo -i
# mkdir /mnt/hda2
# mount -v -t ntfs /dev/hda2 /mnt/hda2 (note: I substituted ntfs)

And, since you have attached the external HD to the laptop and it mounted we should have the following:
1) A running Live CD booted up and running with a Linux file system built in RAM of the laptop
2) An external HD mounted to the laptop with a reformatted ntfs file system
2) The laptop with an ntfs file system on its HD - not booted but spinning

From a terminal window in the Live CD environment, run the mount command:
$ mount
It should tell you all of the mounted drives with the proper device names for them
What do you see? You should see:
1) the laptop HD mounted to a directory in the Live CD Linux file system in RAM
2) the external HD mounted to a directory in the Live CD Linux file system in RAM
And since you have already verified that both HDs are readable, we now need to verify that both HDs are both readable and that your external HD is writable:

In the mount command above, I used the -v parameter to output a notification that the mount command worked and it will also tell you that the drive is (r,w) -
what I want you to do now is that using the umount command, i.e. umount, please unmount each drive separately and remount them separate as follows:
$ sudo umount /dev/hda2
$ sudo umount /dev/extrn ?????? I do not know the device name, /dev/hd?? of the external HD - the mount command should have supplied it
Now, remount each HD on the /mnt/hda2 and the /mnt/extrn directories (I am assuming the directory that the external HD is mounted on is /mnt/extrn - meaning that you have already issued the $ sudo mkdir /mnt/extrn command)
$ sudo mount -v -t ntfs /dev/hda2 /mnt/hda2
$ sudo mount -v -t ntfs /dev/extrn /mnt/extrn

Now, verify that the mount command for the external HD showed the (r,w) attribute, and since the ls command can read the C:\ root directory of the laptop HD we are set to go. Do the ls command again to make sure.

With the terminal window of the Live CD environment:
1) issue the cd command to locate to the C:\ directory of the laptop's HD
$ sudo cd /mnt/hda2
2) If your external HD is larger than the laptop HD, and you want to save the entire laptop HD, you can do so, but it is probably better to decide what you want to save in terms of the directory structure on the laptop HD starting from C:\
You do not need to save everything, but can if you want to.

As I understand it, you want to save items that can be restored back to a reconstituted WinXP laptop - is that correct?

I have to go run some errands and will be back by about 5PM.

Let me know what you decide and have done of what I have asked in this msg and we will take it from there. The local time here now is about 2:45PM EDT.

-- Tom
saikee's Avatar
Member with 3,765 posts.
 
Join Date: Jun 2004
Location: Newcastle
Experience: A Linux user gone nuts on multi-boot
29-Aug-2007, 02:58 PM #15
I haven't time to go through the various posts here but a Ubuntu out of the box does not support writing to a ntfs partition. Therefore while the ntfs partitions can be read nothing can be written on the external had disk unless the filing system is fat32.

One can "apt-get install ntfs-3g" but I don't think it will work on a Live CD which cannot store information. In any case to write on a ntfs partition the partition must be mounted as a type ntfs-3g and not ntfs.

I honest believe the best way out of this is to clone the disk. Since the output of "fdisk -l" was never shown but the existing disk is recognised as hda and first USb disk seen by Ubuntu is always sda there if the USB disk is connected I would execute the cloning in the following manner

(a) In Ubuntu terminal obtain the root privilege by issuing the command
Code:
sudo su
The prompt should change slightly signifying you are now in root.

(b) Issue the command
Code:
fdisk -l
I would go over the information like a hawk, make sure my source disk is hda and hda2 is Type 7 for being ntfs filing type. My target disk is sda with 80Gb. This serves a final check to ensure which is the "source" and which is the "target".

(c) Having satisfied the source is hda and the target is sda I then cloning the disk by one line of command in dd
Code:
 dd if=/dev/hda  of=/dev/sda bs=32768
The above means the input file device is hda and the output file device is sda. The transfer is 32768 bytes which is one track of 64 sectors by 512 bytes per sector. The cloning starts from the first sector of hda and will terminate when the last sector has been reached. The excess capacity in the target sda is simply empty hard disk space. Note that I did not create partition or do any formatting with sda because there is no need. The first sector copied from hda onto sda is the MBR and contains the partition table, meaning the sda will have identical partitions therefore no need to do anything. I often cut the wtapping from a newly purchase raw disk as a target and it works everytime.

(d) dd clones an external hard disk at about 20Mb/s. This thread does not tell me how big the source disk is except the hda2 is about 20Gb, say say it is a 30Gb hard disk. The time taken should therefore be 30000/20 =1500 seconds or about 42 minutes. dd on completion shows nothing except one can use the terminal again.

Prove me wrong that you cannot get the entire hard cloned in less than one hour!

Last edited by saikee; 29-Aug-2007 at 03:18 PM..
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
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)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑

Content Relevant URLs by vBSEO 3.3.2