PDA

View Full Version : sharing files over a network



cmspaz
11-25-2005, 06:33 PM
Long story short, I erased my partition table installing gentoo, and now i can't boot windows to resize my partitions or recover them. Nor did I finish the gentoo install, so I wouldn't erase data from my hard drive. I would like to recover the data from my drive. I then turned to my only real option for recovery.

I booted my knoppix cd (ver 3.3), and all my data is still on the drive and readable, but I need to get it off the drive in order to rebuild the machine. How can I share my drive in knoppix, and how can I get another computer (winME) to see it? Both boxes can ping each other. I can't figure out how to get knoppix to see the shares on the winME box, and I don't know how to share the drive on the knoppix box.

Your help is appreciated.

mmaki
11-25-2005, 08:17 PM
This is why KNOPPIX is so great.

Boot your KNOPPIX CD to and at boot prompt enter knoppix 2 (root shell).
Mount your Windows partition, probably hda1

mount /dev/hda1 /mnt/hda1
Delete the /etc/samba/smb.conf file.

rm /etc/samba/smb.conf
Replace it with this:

# Global parameters
[global]
workgroup = MIDEARTH
netbios name = HOBBIT
security = share
[data]
comment = Data
path = /mnt/hda1
read only = Yes
guest ok = Yes

This is from http://us4.samba.org/samba/docs/man/Samba-HOWTO-Collection/FastStart.html

Restart Samba with
/etc/init.d/samba restart

From any Windows box you should be able to map a drive to \\hobbit\data and copy what ever you need.

Good Luck!

Mike

Laurent
12-07-2005, 12:37 PM
Hi mike,

Would you have any advice/instruction on how to share files over a small network (the network is a mac and a pc (pc now dead and im booting in KNOPPIX to save data) networked through a Belkin router so we share our internet connection and a folder (which happens to be in Windows XP)) but from a PC running XP Home ed accessed through KNOPPIX (PC is crapped out and cant access any data) to a MAC running OS X.2.8.
Before this happened it was a simple question of using the Go function on the mac to access the shared folder (which was actually on the PC).
However while in KNOPPIX i dont seem to have any net connection or network access. You should also know i'm very new to LInux and have no real idea of what i can do/need to do.

Any advice/help would be greatly appreciated.

Laurent

Harry Kuhman
12-07-2005, 04:44 PM
.... a small network .... through a Belkin router so we share our internet connection and a folder (which happens to be in Windows XP)) ...
However while in KNOPPIX i dont seem to have any net connection or network access.
You haven't given us much to work with yet. If you are trying to connect wirelessly then you may have some issues, as wireless support in Linux of many cards for the PC is hit and miss, the makers often don't provide Linux drivers and treat the hardware as top secret. If you are connecting by a normal wired NIC then this should work, you should be on the Internet as soon as you boot Knoppix (try putting a URL in the Knoquror window that opens up at boot time).

That's the good news. The bad news is that of about 10 routers I have tested with Knoppix, one compeletly failed to set up the NIC by DHCP from the router, and that one strange router was a Belkin (version 1, hardware revision 1 of their 802.11b model, no longer made or supported). If you think this is what is happening to you, try the following:
1) Run netcardconfig and take the dhcp option and see if it sets up the NIC.

2) When that fails, run netcatrdconfig again and do not take the DHCP option. netcardconfig will then let you set up the network manually. that's what worked for me with this router.

Laurent
12-07-2005, 04:54 PM
.... a small network .... through a Belkin router so we share our internet connection and a folder (which happens to be in Windows XP)) ...
However while in KNOPPIX i dont seem to have any net connection or network access.
You haven't given us much to work with yet. If you are trying to connect wirelessly then you may have some issues, as wireless support in Linux of many cards for the PC is hit and miss, the makers often don't provide Linux drivers and treat the hardware as top secret. If you are connecting by a normal wired NIC then this should work, you should be on the Internet as soon as you boot Knoppix (try putting a URL in the Knoquror window that opens up at boot time).

That's the good news. The bad news is that of about 10 routers I have tested with Knoppix, one compeletly failed to set up the NIC by DHCP from the router, and that one strange router was a Belkin (version 1, hardware revision 1 of their 802.11b model, no longer made or supported). If you think this is what is happening to you, try the following:
1) Run netcardconfig and take the dhcp option and see if it sets up the NIC.

2) When that fails, run netcatrdconfig again and do not take the DHCP option. netcardconfig will then let you set up the network manually. that's what worked for me with this router.


thanks harry. sorry i thought i gave enough info. and yes it isnt a wireless router or network. didnt think of mentioning that. :oops:
im not a 100% sure what version of the Belkin router i've got (i can check when i get home), but i've tried booting into KNOPPIX and opening Firefox or Konqueror and typing a url. I think everytime i get the same error - cannot find server for http://whateversiteientered.
thanks for the suggestions to make it work tho, will try this as soon as i get home.

While you're here. with regards to my query about getting the network that existed between my mac and pc before the pc died... the network was working as i've explained above (i hope that was enough detail), tho i forgot to mention the PC is connected to the router (and thus the network and internet) by a USB cable, and involved me using the Go function on my mac to mount a shared folder on the desktop, from which we could swap files. that shared folder was on the PC tho.
In KNOPPIX i cant seem to see the shared folder anywhere (tho i can see all other folders and flies that are there) and i've been told that because the PC is connected to the router through USB it might make connecting the Mac and PC running KNOPPIX together more difficult...
would you happen to know of a way to get my KNOPPIX to see my Mac (or vice versa) so that i can transfer files from the PC to the mac?

many thanks

Laurent

Harry Kuhman
12-07-2005, 05:12 PM
tho i forgot to mention the PC is connected to the router (and thus the network and internet) by a USB cable,
I suspect that this is your problem more than anything else, and the router being Belkin may not even be an issue (I sure hope they got that fixed).

USB was never designed for networking and is an awful choice for networking. I do have one USB to Ethernet interface that I've tried to make work, but it never would for more than about a minute (also, you guessed it, Belkin). This was under Windows. If you can get the USB device to work at all under Linux you'll have to jump through some hoops to do it and I can't talk you through it. My best advice, if you don't have an ethernet port, is to get an inexpensive PCI NIC (assuming this isn't a laptop) and install it. I remember paying over $150 for Ethernet cards in quanity about 15 years ago, now you can buy a much faster NIC for about $5 if you shop around a bit. You also need a CAT-5 ethernet cable, about $1 to $5 for mail order houses or from small but honest PC stores, beware that some major PC or Office stores and sleezy small stores will try to rip you off for as much as $29.99 for a simple $1 cable (you could buy a router with a cable indise the box, throw away the router and still save money at that price). If this is a Laptop I would suggest a PCMCIA ethernet card. This is usually more expensive than a PCI NIC, but still a bargan and worth it. Without USB in the way you'll see a much faster Internet connection when you get Windows back up and running too.

Laurent
12-07-2005, 05:18 PM
tho i forgot to mention the PC is connected to the router (and thus the network and internet) by a USB cable,
I suspect that this is your problem more than anything else, and the router being Belkin may not even be an issue (I sure hope they got that fixed).

USB was never designed for networking and is an awful choice for networking. I do have one USB to Ethernet interface that I've tried to make work, but it never would for more than about a minute (also, you guessed it, Belkin). This was under Windows. If you can get the USB device to work at all under Linux you'll have to jump through some hoops to do it and I can't talk you through it. My best advice, if you don't have an ethernet port, is to get an inexpensive PCI NIC (assuming this isn't a laptop) and install it. I remember paying over $150 for Ethernet cards in quanity about 15 years ago, now you can buy a much faster NIC for about $5 if you shop around a bit. You also need a CAT-5 ethernet cable, about $1 to $5 for mail order houses or from small but honest PC stores, beware that some major PC or Office stores and sleezy small stores will try to rip you off for as much as $29.99 for a simple $1 cable (you could buy a router with a cable indise the box, throw away the router and still save money at that price). If this is a Laptop I would suggest a PCMCIA ethernet card. This is usually more expensive than a PCI NIC, but still a bargan and worth it. Without USB in the way you'll see a much faster Internet connection when you get Windows back up and running too.

thanks again harry.
yeah this isnt a laptop btw. tbh the connection by USB to the router has never really caused us major problems, and we've been using it for 2 years now to surf the net and exchange files between pc and mac. tho come to think of it, the net was never that fast on the PC.
Im not sure if we have an ethernet port on the PC either. But thanks for your advice and instructions. I guess if my only other option of using a USB HD (as highlighted in the other thread you saw with my query about it) does not work i'll have to try this. Or slaving the hard drive to another pc.

Laurent

boeingpilot
12-19-2005, 12:15 AM
Mike:
I am trying to do the same thing as the first question in http://www.knoppix.net/forum/viewtopic.php?t=22234 which has to do with getting data off of a HD using Knoppix via ethernet to a HD on a Windows system.

Your instructions start out with mounting the hda1. Easy enough.
Then deleting smb.conf. Also easy.

Then comes the part that I do not know how to do. Replace it with this .. then you give the code. I assume that you create a file called smb.conf with some sort of edit function and put the data in. That is where I hit a snag. I do not know how to do that.

Also, can the workgroup be WORKGROUP instead of MIDEARTH?

I read the samba.org site you mentioned, but that was no help to me.

I appreciate your help.

boeingpilot
Real name Al

mmaki
12-19-2005, 01:26 AM
Use any text editor of your choice. I personally use vi, but if you don't know vi it is difficult to expalin. Open one of the editors from the KDE start button...Editors. Probably kedit.

Paste the code below into the editor:

# Global parameters
[global]
workgroup = MIDEARTH
netbios name = HOBBIT
security = share
[data]
comment = Data
path = /mnt/hda1
read only = Yes
guest ok = Yes
Save the file as /etc/samba/smb.conf

You can replace MIDEARTH with anything you like.

Good luck!

Mike