TODO: talk about other people's vaio installs talk about all the nice loopback mounting learned talk about all the nice ramdisk mounting learned talk about all the nice playing with loadlin fix your fucking vaio asshole 6/30/02-7/1/02 Fucking diskless piece of shit. So I got a nice VAIO from Maggie for $20. It didn't work at all the first day I had it. Didn't even pretend to power up. Fuckit. I was going to give it back to her. Then I got it out to show Amy how it doesn't work... lo and behold it DOES in every conceivable way. SO! Laptop I have. This is about my adventures in installing Debian on it... Here are it's specs: Pentium MMX 200MHz 32 MB ram 2.1 Gig HD Infrared port Internal 56k (win?)modem 1 USB port 1 PCMCIA slot ESS1879 Soundcard (yay ess!) Neomagic video card 800x600 LCD display It's Tiny ================================================= 1) Maggie, did you give me all the parts? Parts received for this VAIO include: 1 VAIO - PCG-505G 1 Battery 1 AC adapter/charger 1 Port replicator for serial/parallel/vga/kb/mouse Neither Floppy nor CD-ROM drive were to be had. When interrogated, Maggie claimed to never have more than the parts she gave me. So I would be installing linux onto a box with no real boot media. This was new territory. ================================================== 2) loadlin - your friendly gay neighbor who could kick your ass I had heard about loadlin from various linux install things. Mostly in reference to "Don't want to deal with LILO? Scared of 'dual booting'? Try loadlin, the worthless window pansy's best friend." It turns out that loadlin is a pretty hardcore fucker. What it essentially does is finds where DOS starts in your memory, and merrily replaces it with your Linux kernel and initial rootdisk of choice. Holla for Windows when this happens. This sounded useful in my quest. The documentation for it was very helpful. I pass it a kernel and an initrd and it would "do stuff" by loading the kernel, then the initrd into memory, then sending them off on their merry way with horrible doom to be committed. So I snagged one of the Slackware kernels as it suggested (just the base). Then I needed an initrd to play with. ============================================= 3) initrd - your ass in a box The documentation for initrd (wherever I found it) was also quite helpful. It described how to play with lots of initrd things (and suggested using something like slackware's base install to go straight to a semiworking system). So I did many of the things it said. I essentially learned two things from it: The initrd is really a tiny root filesystem. Therefore you put a really tiny linux system on it and it will GOOOOOOOO. I really really wanted to get tomsrtbt in there to play around, but that got frustrating after awhile (though hindsight is now telling me that would probably have been the best option somehow). So after playing with the slackware thing for awhile and becoming (stupidly) confident that I could make something go myself, I tackled my big stupid idea: ============================================== 4) debian - the install that oughtn't be put in an initrd Debian has a really nicely wrapped up concept of a network install. A 30-odd meg ISO can be used to not only install all the shit you need, but also put enough stuff on your new install to be useful if the network bits fail. This seemed GOOD! GOOOOD!!! So into it I tore. To begin with, I couldn't figure out how the hell it booted. In the end, I chalked this up to not knowing shit about eltorito CD-ROM booting things. This turned out to be correct, if not also sad. So I went further, taking the idea of a basic boot disk. What would be wrong with taking Debian's root disk and putting the whole debian/ filestructure in it as the installation tree? Well, nothing much as it turns out, except that I should have really fucking read somewhere how the debian install WORKS. Turns out the debian tree is HUGE. This isn't surprising since in addition to having WAY TOO MANY DRIVERS for my very specific laptop, it had about 7 different floppy images waiting for me to write to floppies to boot from, dos utilities like loadlin (our friend!) to start the installation from windows,etc. etc. These things were UNNECESSARY AND TO BE DESTROYED!!!!!!!!! To I took out the documentation (yay!) painfully untarred and deleted and retarred the drivers.tgz file (5 megs down to 300k? WOOHAH!), then deleted the two images-* directories. This turned out to be my booboo. ================================================== 5) going through with it and why i shouldn't have So I made my initrd using a loopback device. Gzipped it to make it go across the network nicely. Downloaded it to my laptop. Rebooted into DOS mode. Ran loadlin on it and... WHEEE!!!!! Debian install screen comes!!!!! Then the fear set in. How could this possibly work? I don't know what I'm doing at all! Better test it elsewhere, first. But of course, I didn't really want to take the time to find/make a testbed, and a girlfriend repeatedly saying "Don't be a wuss, just do it!" is a good way to get shit rollin'. So shit rolled. :) All of the initial stuff worked great. Selected keyboard, partitioned hard drive, mounted partitions. Time to get the distro installed! Let's hit it!!! Selected local for the installation. It said "i don't know where you mean. tell me of this directory with my tree!". So I said "/" and it said "OKAY! Now tell to me where is the images-1.44/rescue.bin?" And I cried. And I am still crying. Such silliness that THAT is what I needed. Feeling gypped, I spent much time and suffering pretending to be a Debian installer, copying files around, untarring things, attempting in vain to set up PCMCIA so I could get my network to work and recover from my horrible oversight in NOT LOOKING UP THE DEBIAN INSTALL PROCESS. But to no avail. Far after being defeated, I catted a binary to the terminal, found I couldn't reset (and therefore could read nothing), and turned off the laptop. Now I get a nice "Missing Operating System" message. ============================================ 6) 44-40 pin convertors and ME or How I talked someone into lending me a VAIO CDROM Tomorrow I start this phase of the install process. Since my (\/)4|) R337 skillz have failed me, I am going to either take the HD out and install it from another computer, or borrow a CDROM and boot and install from that. But I WILL test my initrd somehow and perhaps I will find that I can still be cool even if I failed miserably the first time. I put the rescue.bin in there and maybe it's not too huge of an image. Maybe. 44-40 pin convertors and ME! Dan had himself an (easily breakable) appropriate convertor. So I set out to dismantly the VAIO and place its hard drive in another computer to install. Looking up how to take a vaio apart online can be annoying. I'll tell you how to do it, here!! : 1) Take the battery off. 2) Take a flathead screwdriver to the purple caps on the INSIDE part of the battery holder. Pop them off by pushing them towards each other. 3) Turn the Vaio on its head. There are 8 screws (smaaallll!) to remove, 4 each of two sizes. The larger ones are on the corners. The smaller on the sides. Ignore the screw holding in the little plastic door to the bottom of the case. 4) Now that your screws are out, turn the Vaio back over, carefully open the LCD, and lift the top half of the body cover (keyboard and all) just a bit. Right inside you will see a little ribbon cable for the touchpad. Pry up the tab holding it in (carefully) from both sides. Now you can swing the cover back and rest it on the LCD. 5) Getting the harddrive out: Two more screws and a fucking annoying set of wires that come over the HD rails stand in your way. Once they're dealt with, just detach the ribbon cable and you have yourself a free Vaio HD. Sounds easy, right? Well I'll be damned if the stupid screws wouldn't all come out. Two of them were stripped to high heaven and stuck tight. Much anger ensued. MUCH ANGER!!! I spent a long time trying to pry the thing open anyway, then trying to drill out the screws, then screaming and jumping up and down. In the end, my roommate from last year came over and with Mad Dissasembly Skillz, managed to extricate them. WHEE!!! Time to put it in another puter! [insert cursing about the power wire breaking and having to resolder it] So now the Vaio HD goes onto the 44 pin part of the 44-40 adapter, an IDE ribbon goes onto the 40 pin side, and power is applied via a power supply connection. [insert cursing and screaming about not detecting right because the adapter is really crappy and fickle and takes about 20 minutes to hook up properly]. Now. Using the other computer's magic abilities to BOOT from REMOVABLE MEDIA, install Debian on the Vaio. Make goddamned sure you're not installing it onto the computer itself. You want it on that little harddrive. (Hint: unless you disconnected your main HD to hook up the Vaio, /dev/hda is NOT FOR YOU!). Once you are through the base install and are instructed to reboot, you will want to do one very important thing. That thing is MAKE SURE LILO IS IN THE MBR OF THE VAIO DRIVE. I did this by replacing my main HD with the Vaio one for a time, booting from the install floppies and rerunning lilo. I'm sure there are other ways of accomplishing it, but this one was mine. :D Also important in this step is MAKING SURE /etc/fstab doesn't have you down as /dev/hdc? for any partitions. That is annoying as shit (and breaks everything, to boot). Now that you have a bootable HD with lots of toys, put it back in the Vaio, crank the sucker up, pop a linux-friendly PCMCIA ethernet card in the PCMCIA slot, and continue with the net install. What? You weren't doing a net install? Then I hope you installed all the necessary things while you had access to them. You basically need a working system with PCMCIA support and networking support so you can get out to the net and do HAPPY HAPPY THINGS like installing new software and upgrading your kernel. Yaie. Interesting note: as of kernel 2.4.18, all of the PCMCIA drivers are now scattered amongst the kernel config. So for those of us used to saying "Network devices? I don't NEED to stinking NETWORK DEVICES," we are kidding ourselves. Down at the bottom is PCMCIA network devices. Ugh. Umm.. what else? How about the specifics on the linux blah blah? okay! =========================================== 7) Softwarez There are lots of nice kernel things for you. 1) Sound - generic OSS-free sb driver will do. Yay for ESS. Make sure you pass it irq=5, because that's where it is, not that default irq-7-bothering-my-parallel-port shit. 2) USB - the generic uhci driver works 3) PCMCIA - cardbus driver. Don't forget to compile all the PCMCIA toys you will need. (Ethernet cards, modems, wireless cards, CF adapters...) 4) irda!!! :D 5) framebuffer!!! I'm currently using mode 771(decimal) which is 800x600@256. It is way prettier than the ugly default stretched 40x25. There are some good X things to know: 1) Neomagic is your card. That pretty much detects for itself. 2) 800x600 LCD. Just don't bother with anything else. NO 640x480 for YOU! 3) Your mouse is on /dev/psaux. Stupid touchpad thing. 4) For speed, you may want to use window managers like IceWM (good for WindowMaker fans because you can make it act almost exactly the same) or blackbox (it's purty because you can have all the colors you want. My last laptop only had 256 and blackbox can't handle low colors for POOP!!! What else? I'm sure I'll think of things I left out. Probably when something breaks and I go back to look at what I did to try and do it again and realize I forgot to put something important in. That sucks. ================================== 8) What about my stupid initrd? Well, I tried that when I installed it on the implanted hard drive. Loadlin didn't seem to like my latest attempt at an initrd. I didn't try very hard, though. :)