Jump to content






Photo
- - - - -

slackware 12 on sony vaio vgn-n250n - a love story

Posted by notKlaatu , 06 June 2008 · 156 views

slackware 12 on sony vaio vgn-n250n - a love story _________INSTALLATION ___________ So I downloaded and installed Slackware 12. First, I backed up the stuff I had on the computer just in case I screwed it all up. I didn't have much personal data on there, so it all fit onto one CD-RW. My harddrive was already partitioned, so I didn't have to do anything except define for the installation which partition I would be using. In my case, it is the /dev/sda1 partition. Linux also wants a SWAP partition; that is, a small partition for, what we in the Mac world would call Virtual Memory. I already had a swap partition, so I just pointed Slackware 12 to it. It is worth noting that I might have three distros of Linux running on my notebook but I only need one SWAP. I also have a tiny little partition at the front of my drive to serve just as the Master Boot Partition. This is where the boot loader exists, so that I can choose what partition I actually want to boot into. This is akin to holding the OPTION key down during starting Mac OS X and choosing whether one wants to boot into one partition or another, or into OS 9 back in the old OS X days. Other than these details, installation was as easy and friendly as installation on any system, minus the pretty graphics. __________SETTING UP X________________ The system was installed. I logged in as root and began setting up a GUI environment because I figured it’d be somthing easy that I could get out of the way quickly. Because of my NeXTbook project, I was really familiar with X11. And setting it up in Slackware 12 was, as expected, pretty easy. Compared to what I was having to do with my NeXT project, it was actually really easy. Slackware 12 includes a xorgsetup script that prompts the user for screen resolutions and refresh rates. Sony does not publish any of this information - I have read through all their documentation and can attest that it is nowhere on their site or in anything I received with the computer itself. To find it all out, I had to reboot into Ubuntu, look at the auto-detected settings that Ubuntu had generated, write those down, and enter them in as my set up in Slackware. Thanks, Sony. As I mention in my previous post, the “FINDER” post, in Mac OS X the Window Manager is quartzWM. I guess we would generally or flippantly call it Aqua. Anyway, whatever it’s called it generates and controls everything we see onscreen. If one tries to run X11 on the Mac, quartzWM does its best to control X11, and getting X11 away from quartzWM is a real trick (which I have figured out and will detail in the forthcoming NeXThack episode of The Bad Apples). We generally think of everything we see as THE DESKTOP or THE FINDER, but they are very separate programs; see my previous post for details. The Finder, proper, is the “File Manager” of OS X and simply gives us access to graphic representations of our files. There is a published hack to Quit the Finder and have no access to one’s files except through line commands in the Terminal. So, on my Slackbook my Window Manager is Fluxbox (which, unlike many window managers for linux, does not model itself at all after Wind0ze but is much more like NeXTstep). I have not configured a file manager for it yet, because I happen to know that I have many choices, so for now I will access my files via my xTerm (Terminal). __________WIRELESS CARD DRIVER_________ Now I had to install the wireless drivers. As I said above, I found that the drivers I needed were included on the Slackware DVD, as were some very clear and helpful instructions (much more helpful than Intel’s documentation included with the drivers). So I installed the drivers easily, without a hitch. Well almost: By now I was familiar with the usual Unix installation commands: % ./configure % make % make install Intel’s documentation told me to install the ipw3945d daemon by simply entering %make But that was wrong. I trusted them at first, and it didn’t work, so I went back and typed % make % make install And that worked. Otherwise, it all went smoothly. I rebooted to verify that the ipw3945abg card was really being recognized, and by reading the screen during bootup, I saw that everything was loading fine. Very exciting! But, strangely, when I tried to telnet into my freeshell account, nothing happened. Well, obviously my card was being recognized, but it wasn’t actually being used; it wasn’t on my LAN. Hm. _________GETTING NETWORKD_____________ I did a lot of research and found out that there were three commands relating to getting one’s networking device up and running. These are: % iwconfig # which is wireless-specific % ifconfig # which is for all network devices % modprobe # which loads a “module” into the kernel; in Mac terms, it would load an “Extension”. So I learned from a 2004 posting on a linux forum that once a wireless card driver is installed, all you need to do to bring it to life is to type this series of commands: % modprobe ipw3945 # which brings the module into the kernel. I know the name of the module is ipw3945 from the driver documentation % iwconfig eth1 essid XXXXX # assigns the card to a network; name is defined by me in the Airport Setup Utility % iwconfig eth1 channel 10 # because I set my Airport to be on Channel 10 % iwconfig eth1 key XXXXXXX # where key = the HEX code (or whatever) and NOT the ascii text I typed into my Airport Setup Utility. This, I discovered only after much poking around in the Airport software, in which there is a small, insignificant-seeming button that tells you “Oh, and by the way, if you’re not using an Apple you need to enter THIS code, not the passphrase you just created”. Oh. OK. % ifconfig eth1 up # to bring the network device up % dhcpcd eth1 # to receive the DHCP information from the wireless router. And this series of commands worked perfectly. I was suddenly online; I started the GUI, took a look at Firefox - and sure enough, everything was fine. I was ecstatic, and decided to take it one step further and create a shell script that would do all of those commands for me so that all I’d have to do is type one word. And so I did; I wrote a little script, made it executable: % chmod u+x ipwscript and tried it out. All I hade to do was type “ipwscript” and I was online in milliseconds. Well, at this point I pretty much figured I’d reached the pinnacle. Little did I know...... _____________ADD USER ACCOUNT______________ There’s a script program included with Slackware that prompts you as root to create a user account. I looked up in my Unix reference book to see if there was another way of doing this - I’m sure there is, but it doesn’t really matter. Obviously any usable Unix system is going to provide you a way to create a user account, so I just used the Slackware script. It made creating a user account very easy; as easy as doing it in Mac OS X except, again, without the graphics. To test everything out, I rebooted and logged in as user. X started up fine, but when I opened up Firefox, nothing happened; I was not online. So I typed in my magic script “ipwscript” and....again, nothing. Apparently the commands contained in my script were root-only commands. I struggled with the “sudoers” file in an attempt to give myself as User permission to initiate iwconfig, ifconfig, and modprobe — but it didn’t work. So I need to study “sudoers” permissions more. But in the meantime, I had the choice of either learning sudoers or just fixing the whole wireless problem altogether; obviously one shouldn’t have to type in those iwconfig commands (even if I did hack it down into a one-word trigger) if one doesn’t want to. So I did some research and discovered that what we Mac pros would call our “Login Items” is, in Linux, a collection of configuration and init files contained in the /etc/rc.d directory. ___________AUTOMATION________________ The /etc/rc.d directory contains two kinds of files. There are rc.XXXXXX files, and there are rc.XXXXXX.conf files. The conf files are what we edit, providing data that will be read by the rc.XXXXX files, which are basically scripts themselves and are executed during bootup. The first thing to do is to tell the computer that there is a wireless card in existance. To do this, add to /etc/rc.d/rc.modules this: /sbin/modprobe ipw3945 OK, that loaded the module or the Extension. The next thing to be loaded during bootup are the iwconfig The default /etc/rc.d/rc.wireless.conf looked like this: INFO="Any ESSID" ESSID="Any" ;; And so I changed it to read: INFO="Any ESSID" ESSID="XXXXXX" KEY=XXXXXXXXX ;; These changes essentially knocked out the need to do all of my iwconfig settings. So I rebooted and <Either I cannot spell or I am so unoriginal that I re-used a lame internet meme that has no value whatsoever to these forums and have been wordfiltered>ched as it booted. Everything seemed to be loading just fine. It was detecting the card, it was bringing it into the kernel....but when I tried to get online, it didn’t work. I typed: % iwconfig and looked at the results. It was all perfect; everything that was there when I was online was there now. So the problem had to be with the ifconfig and dhcpcd steps of my little getting-online command sequence. So I typed: % ifconfig eth1 up % dhcpcd eth1 and sure enough that brought me online. So, how to get THESE commands to occur automatically during boot? Further research was required, so I typed % ifconfig and compared the results of “ifconfig” while I was online to the results of it while I could not get online. Everything looked the same, except that when I couldn’t get online there was an entire line missing; this line contained the INET ADDR, the BCAST, and MASK. To fix this, I opened /etc/rc.d/rc.inet1.conf and - sure enough - noticed that the variables reserved for eth1 were all empty. So...... I plugged in the numbers for: IPADDR (ip address; not really sure if I need this because it’s overridden I think by DHCP but...whatever) NETMASK (the usual 255.255.255.0...whatever that means) and I changed USE_DHCP="" to read: USE_DHCP="yes" Save. Reboot. And I'm online automatically as Root and as User. It was a beautiful, wonderful thing.




Hi Klaatu,

Great podcasts! I've downloaded and listened to the 3 last ones, and I'll be downloading the rest soon... :)

I need to comment this last one about the installation of Slackware on your Vaio... I think you'll convince some people to try another distribution... ;) I don't own a laptop, and I almost always install linux on servers. I have been using linux on the desktop for about 13 years (yes, when linux was installed by floppies... many floppies ;)), and I couldn't believe that it was still so hard to install linux on the laptops, so I asked google. It return the following site which I highly recommend for laptop users:
http://www.linux-on-...s.com/sony.html

In this page you'll see plenty of current linux distributions with GUI installations that will detect ALL your hardware devices in vaios, and you won't need to install, much less compile any drivers. (compile drivers!!! in 2008!!! no more, please)

And in the following page, you'll find that Ubuntu 7.04 will install fine on your laptop:
http://www.freewebs....iovgnn250e.html

I honestly thank you for contributing to the linux community with your great podcasts, but I think we need to focus very seriously on "ease of use" to attract new users. I think we already have wonderful GUI tools that help us, and specially new users, to start using linux.

Another example I wanted you to know about: there's a great GUI tool for editing the /etc/fstab file: fwfstab, which is an open source gtk app developed by Diffingo.

I found this tool a few days ago when I was trying to write a tutorial for new users on editing the fstab to use ACL. A very old feature that it's not very popular (I don't know why), that allows linux users to have the ACL type features. Windows users had them in NTFS for a long time, and I find most useful to easily allow two different users, with different group ids, complete access to a folder.

Anyway, sorry for the length of the reply, and again, great podcast!

Pedro.
  • Report
Pedro-Thanks for the comment. Yeah, this post is pretty frightening, but actually it's an old, old post from my old wiki (now dead due to bad hosting). So this post was actually my very first install of Linux ever, and all things considered, it went well. I just think this contains good info on how linux works, so I keep the post around.I'm gonna re-do my Sony. Dual boot between Slackware and Fedora 9 (KDE 4 version), and I think I'll be happy. I imagine my Slackware install will be much smoother now that I've learned so much about Linux.Ubuntu works great on this Sony, as does Mandriva, and Knoppix, and....well pretty much everything I've thrown at it. I think it's the Centrino system; Intel has Linux drivers so everything works out of the box.Yep. Oh and thanks for listening to my podcast!
  • Report
Photo
mirrorshades
Jun 06 2008 09:41 PM
Wow, that's an insane amount of trackback spam!
  • Report

September 2014

S M T W T F S
 123456
78910111213
14151617181920
21 222324252627
282930    

Recent Entries

Recent Comments

Search My Blog

BinRev is hosted by the great people at Lunarpages!