My adventures with:
Email me at:
Updated Feb 2006: Now on FC4. Added
wireless Ralink RT2500 chipset driver.
Sept. 29, 2005: added jump table. updated MPlayer to play
RealAudio.
I find Linux to be endlessly fascinating, but also very frustrating because there are so many cryptic, arcane things that one must know to use it.
| Various Linux Commands | Installation stuff - kickstart, linld and linload | Network Boot etherboot. |
| Xine and MPlayer media-players | Compile a kernel - and yum,
rpmbuild'ing |
Wireless on Linux. Also Mot gear (not linux specific) |
| SMB file sharing | Stuff to look into |
To mount an ISO image and copy/read files from it (e.g. to avoid having to burn a CD) use the mount command. Or, conversely, to make an ISO image from a bunch of files use the mkisofs command, there are like a million switches, I use the -J -R to give me an iso with Windows-ish naming:
mount -o loop -t ISO9660 filename mountpoint mkisofs -J -R -o outputfile pathspec
Command to remount filesystems, e.g. when Tivo is operating, the root filesystem is mounted as read-only so to write to it you must first remount it writable. And when done you should return it to read only!
mount -o remount,rw / // remounts root (/) as read/writable mount -o remount,ro / // remounts root (/) as read only
Un-tar. If you have a file ending in .tar or .tgz (or bz2) you need to expand it in order to use it. The gz in the file's extension implies that it is a .tar that has been compressed with gzip (.bz2 you need bunzip2 which is in busybox). Oh, and by the way, on Windows, there a freeware program 7-zip that does untarring and such.
tar -xzvf filename.tgz // untar('x') a compressed('z') file('f') verbose('v') (to the current directory?)
tar -xvf filename.tar // untar a regular (uncompressed) tar file
bunzip2 filename.bz2 // if it's bz2 you need to first bunzip it, then handle as needed (it's usually tarred)un-tar as usual
On a related note, on some other Tivo hacker's suggestion, I now always use Crimson Editor -- it is a freeware very handy text editor that handles Unix-style linefeeds.
To find out the PID (process ID) of what's running (usually th list is kindof long so pipe it through grep for whatever it is you are looking for):
ps aux | grep whatever
To dump some bytes using busybox's hex dump:
hexdump -s offset -n numbytes // offset is decimal, how to get hex?
Sometimes want to REALLY be sure the boot track (all partition tables and whatnot) is really gone and random handling of the MBR. Some examples of boot/MBR stuff:
dd if=/dev/zero of=/dev/hda bs=512 count=63 //zeroes out 63 512byte sectors of hda! dd if=/dev/hda bs=512 count=1 of=filename // saves first sector (the MBR) to a file
vi editor micro-tutorial: having not been raised with unix, i find using vi to be extremely frustrating so I avoid it where possible. It is often required in an emergency/resuce boot to edit config files, and often the only editor available will be vi. Here is everything you need to know to do basic editing with vi --
1) invoke it with vi filename
2) get to the spot you need to edit using regular arrow/pgup/pgdown keys
3) enter insert mode by pressing the i key (screen will say "INSERT MODE" somewhere)
4) delete anything you need to delete with the del key, insert any new text just by typing normally
5) hit the esc key to leave Insert mode
6) type colon w (:w) to write the file
7) type colon q (:q) to quit
To get a list of PCI devices, along with their "friendly" name enter:
lspci
Dump out the kernel messages:
dmesg
To start many/most services, there is a script, e.g. to start the samba server (also works for smbd and presumbably a whole bunch of others, e.g. httpd):
/etc/rc.d/init.d/smb start
The Samba config file is in /etc/samba/smb.conf Need to edit up top to allow whatever range of IP addresses access, and also to create any shares you may want.
This one thing constantly baffles me, how to do the equivalent of the ms-dos "dir /s" (recursively search) command. So here it is, i had to look it up in a book! (note that patterns, in this example *.c, must be enclosed in single quotes):
find directory -name '*.c' -print
To produce a patch file from differences
diff --unified --recursive --new-file originalfile newfile
patch -p1 patchfile
In the past several years, i have only installed RedHat distributions (v7, v8, v9, and now the Fedora Core 3). The installation scheme is heavily distribution dependent. I have had very bad luck with burning CDs, causing funky troubles that seemingly eat up hours of time, so now whenever possible I do hard disk installations -- newer RedHats (8 and up?) hard disk installs install directly from the .iso images, and actually require the .iso image files.
Mauriat Miranda has an excellent guide, with specific info for FC3 and FC4.
To install linux, I typically boot off of a RedHat boot CD (or installation boot floppy), but want to install from .iso images already on the system's hard disk on a fat32 partition. To do so, just type "linux askmethod" at the prompt. One drawback to the hard disk install method is the GUI install interface isn't available. I never choose auto-partition, rather I have a pre-existing partition I've already made with something like Ranish Partition manager (I am partial to /dev/hda8). Anyway, I used disk druid and mount the root ("/") partition onto /dev/hda8. I then choose not to allow linux to do anything with the boot, rather i make a floppy so I can boot the first time and then subsequently boot by copying the kernel to a fat partition and use either linld.com or loadlin.exe (see section, below).
Redhat Kickstart installation: Somehow, create or otherwise obtain a kickstart file (look for anacondaxxxxks.cfg) and edit it to your liking. Then to kickstart from floppy simply say "linux ks=floppy" where you've saved the file named ks.cfg on, and inserted a floppy into your floppy drive 0. The more general command is
linux ks=hd:hda1/pathname/kickstart_filename
where, for example, the kickstart file is on the first partition of your primary master hard drive. The installation command line can have additional stuff, e.g. to force installation to ask the install method and kickstart the floppy you would say "linux askmethod ks=floppy".
GRUB: I have up until now resisted using the bootloader (e.g. LILO, now GRUB) because i am paranoid about messing with my MBR, but gave it a try. I let GRUB replace the hard disk's MBR. If anything goes wrong, I just boot DOS and do a "fdisk /mbr" -- which puts back the default microsoft boot loader
Sample /boot/grub/grub.conf file:
# grub.conf generated by anaconda default=0 timeout=5 splashimage=(hd0,4)/boot/grub/splash.xpm.gz hiddenmenu title fEDora Core (2.6.9-1.667) root (hd0,4) kernel /boot/vmlinuz-2.6.9-1.667 ro root=LABEL=/ rhgb quiet initrd /boot/initrd-2.6.9-1.667.img title Other rootnoverify (hd0,0) chainloader +1
As an alternative, or even in addition to, Linux can be booted from a plain-DOS system using either of two loaders: LINLD.com or LOADLIN.exe . Current versions are v.97 and 1.6c, respectively.
Here is a sample incantation I use to get my Linux booted (remember you only need one or the other):
loadlin vmlinuz initrd=initrd.img root=/dev/hda5 ro rhgb linld image=vmlinuz initrd=initrd.img "cl=ro root=/dev/hda5 rhgb"
One thing that I need to do that makes Linux so flexible is the relatively wide range of file systems it will work with. In my scenario I need to mount FAT32, NTFS, and SMB (windows file shares on my LAN). The NTFS requires some special stuff (i think there is kernel support for it but it's turned off by default and it's considered experimental).
FAT32 (or FAT for that matter), just go ahead and mount it!
mkdir /mnt/drive_c mount /dev/hda1 /mnt/drive_c
NTFS -- Beginning with Fedora Core 6, the linux-ntfs kernel driver is no longer in use, they suggest using the ntfs-3g project which I installed simply with (this worked without messing with any repositories or anything else. much more info here): [not sure about the umask=0222 business that I had needed in FC4 when mounting with the linux-ntfs driver...it was needed when sharing with samba] [also, mjmwired shows how to use some kernel module directly from fedora extras]
yum install ntfs-3g ...and then to mount... mount -t ntfs-3g /dev/hda7 /mnt/biggie
Earlier versions of redhat/fedora: I had successfully used the "captive-ntfs" package in the past (Redhat 9) but the Linux-NTFS Sourceforge Project is easier, and had FC3 binaries. Just get the binary and rpm it. The project's new home page is http://www.linux-ntfs.org/ , downloads are on sourceforge. There tends to be exact matching binary rpms.
SMB (aka Samba, aka the kind of file sharing that Windows supports):
Just be sure Samba support is installed, look for the smbmount command. If not there do something like "rpm -U samba*". Breaking news: when I updated to Fedora core 6 in Jan 2007 the smbmount command was missing, so now must do "mount -t cifs" or "mount.cifs" instead of smbmount.
smbmount //RemoteComputerName/ShareName /mnt/mountpoint ...or if smbmount missing, try ... mount -t cifs //RemoteComputerName/ShareName /mnt/mountpoint
Installed from a FC4 distribution DVD that I downloaded and
burned (with my newish NEC dvd burner). The first time through, I
ran the media check and it passed, but wouldn't continue the
installation! (kept saying "insert media"?). Anyway I
restarted and re-ran but the graphical install failed saying
there wasn't enough space (not true!) so I finally just did a
plain old text install and it worked fine (despite errors about
bad signature on hard drive, to which an ignore worked fine). The
kenel is 2.6.11-1.1369_FC4. After installation i used their
package configurator to load "development tools", which
i had neglected during the initial install.
mount -t iso9660 /dev/cdrom /media/cdrom/
system-config-packages
or to use an iso image instead, just mount the directory
containing the iso as appropriate:
smbmount //ipaddress/m /mnt/smb
system-config-packages --isodir /mnt/smb
Then install the ntfs module:
rpm -ihv /path/to/kernel-module-ntfs-2.6.11-1.1369_FC4-2.1.22-0.rr.6.0.i686.rpm
Besides un-tarring geexbox, the only other thing i needed to
install was nasm:
rpm -ihv /mnt/smb/temp/fc4/nasm-0.98.39-1.i386.rpm
Booting went as expected, and normal linld or loadlin works fine,
as did grub (i let the installer put in grub, then I wiped it out
with a fdisk /mbr later).
April 9, 2005[Updated August 19, 2005 for the 0.98.6 release]: Various schemes exist. In particular I was interested in PXE, because that was supported in GeexBox, and ended up needing to go to Etherboot.org because my hardware didn't support PXE directly. There is yet another scheme called Netboot that seems an awful lot like Etherboot.
My client (e.g. the GeexBox box) hardware, a PC-Chip's Via based motherboard with a builtin Via Rhine network controller, included some inherent network booting in Bios. Unfortunately, it was some form of NetWare RPL and that didn't seem to fit into PXE so I abandoned that avenue -- though there is a linux rpld daemon so it may have worked after all.
Server side setup requires 2 or 3 components: a DHCP server, a TFTP server, and usually but not necessarily NFS sharing (required for Geexbox). My Fedora Core 3 build machine (and server) had neither a DHCP or TFTP server so I had to hunt around. NFS is already built in, but requires configuration. Additionally, the server needs to have another step to produce a boot image acceptable to etherboot.
DHCP Server: There is a binary package for Fedora on the updates site, dhcp-3.0.1-40_FC3 which can simply be rpm'ed. I Got the source tarball dhcp-3.0.2.tar.gz of ICS's DHCP, but got a compile error so I used dhcp-3.0.3b1 (which is odd because 3.0.2 is the release, and 3.0.3b1 is development but whatever). This untarred/compiled/installed/ran like a dream, just run: tar zxvf ;./configure;make;make install. Edit the conf file and launch dhcpd. Also, had to create an empty file called /var/state/dhcp/lease something. Here is my /etc/dhcp.conf file, which is modelled off of the GeexBox instructions for booting pxe::
ddns-update-style ad-hoc;
allow booting;
allow bootp;
subnet 10.1.1.0 netmask 255.255.255.0 {
range 10.1.1.194 10.1.1.198;
option subnet-mask 255.255.255.0;
option broadcast-address 10.1.1.255;
option domain-name-servers 10.1.1.101;
option routers 10.1.1.101;
next-server 10.1.1.100;
filename "/tftpboot/GEEXBOX/boot/etherboot.0";
}
TFTP server: The GeexBox uses PXELINUX, which suggests a couple of particular tftp servers, it must support the "tsize option", and apparently not all of them do. One of the is suggested using atftp by Jean-Pierre Lefebvre. The newest, atftp-0.7 gave me a compile error in the header file argz.h. Anyway, a little bit older version, atftp-0.6.2 compiled just fine (a standard ./configure; make; make install). At this point I couldn't figure out how to start it. The help suggested the --daemon command line option would do the trick but it wasn't running. It appears the "normal" way to run is via the inetd, a so-called super-server. I don't quite follow this but Fedora doesn't have that going by default but rather uses xinetd.
# To run aftpd, first create this file (/etc/xinetd.d/tftp-udp)
# not sure but may have to:
# chown nobody:nobody /tftpboot
# then, restart the xinetd:
# /etc/rc.d/init.d/xinet.d restart
# and now atftpd should get started up when any tftp traffic comes in
service tftp
{
id = tftp-udp
disable = no
socket_type = dgram
protocol = udp
wait = no
user = nobody
nice = 5
server = /usr/local/sbin/atftpd
server_args = -t 99999 /tftpboot
# add other server argument before the /tftpboot, the -t nnn is number of seconds of inactivity to terminate after.
# strangely (to me) the server was set to terminate every 5 minutes so i was always needing to restart it.
}
NFS setup: Everything needed is already in Fedora. See sample /etc/exports file:
# Sample /etc/exports file. After changing here, you must run # exportfs -r # to to have the changes reflected (and maybe restart nfs?) # /etc/init/d/nfs stop,start,restart? # # note that format is # sharename access(options) # where i am using * as a wildcard for any IP # # to use a share from another connected linux computer: # mount -t nfs <IPaddr>:/tmp <mountpoint> # /tftpboot/GEEXBOX/ *(ro) /tmp 10.1.1.0/24(ro)
Make the boot image: If you receive the message "error: not a valid image Unable to load file" on the client when etherboot tries to load it's image, it is because you skipped this step. Since the boot image I wanted was PXE (e.g. pxelinux.0), but I was booting with etherboot, i needed the mknbi (as in MaKe Network Boot Image. I got v1.4.4) package, as was explained in this thread. The package untarred and built just fine. Note that you do not need the etherboot package at all, mknbi is a seperate package in the etherboot project.
mkelf-linux -append="boot parameters" /path/vmlinuz /path/initrd.gz > EtherbootableImage
Here is my (really long) actual command, my nfs server is 10.1.1.100, my tftp directory is /tftpboot, and I have already copied the whole GEEXBOX tree to the /tftpboot directory.
mkelf-linux -append="initrd=initrd.gz root=/dev/ram0 rw init=linuxrc boot=nfs splash=silent vga=0x315 video=vesafb:ywrap,mtrr nfsroot=192.168.1.100:/tftpboot/GEEXBOX" /tftpboot/GEEXBOX/boot/vmlinuz /tftpboot/GEEXBOX/boot/initrd.gz > /tftpboot/GEEXBOX/boot/etherboot.0
I made my boot image from the output of a build/compile from sources -- if you are looking to netboot from the generator, see thread net boot with 0.98.6. Here is a script I made up to simplify putting out a custom-built GeeXbox, called makeEtherboot. Some trick that took me awhile to solve were finding the right stuff under build (it is a combination of iso with the addition of the boot directory under ziso), and needing to restart nfs (I think because of the way i was using GEEXBOX as a link, it was producing a security violation under certain circumstances, like when the version changed). Note that with this netboot scheme you can't get a boot menu, you either generate a debug image, or a regular image:
#!/bin/sh # This is script makeEtherboot # run this AFTER doing a successfull "make pxe" TFTP=/tftpboot VER=0.98.6 rm -rf $TFTP/GEEXBOX-$VER rm $TFTP/GEEXBOX SOURCE=/usr/local/src/geexbox-$VER/geexbox-pxe/GEEXBOX.i386 mkelf-linux -append="initrd=initrd.gz root=/dev/ram0 rw init=linuxrc boot=nfs debugging splash=0 vga=0x315 video=vesafb:ywrap,mtrr nfsroot=10.1.1.100:/tftpboot/GEEXBOX" $SOURCE/boot/vmlinuz $SOURCE/boot/initrd.gz > $SOURCE/boot/etherboot.0 mkelf-linux -append="initrd=initrd.gz root=/dev/ram0 rw init=linuxrc boot=nfs splash=silent vga=0x315 video=vesafb:ywrap,mtrr nfsroot=10.1.1.100:/tftpboot/GEEXBOX" $SOURCE/boot/vmlinuz $SOURCE/boot/initrd.gz > $SOURCE/boot/etherboot.0NOD cp -r $SOURCE $TFTP mv $TFTP/GEEXBOX.i386 $TFTP/GEEXBOX-$VER ln -s $TFTP/GEEXBOX-$VER $TFTP/GEEXBOX # cp $TFTP/extra-codecs-nonfree/* $TFTP/GEEXBOX/codecs/ # Need to restart NFS cuz of changes in link to GEEXBOX (otherwise get access denied?) /etc/init.d/nfs restart |
Client Setup: I got the Etherboot image from the rom-o-matic.net's latest, 5.4.0. I selected "via-rhine:dlink-530tx-[0x1106,0x3065]" since that id matched what lspci said my builtin network adapter was, and chose the "bootable floppy image". I used linux to do a direct write to a floppy as noted on that page (could have also used rawrite in dos).
At this point, the client will boot off the floppy, and by default access the network card and try to boot. First by getting the boot info from DHCP, and using that info to point at the tftp-accessible etherboot image. The image, in our case, then uses and nfs share to complete the boot up. This all works, much to my suprise.
RPL info for historical purposes, this is what my PC does on a net boot:
Novell NetWare Ready Firmware v1.00
...analyzing network, OK
then RPL this and that... and here is packet sent by the novell
code, it is sent quite a few times (maybe for 2 minutes)
once every two seconds:
00:0a:e6:dc:67:7a > 03:00:02:00:00:00 sap fc ui/C len=83 0x0000: 0300 0200 0000 000a e6dc 677a 0056 fcfc ..........gz.V.. 0x0010: 0300 5300 0100 0840 0300 0000 0000 1000 ..S....@........ 0x0020: 0800 0640 0905 ea00 0640 0a00 0100 0a40 ...@.....@.....@ 0x0030: 0600 0ae6 dc67 7a00 0540 07fc 0028 0004 .....gz..@...(.. 0x0040: 0024 c005 0800 fc01 0074 0000 4227 0240 .$.......t..B'.@ 0x0050: 0100 0000 0000 0000 5342 4645 544f 4449 ........SBFETODI
see this webpage about Linux and RPL:
I wanted to test to make sure that I could play DVD's from my DVD-ROM drive and also be sure that the audio stuff was working. I was testing it on my Fry's P4 Cheapie system, with Fedora Core 3. I tried the rpm at FreshRPMS.net but it failed with several dependencies, some weird ones like libaa, but also libcss which i don't understand because you should be able to install xine without css (you just wouldn't be able to play DVDs). Anyways, i ended up at the "Daily xine RPMS" site. Everything here worked fine with good instructions (theirs say to do a -U, -ihv should work i think), install the Xine Library/engine, User Interface, and finally the CSS library (to playDVD's):
rpm -ihv libxine1-1.0cvs-050101.i686.rpm rpm -ihv xine-ui-0.99.3cvs-050131.i586.rpm rpm -ihv libdvdcss-1.2.8-2.network.i386.rpm ln -s /dev/hdc /dev/dvd # hdparm -d1 /dev/hdc // i didn't do this, worked fine
Anyway, this all seemed to work just fine, video and audio. The only thing i can't do is TV-out since my graphics card doesn't support that in Linux (ATI Rage Pro)
This seems to be the one of the more popular players, and it is used by Geexbox, so it seems like a no-brainer that I would want to also compile this for Fedora, as well. The latest stable version which also happens to be the same as geexbox is using is MPlayer-1.0pre7 -- get it and skins, extra codecs, etc from the MPlayerhq download page.
I basically followed MPlayer - Fedora Guide which had a lot of juicy tidbits that helped me get going.
Step One: Before compiling MPlayer, get/install these libraries (i got them from the Fedora download server, i think this is same as what's on the cd's):
rpm -ihv glib-1.2.10-15.i386.rpm rpm -ihv gtk+-1.2.10-33.i386.rpm rpm -ihv glib-devel-1.2.10-15.i386.rpm rpm -ihv gtk+-devel-1.2.10-33.i386.rpmbzip2 -cd MPlayer-1.0pre7.tar.bz2 | tar xvf - cd MPlayer-1.0pre7/ ./configure --enable-gui --enable-largefiles --enable-menu --prefix=/usr --confdir=/etc/mplayer --cc=gcc32 make make install
UPDATED Sept 29, 2005: Wanted to be able to decode RealAudio. Here is from mplayerhq:
Win32 codecs: If you plan to use MPlayer on x86 architecture, you will possibly need them. Download a codec package from our codecs page [I got the "Windows essential"] and put the codecs in /usr/local/lib/codecs BEFORE compiling MPlayer, otherwise no Win32 support will be compiled!
Since I had already compiled, to get this to go I had to re-run
./configure, make, and make install.
Now can play, as -playlist, the sample RealAudio8 and G2
just fine. e.g.:
mplayer -playlist http://service.real.com/learnnav/testrams/bisdnrealaudio8.ram...or... noting that the contents of the .ram is just a link to rtsp:// something, can equivalently do:mplayer rtsp://media.real.com/showcase/service/samples/bisdnrealaudio8.rm
Note that if you try to play what ought to be a playlist as a file (e.g. you forgot to prefix it with -playlist), you will get an error like: "Win32 LoadLibrary failed to load: avisynth.dll..." just after the cache fill message.
By way of preface, there are new (updated) binary kernels that can simply be rpm -i'ed. Look at the updates, for example on April 2005 there is kernel-2.6.10-1.770_FC3.i686.rpm
This always seems to be a struggle. The first thing I discovered is that kernel-source package is not included in the FC3 distribution. I stumbled onto this page, "Compile a kernel for FC3", which did have a link to where the kernel source was on Redhat's Fedora download site site: kernel-2.6.9-1.667.src.rpm There are newer source kernels on their update site, but i figured I would stick to the basics :-)
rpm -ivh kernel-2.6.9-1.667.src.rpm rpmbuild -bp --target=noarch /usr/src/redhat/SPECS/kernel-2.6.spec
make clean | mrproper // neither needed if first time, mrproper cleans more make config | oldconfig | menuconfig | xconfig // not needed if just want to use stock .config make all // or bzImage if just want kernel make modules_install mkinitrd ./initrd-2.6.9-prep 2.6.9-prep //-prep is specified by Makefile "Extraversion" setting near top of makefile
now Finally, copy arch/i386/bzImage and the initrd file to somewhere that LINLD can get at them (to a dos partition), and reboot using the newly created kernel and initrd. I'm not really clear on what exactly the "make install" does -- it copies some stuff to your /boot directory and makes some links, and also updates the grub.conf... I didn't use it, prefering to do it "by hand" and then used Linld anyway so I didn't need the grub stuff. It is also unclear to me what role the System.map file plays. I ignored it, and everything seemed to work fine.
There is info in the FC3 release notes about how there is no more kernel-source-xyz package, also some quick instructions on how to build the kernel, and the rpmbuild command.
To install yum, the "yellowdog update manager" (from
the loop-mounted .iso):
rpm -ihv /mnt/iso/Fedora/RPMS/yum-2.3.2-7.noarch.rpm
Once installed, you can theoretically install whatever you
want without worrying about depencies, because yum will
automatically resolve them and offer to install whatever else is
needed.
| Some old
info -- not sure what this does, or whether it is needed
-- i never did this on FC4 and everything seemed fine? Did yum, when trying to actually install a package it complained that i didn't have a key or something, maybe this will help: Install the gpg public key used to verify the signature of Fedora RPM packages rpm --import /usr/share/doc/fedora-release-3/RPM-GPG-KEY* |
Source packages have a name like packagename-version.src.rpm
-- versus binary packages that have names like packagename-version.i386.rpm
(where i386 is a particular architecture). A source package is
installed with the rpm command. When installing a source
package, whatever source files (along with any necessary patches
will get dumped (unless otherwise specified by the package?) into
the path: /usr/src/redhat/SOURCES/ and also the file /usr/src/redhat/SPECS/packagename.spec
will be created. In order to actually use the package, of course,
it must be compiled and installed with the rpmbuild command. So
it is a two step process:
rpm -ihv path/packagename-version.src.rpm
rpmbuild -ba /usr/src/redhat/SPECS/packagename.spec
My Fedora Core 3 installation came with Samba 3.??? installed.
To share files, first edit /etc/samba/smb.conf. To get a basic thing going, I just changed the allow list to permit any IP on my LAN, and setup a public file share. This was enough to allow other linux boxes (i.e. GeexBox) to connect and share the files but when I tried to access the share from a windows box, all I got was either "access is denied" (from net view //name) or if I tried to access //name from explorer it would pop up a security box and nothing seemed to work (not even root and password). Anyway, the magic here was to change a line in smb.conf -- it originally said security = user, it wants to be security = share. Then Windows as well as Linux boxes could access it. To start the service just do:
/etc/init.d/smb start
Alternately, you can launch a GUI in lieu of editing smb.conf and manually starting/stopping smb:
system-configure-samba
Another little snag I hit when trying to share out an ntfs mounted (with the kernel driver) -- you MUST specify the umask (thanks to MJM guides) when mounting the ntfs partition, otherwise the share will be inaccessible:
mount -t ntfs -r -o umask=0222 /dev/hda7 /ntfsmount
To go the other way, and mount external file shares in linux (e.g. a windows file share) just use (I found in Geexbox, the share name and mountpoint were surrounded by doublequotes, and the name SHARE was the default username with a blank password):
smbmount //computer/share /mountpoint [-o ro [, username=SHARE password=]]
Breaking news: when I updated to Fedora core 6 in Jan 2007 the smbmount command was missing, so now must do "mount -t cifs" or "mount.cifs" instead of smbmount.
mount -t cifs //RemoteComputerName/ShareName /mnt/mountpoint
This card uses a Ralink rt2500 chipset. Dave purchased it
explicitly in order to do "WiFime"
with Nintendo DS (but only under windows, with Tim Schuerewegen's
driver
), then you use something called the wireless multi boot
application ("wmb". Also windows only) to transmit
whatever out to the DS.
This page has a big list
of rt2500 cards.
I briefly also had a rt2600-based Airlink101 (fry's, $20) AWLH5025
-- it worked great signal-sensitivity-wise. I only tried it under
XP, not sure about linux.
The linux driver is from serialmonkey
website. I had some problems trying to compile the latest non-beta
driver which i guess is pretty old. But happily, the Latest
BETA rt2500 driver: v1.1.0-b3 built all according to the
directions. I had to install the kernel-devel-2.6.11-1.1369_FC4
package, which puts headers into the folder /usr/src/kernels/2.6.11-1.1369_FC4-i686/,
and also makes links between it and /lib/modules/2.6.11-1.1369_FC4/source
and build. None of which i needed to know in order to do the make
(it figured it out on it's own).
Other random notes: I didn't build the utility, it needs qmake so
I didn't even try to work that out. Also, there is a so-called rt2x00
driver which is several chipsets rolled into one driver -- i didn't
do anything with that. This card works out-of-the-box (no
compiling necessary) with Geexbox (I tried version 0.98.7)
because it has the rt2500 driver in the release.
the device will be known as wlan0 (not ra0), and the install puts
an alias into /etc/modules.conf
A couple of configuration files will need to be created (this is
all laid out in the README file):
| Create the file /etc/Wireless/RT2500STA/RT2500STA.dat |
| [Default] CountryRegion=0 WirelessMode=0 TXBurst=0 TurboRate=0 BGProtection=0 ShortSlot=0 TxRate=0 PSMode=CAM SSID=mymot NetworkType=Infra Channel=11 AuthMode=OPEN EncrypType=WEP DefaultKeyID=1 #Key1Type=0 Key1Str=nnnnnnnnnn #Key2Type=0 |
| Sample /etc/sysconfig/network-scripts/ifcfg-eth0 |
Create /etc/sysconfig/network-scripts/ifcfg-wlan0 |
| DEVICE=eth0 BOOTPROTO=none BROADCAST=10.1.1.255 HWADDR=00:0A:E6:DC:67:7A IPADDR=10.1.1.102 NETMASK=255.255.255.0 NETWORK=10.1.1.0 ONBOOT=yes TYPE=Ethernet GATEWAY=10.1.1.101 |
DEVICE=wlan0 BOOTPROTO=none # or BOOTPROTO=dhcp BROADCAST=10.1.1.255 IPADDR=10.1.1.142 NETMASK=255.255.255.0 NETWORK=10.1.1.0 ONBOOT=no TYPE=Ethernet GATEWAY=10.1.1.101 |
To bring the wireless up, simply do a: ifup wlan0
An iwconfig command should now show the MAC address of the access
point wlan0 is associated with.
For some reason, i cannot bring the interface up more than once
-- i.e. if I bring it down and then back up again, it is will not
be associated -- this will just have to be a mystery for now!
Info from XP's device manager:
- D-Link Air DWL-520 Wireless PCI Adapter(rev E.)
- PCI\VEN_1260&DEV_3873&SUBSYS_37001186&REV_01
- also CC_028000 and CC_0280 (same key is also in Linksys' entry)
- MAC 00-0D-88-58-96-F0
This card was purchased at Fry's Electronics for $5 after rebate. It came with a stubby, 3", antenna. The Linksys's antenna is longer, at about 5", and works better as measured by signal strength on both the D-Link and Linksys card.
According to D-Link's website, their card is supported by the Linux-wan project: http://linux-wlan.org/ and according to linux-wlan.org's h/w list, this board is compatible and the chipset is "Prism3 SSF". The ftp site is ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/ , I downloaded the tarball for "pre25" version of wlan-ng and built kernel just fine following the readme instructions. After the executable was built, here are the commands that I used to get adapter up and running:
#!/bin/sh modprobe prism2_pci wlanctl-ng wlan0 lnxreq_ifstate ifstate=enable wlanctl-ng wlan0 lnxreq_autojoin ssid=easy8 authtype=opensystem ifconfig wlan0 192.168.0.50 netmask 255.255.255.0 broadcast 192.168.0.255 route add default gw 192.168.0.1
I never got around to figuring out how/where to stick these commands in so that it would loadup by itself on boot. By the way, the wlan-ng package does not play with the standard iwconfig commands.
Info from XP's device manager:
- Instant Wireless PCI Card V2.7
- PCI\VEN_14E4&DEV_4301&SUBSYS_43011737&REV_02
- also CC_028000 and CC_0280 (same key is also in Linksys' entry)
- MAC 00-06-25-21-F5-3D
I got this card practically for free at a yard sale. In XP I noticed that I could not complete any large file transfers from my Tivo. After about 5 minutes into any large transfer, it would say "connection unavailable", and at this point it appeared i had to reboot to get the connection back. I swapped in the D-Link card and everything worked fine with that one.
From:ftp://ftp.linux-wlan.org/pub/linux-wlan-ng/FAQ "NOTE:
The Linksys WMP11 v2.7 is NOT prism-based, and
thus not supported by this driver." According to their h/w
list the chipset is listed simply as "broadcom". So far
I can't find any Linux support for this card. "lspci"
command says chip is Broadcom 4303 (rev 02). There is still no
support from linksys/Broadcom, see online petition. :-(
I got this card from newegg sometime in 2005 (or 2006?), it was very cheap after rebate which took a while to come but eventually did. (I'm thinking it was like $20 minus $15 rebate). This is an 11mbit wireless USB (1.1) adapter. The attraction is that it works on my tivo, so it must have a linux driver. It did in fact work just fine with my tivo. According to this, it is an atmel at76c503a device, there are as many a couple of driver projects: at76c503a, atmelwlan, (what about prism?). The ver 2.6 business is important because various versions of this model use different chipsets.
[this doesn't have anything in particular to do with linux, but I'm just parking it here] Motorola WR850G Wireless Router and WA840G Wireless access point. ($8 each, after MIR at some sort of super-duper sale at CompUSA March 6, 2005).
The access point has something they call client bridge mode but I can't figure out what that is, really. I want to use the access point like a "game adapter". I got it to function in WDS (see this orinoco tech bulletin for more info) mode. To enable WDS, just select it and also select "restrict MAC" mode and put the other station's mac into the list -- do that on all WDS stations (i.e. both the router and access point). Also interesting, and key to the way WDS works in allowing wireless bridging is that it uses a 4-address format, rather than the usual client-AP scheme of 3-addresses (source MAC, AP MAC, bssid). The additional address is the transmitter's MAC, and allows for true(?my term) bridging -- see this thread.
The bad news is I am getting very low data throughput -- only about 8mbs and this is with a client wired each. not sure why it's so low. From a packet bandwidth point of view, the data is only moving through the air once. For example, in the above-mentioned Orinoco tech bulletin they did some tests and i am using what they called "scenario 1. Both clients wired connected to each AP". They got about 4mbs on a 802.11b, so I would expect something like 25mbs for 802.11g if everything was working properly. Setting short preamble, and frame bursting -- these are potentially non-standard settings, that potentially enhance performance -- didn't seem to help much if at all. Also tried G only mode versus the default B/G compatibility mode with little effect.
There is a forum that discusses Mot hardware/firmware at dslreports.com that has interesting info, there is a faq there that has links to the other/older firmwares. There is supposedly a huge new firmware for the WR850G (and supposedly will also work on WA840G), referred to as version 6.xx. It's been coming out real soon now for like 3 months, and they keep saying early march.
FCC lookup an FCCID, fccid is ACQWR850GV2 and ACQWA840GV2. There is lots of info here including detailed picutures of inside and outside of units. Also apparently the mot's insides are the same as a Linksys WRT-xxx, such that the OpenWRT project has firmware that works on the , they also have a WR850G info page that lists details of its insides, e.g. "WR850G v2 is based on the Broadcom 4712 board. It has a 200MHz CPU, 4Mb flash and 32Mb SDRAM (but only 16Mb enabled)."
There is a hidden web page to access a root shell, it is referred to as an "Easter Egg: Root Shell" http://10.1.1.1/frame_debug.asp There are also a bunch of security flaws in the current 5.12 (and 13) series firmware, see e.g. WR850G Authentication Circumvention on Bugtraq.
| This happened to me on 4/2/2005: My
WA840G lost its mind I have a router/AP pair set up in WDS mode. Everything was fine for a couple of weeks. Today I turned everything on and the AP is gone missing. A site survey indicates a new (another?) SSID on the channel i was using, 11 the default. My first reaction was to jump to the conclusion that a neighbor set up a new mot wireless router or AP and the defaults were conflicting with mine. Well, no. As it turns out my AP had done a complete, total, absolute reset of itself back to factory defaults AND a DIFFERENT MAC address. Wha??? After wiring up to the AP at the default IP address and putting back all my settings everything works. (of course i had to put the "new" mac address into the router's wds list). How can this be? A full reset (not that anyone did that anyways) shouldn't give a new mac address anyways -- should it? By the way, the new MAC address is 00-0C-10-21-32-01. These routers/aps normally have a prefix of 00-0C-E5. The 00-0C-10 is said to belong to a PNI Corporation, not Mot (possibly PNI makes a part that's inside my AP?) Anyways, this is all too wierd. |
| Motorola WR850G Router | Factory default | Current Setting |
| IP / Mask | 192.168.10.1 / 255.255.255.0 | 10.1.1.1 / 255.255.255.0 |
| Administrator login | admin/motorola | admin/******* |
| Wireless MAC | 00:0C:E5:54:53:6E | |
| LAN MAC | 00:0C:E5:54:53:6F | |
| S/N | 14570143365012000100 | Unit's printed MAC 000CE5545370 |
| FCC ID | ACQWR850GV2 | Sticker says model is WR850G but in lower right hand corner, it says IC109X-WR850GV3, it is a black case with non-removable antenna |
| PN | 498417-001-00 | Sticker says model is "WR850G" but also says IC109X-WR850GV3, it is a black case with non-removable antenna |
| Purchased | 3/7/2005 CompUSA | Hardware warrantee is 2 years. |
| Motorola WA840G AP | Factory default | Current Setting |
| IP / Mask | 192.168.40.1 / 255.255.255.0 | 10.1.1.251 / 255.255.255.0 |
| Administrator login | admin/motorola | admin/******* |
| Wireless MAC | 00:0C:E5:4B:00:58 | 00:0C:10:21:32:01 |
| LAN MAC | 00:0C:E5:4B:00:59 | 00:0C:10:21:32:02 |
| S/N | 1345014109127000100 | Unit's printed MAC 000CE54B0058. |
| FCC ID | ACQWA840GV2 | |
| PN | 498420-001-00 | It is a black case with removable antenna |
| Purchased | 3/7/2005 CompUSA | Hardware warrantee is 2 years. |