PDA

View Full Version : How do you recover Window files via Knoppix?



go2
03-25-2004, 07:26 PM
I just download Knoppix3.3 and burned on CD to used to recover some files from my Win2K system that couldn't boot. It booted off the CD fine and I find myself in the x-window session, which was nice. I found the files and tried to copy them to another folder, once to FAT32 and the other to a NTFS sections. However both failed.

After reading some posting, I found that I needed root access. So I hit cntrl-alt-f1 to get to the text shell, and type su - and passwd. It look like I am the root or su so I returned back to x-window, cntrl-alt-f5. I open the 2 file managers and tried to transfer files via copy here option. Again it didn't work.

All I see in the file manager is the desktop and temp icon, not root icon. I think I'm still logged as restricted.

Could someone provide me with some good details on how I can move and copy my files, as I want to reinstall win2k without loosing my_docs? or information on how to use Knoppix to backup win files. Appreciate the help.

garyng
03-25-2004, 07:34 PM
You can't work that way. Each vt is independent and su in one won't elevate the right for existing running programs like existing X-Windows sessions.

All you need to do is the following in any of the xterm or vt :

su (give it the root password when asked)
cp -a /your_windows_direcory you_want_to_save_directory/

and you are done.

Please DON'T try to copy(the cp command) to NTFS partition. The Knoppix driver is an old one which even though allows you to write to NTFS, will corrupt it. Just find a FAT32 as your backup partition to save your documents too(or a network share, CF card etc.)

go2
03-25-2004, 08:00 PM
Thanks. I just tried that on the Konsole Shell cp -a /mnt/hda1/cpqs /mnt/hda1/epson, but it tells me its a read only file system. Same situation when I try to create a directory on the root of my hd. I thought I had already changed that in x-windows using the properties options or is this the same case with different sessions have different rights.

Please advice on how to correct this. Thank you.

garyng
03-25-2004, 08:06 PM
Assuming there isn't exotic setup on your machine, the following command would make it become read/write(after you have su)

mount -o remount,rw /dev/hda1 /mnt/hda1

But is this /dev/hda1 a NTFS or FAT32 partition ?

Also, a

cat /proc/mounts would help to know your machines HD mounting situation.

go2
03-25-2004, 08:19 PM
Sorry it was fat32. I type the commands provided and it copied it over to my other folder. GREAT.

Will this be a temp situation or is it permanent? The last time I copied files to the desktop and reboot, my folder and files wasn't on the knoppix desktop. Strange...

Would you think its safe to reinstalled win2k with my-docs in another folder on the same drive?

Greatly appreciate your help.

garyng
03-25-2004, 08:30 PM
you boot from CD, then the things on the desktop would be gone as it is actually kept in RAM(your whole home directory). What you did though would survive(just do a sync to make sure it is written to the disk).

But to be honest, reinstalling XP/W2K won't damage your documents in general. It would wipe out (if you choose to fresh install rather than 'upgrade') the settings but not your files on the HD. It is pretty safe. Just don't let it repartition or format you HD :-)

If you are really worried, copy it to another machine or CF storage or another HD. If it is not large, I just zip them and email them to myself on my yahoo account. Safe and simple and more reliable in many case than my own backup :-)

My general rule is, either I don't bother(i.e. do nothing) or it must be out on another machine or media. I see no point of putting them on the same partition as backup.

go2
03-25-2004, 08:37 PM
Quick question came up. I was saving my files and realized one of my folders have a space eg "documents and settings". When I use the cp -a command to copy that directory is states no such files or directory. What would I need to do to copy those files over?

Thanks.

garyng
03-25-2004, 08:42 PM
hahaha, this is what micosoft have done when they thought space in the filename is neat. space is just a bad choice as it makes command line manipulation very difficult.

just quote them like cp -a "your file name with space" somewhereelse.

you may be able to do that in Konqueror too(drag and drop).

go2
03-25-2004, 09:05 PM
The space has made my folders look nice but apparently more difficult to backup and manipulate.

Everything was working perfectly with the added "". However, I started getting "cp: cannot create regular file ' ... .url' : invalid argument". This showed up many time. Is this because my bookmarks in favorite has naming problems?

Can these be saved also?

Thanks.

garyng
03-25-2004, 09:16 PM
I have a suggestion.

get a copy of zip, "apt-get install zip" then zip the complete directory into a file as it would shield the odd file name choosen(either by linux or Windows). That would be much easier to handle. Or you can use tar and gzip too. But zip is the easiest and can be read by both window and linux.

go2
03-25-2004, 09:25 PM
Thanks for the suggestions.

I tried apt-get install zip but got
W: Not using locking for read onlyu lock file /var/libdpkg/lock
E: Unable to write to /var/cache/apt/
E: The package lists or status file could not be parsed or opened.

Also, if I use zip what would the commands be? I'm familiar with winzip.

Sorry for the followup followup problems. Appreciate the assistance.

garyng
03-25-2004, 09:32 PM
I haven't used KNOPPIX for a long while and don't know if there is zip. You can achieve the same with tar and gzip.

just do a tar -zcvf /mnt/hda1/backup.tar.gz "your directory"

but you have to get into KNOPPIX to unpack it or get a copy of some third party utility under windows to read that.

go2
03-25-2004, 09:48 PM
Thank you.

I use tar -zcvf /mnt/hda1/backup.tar.gz /mnt/hda1/...
got my backup.tar.gz in root directory.

Just wanted to know how I would "un" tar after I get the system booting again.

garyng
03-25-2004, 09:51 PM
tar -zxvf /dev/hda1/backup.tar.gz

go2
03-25-2004, 09:59 PM
All Smiles :) Thank you Mr. Knoppix.

Now to see how Win2k installs.

Best,
go2

mcaycedo
03-26-2004, 01:59 AM
Well, I haven't seen here the GUI way to do the copy stuff. Easy money. We will have many scenarios.

1. I want to copy some files from one disk (c:) to another disk (d:) in the same machine.

In the desktop must appears some icons, named hda1 (must be C:), hda2 or hdb1 (must b d:) and so on. So, you want to copy some files from c: to d:. Your target drive must be formated with fat or fat32. The format used until win 98. The acceso to Ntfs format is in development (format used by win 2000 and newer). If you have an USB drive it must appear like "SDA1" or something like that. But, with USB drives there are some drives wich Knoppix is unable to detect.

So, you must do right click in the destination drive (hda2 or hdb1). There is one option to change mode from Read to write.

Then, open the file manager (Konqueror) with left click. Open one window for the source files an another for the target directory. And then, simply drag and drop

2. Copy from you local drives to some shared folder in another machine in your lan.

You must know the name or ip from the other machine. Open one file manager and type "smb://192.168.0.10", where the ip belongs to the destination machine or "smb://nombre" with the name from the other machine. If is some win 2000 machine, it will ask you for the login and the password. You must type one login and pass valid in the destination machine. If everything works fine, there must appears one list with all the shared resources of the target machine. Select one shared folder with read/write permissions and repeat the last step from the previous scenario.

3. Publish or share you local drives in the lan, so you can copy you files from another machine.

In the knoppix menu, option Services" and finally "Samba Services". Knoppix will ask you for a pass, only click "ok" twice and everithing will be fine. Then, knoppix will ask you if you want to publish all your local hard drives to read/write access. With this, you will be publishing all the disks from your machine.

The, in another machine in the same lan, open one file explorer and in the address bar, type "\\knoppix" and then enter. It will apear one window asking for a login and a pass, in the login type "knoppix" and enter. It will open one window with all the shared drives from your knoppix machine. And the, drag and drop will work fine