Installing FreeBSD 5.2.1/6.1.0 on Dell Inspiron 700 m
This article details my experience in installing FreeBSD 5.2.1 on a Dell Inspiron 700 m.
UPDATE: Installed FreeBSD 6.1 -- It "just works" Haven't tried the wifi yet, though
UPDATE: Unless you have 2G RAM, and then the network kernel panics :-(
Because I tend to ramble, tell stories, and explain why I did what I did, and because all you really care about is doing whatever needs doing to make the damn thing work, I'll show things you really need to read like this:
|
It is hoped that others will find this article useful in their attempts to do the same or similar. As always, though, this advice comes with NO WARRANTY of any kind. If my advice leads you to doing something horrible to your computer, don't blame me. |
This article has virtually nothing to do with PHP, but is here because it fit better here than in my Music Advice articles.
I don't really have any use for the Windows XP Home Edition that came installed on my laptop, but Dell categorically refused to not install an OS. So I stuck with the cheapest one, being forced to buy software I didn't want, didn't need, and pretty much abhor.
So I figured if I paid for it, I might as well keep it. I guess it could be easier to convert my MiniDisks of original music to CD under Windows, right? (see below)
When you first start up your laptop, in addition to the incredibly annoying MacAfee popups that you CANNOT stop from appearing over and over and over without registering (Aaaargggh!) and the equally annoying Windows Update popups that keep insisting that you reboot your computer over and over and over, even though the update was an entirely non-critical bit of nothing, and the incredibly annoying popups for... (And they wonder why I hate Windows?)
|
At some point in your first boot process, Dell will send themselves a message all about your hardware -- If you ask to see the details, you can get a nifty print-out of all your hardware by copying that message. Otherwise, you'll want to dig around in your Control Panel for the System and find the Device Manager and write down EVERYTHING about EVERY piece of gear in your laptop. |
Be particularly careful about the hard drive, video card, monitor (even if it just says "Generic Plug n Play") and networking cards (wireless and wired). And the sound card, if you want sound. Or anything else you care about. USB, FireWire (aka 1394), etc. I ain't got that far myself yet, but if you need it, write it down.
|
Write all this stuff down, or archive it digitally somewhere NOT on your laptop, where you CAN get to it, even if your laptop is turned off -- Won't do you any good if it's on the laptop while you're trying to install FreeBSD. |
If you *DO* manage to screw up and wipe out your Windows, you'll at least know what hardware is in the thing, and be able to converse intelligently with the awesome FreeBSD folks about what's giving you trouble.
Please note that I've been using FreeBSD for, at most, approximately 7.34 man-hours longer than you have at this point.
Emailing me direct and asking for help on anything other than what I've covered here is likely to be incredibly unproductive.
Use Dogpile, read the FAQs and Docs, and then bug the mailing lists where real experts hang out.
UPDATE: Dogpile rocks, but I worked for Info.com for a year, and I think they're more aggressive about getting content, so give them a try. You can tack on your search terms after the 'info.com/' and it just works. Except you have to pretend to be stupid and not use + for space or %22 for " which is stupid of Info.com to not urldecode it, but I never did convince my ex-boss of that...
I just got lucky, mostly, figuring this stuff out.
|
Your first challenge will be to shrink the NTFS partition on the hard drive, in order to make room for FreeBSD. |
Exactly how much you shrink it, and how much room you allocate for FreeBSD is really more up to your needs than any advice I could give you. I had 80G to play with, so gave 20G to Windows and 60G to FreeBSD, since I plan on using FreeBSD way more than Windows.
In fact, since MS is calling me a thief for trying to import MiniDisk audio for which I own the copyrights, the one thing I actually thought Windows would be useful for, it isn't. I'm working on getting a refund, after which I will happily wipe Windows off this drive forever.
UPDATE: Okay, I lied. I never bugged them for a refund, they changed their EULA so that you can't get a refund, and I left Windows on there until FreeBSD 6 came out, cuz I need 'net, and will still leave it there for browser testing.
Of course, you may want to leave some room for Windows, especially as you'll probably be installing all kinds of bloated software on it...
There are a lot of programs to re-partition hard drives. FIPS is totally awesome, which might be why a half-dozen people recommended it to me, and why every 'Net search I could think of turned that up as the solution, despite the fact that FIPS cannot shrink an NTFS partition!
I also was challenged by the fact that FIPS wouldn't even think about running in Windows, and there is no way to start up just MS-DOS with the pre-installed Windows XP Home Edition. Granted, I and others, have been bashing Microsoft for decades for having sucky MS-DOS as the underlying real OS. But that was just trash talking. Don't strand us without a real DOS-only system!
Especially when the error message you display when I do try to run FIPS under Windows XP makes it abundantly clear that, despite the semantics of Microsoft's claim that there is no MS-DOS in XP, the guts of the thing is still a 16-bit piece of junk software that is the remnants of MS-DOS, just so scattered and disassociated that you won't let me boot to MS-DOS. NOTE: Ignore that "Safe Mode with Command Prompt" option you get with F12 -- It starts Windows with an MS-DOS "emulator" shell screen.
Partition Magic is a commercial alternative, which I used ages and ages ago, and many people swear by it, and it is alleged to be able to shrink NTFS partitions (and do just about anything else to any other kind of partition). But I don't have it now, and didn't really feel like running out to buy it.
The other choices, all of them, were able to only read, or maybe grow, an NTFS partition. None could shrink an existing NTFS partition. Except one.
The incredibly awesome [XXXXXX] is able to shrink NTFS partitions.
Alas, getting just [XXXXX] on an bootable CD is not really an option. I dunno why they don't distribute it that way, but it's OpenSource and free, so you can't complain too much. Advice about downloading all of Mandrake or similarly-sized software packages did not appeal. Fortunately, I eventually found the System Rescue CD with [XXXXXX] and a ton of other weapons.
UPDATE: [XXXXX] is that run_qparted thingie whose real name is maybe QPartEditor? but System Rescue CD pretty much tells you what to type when you boot, so I still haven't figured out what it's called, despite using it 5 times now. It still Rocks! The things that "just work" you don't remember, I guess...
Since this seemed like an incredibly useful thing to have around, and it was only one CD, I went with that.
|
So download and burn the System Rescue CD |
Of course, the burning software provided by Microsoft Windows XP Home Edition is too stupid to open up and burn an ISO image, at least as far as I could tell. So you will probably want to burn the ISO images on another Linux box with cdrecord or something. If you need help burning CDs, go here.
|
You should also probably defragment your hard drive in Windows, so that all the Windows files are at the beginning of the drive, so you can shrink the partition. |
You can do this in the "Control Panel" "Computer Management" with "Administrative Tools" by right-clicking on the C drive, going to "Properties", then "Tools", and the clicking "Defragment Now"
You may be able to get to the Defragment easier than that, but that's the way I found it.
You may also need to set your Explorer/Folder Options to not be hiding System files, hidden files, etc from you, so that those files can be moved by the Defragment process. Or maybe I just got lucky and the files weren't at the tail end of the drive like Microsoft used to do, just to make my life miserable.
|
Under no circumstances do you want to mess with the tiny little partitions that are not the "C" partition. I don't really know (or care) what those are, but Windows probably needs them to be left alone to be able to work. |
|
You will next need to change your BIOS to boot from CD-ROM first. |
You have to watch very carefully, but as your laptop boots, for a very brief period of time, you can press F2 to enter the BIOS. If you don't catch it, just re-boot, and try again. You can actually hit F2 before the message appears. So long as you see "Entering Setup" you're good. (It should really say "Entering BIOS Setup")
Read the instructions in the BIOS, and arrow left/right over to Boot, and then arrow down to CD, and then use + to move the CD to the top of the list -- or at least above the HDD (hard drive) option. Then move to Exit and choose "Save and Exit" You can learn more about BIOS here.
|
Boot from the System Rescue CD, and follow the instructions to start the re_partition program. |
For me at least, I was able to ignore that warning about doing funky things before running the re-partition program.
|
Click and drag the right side of the yellow box to re-size your partition and/or type in numbers that make you happy. |
Also, don't make the two partitions exactly the same size -- It's a bit of a "comfort factor" to know you wiping the right partition when you install FreeBSD if you are 100% certain because of the size difference that you are choosing the right partition to wipe out.
If it won't let you do that, you probably have not really successfully de-fregmented your hard drive to the point where all your Windows files are crammed into the space where you want them. Go back a few steps, and re-do the defragmenting, and look at the pretty colors for where Windows defragment put stuff. Unless you see a lot of white space on the right, with no coloring to the right of it, you haven't succeeded.
|
At some point, the re-partitioning will really happen. BE PATIENT Your computer did not freeze. It's just very very very busy with some very very very tricky stuff down in the guts of the hard drive. If you turn it off now, you will lose your stuff. Just WAIT |
Whew, man that was the scariest part. If you can still re-boot into Windows without the thing blowing up, you've succeeded.
Now it's time to finally actually install FreeBSD. Of course you need to download and burn the ISOs. I snagged them all, but it turned out I only needed disk 1. If you've got bandwidth to burn, it's always nice to have the full set, and a CDR is what?, $0.20?
|
Boot from the FreeBSD Disk1 CD, and go through the install process. That's documented elsewhere far better than I could here. |
Again, your needs will dictate what you install. I went for the middle of the road Distribution, and then dug through some additional packages for stuff I thought I might need. None of which had anything to do with what you need, so I shan't bother you with the details.
One of the biggest pains with installing a new Un*x is always XFree86 -- This is not said to slag the XFree86 Developers.
When you consider the myriad hardware, video card, monitor combinations out there, and dig into just how different they are, it's a wonder any OS manages to make anything remotely like what you expect show up on the monitor.
Still here are some special notes from my attempts to configure XFree86 on this box.
|
One of the configurators insisted that my mouse was at /dev/psaux, and even showed me a little test demo to prove it. At the end of the day, though, after running through every configurator trying to get X to actually work, my mouse ended up being at /dev/sysmouse. So after you are all done messing with X Windows, and get the screen to work, if your mouse doesn't work, just open up /usr/lib/X11/X86Config (?) in your favorite text editor and change the mouse setting to /dev/sysmouse or /dev/psaux or whatever seems to actually be in /dev that looks like it might be your PS-based trackpad mouse thingie. |
Thank God for /var/log/XFree86.0.log!!!
If you are having trouble with X Windows read that log.
Read every line of it, carefully.
You may not understand half that crap.
I certainly don't.
And I doubt that there are 10 guys on the planet that understand all those HEX numbers and whatnot that get spewed out in bunches of lines. So, okay, skim past those.
But really focus on the rest, especially if you see anything remotely mentioning the hardware that's giving you trouble.
Like, say, your screen.
The screen that is detected in the Log file, and is notated as a 1280x800 geometry.
The same screen that all of the configure programs decided could do 640x480, 800x600 and maybe even ####x### but not one of them really got right...
|
So go into your X86Config file, find all the places where it put 800x600, and cram in a 1280x800 in there, using the same format as all the other settings. No margin for error here. Quotes, commas, spaces, all of that needs to be exactly right. UPDATE: Later analysis with another m700 owner makes me think that you're only gonna get 1280x800 if you have, like, 2 Gigs of RAM?... UPDATE: Putting FreeBSD 6.1 on there, I ended up with the Unix-style window manager, and wanted KDE, so now I 'startx' and use a Unix X-window shell to do 'startkde' which is almost-for-sure not the right way to do it... though it actually kinda works. |
Note to XFree86 Developers: Your startx and logging is "smart enough" to figure out that it's a 1280x800 screen, so it would be Really Nifty ™ if your configurators could share that code.
I'm sure I just naively grossly over-simplified about 1,000 hours of programming, but there ya go. :-)
I am now at the point where:
Here are some logfile/debug output files that may make sense of the LAN card to somebody: My inexperience may have made me incorrectly install the BFE driver! There may be no real problem here... Help me correct operator error. Given that I need BFE driver installed, how do I do it, how do I know I succeeded, ...
By editing /boot/loader.conf and adding Suddenly, all the error message in 'dmesg' went away, and I had devices!
Alas, attempting to actually Is there something less drastic than 'allow_unsupported_io_range'? What's that do anyway? The docs don't mention that setting at all, the source code makes it sound like it's for broken BIOSes, and docs for 5.3 say it's going to disappear as a feature. My BIOS ain't got anything remotely resembling a single HEX number, much less memory ranges for hardware devices. :-( Should I turn allow_unsupported_io_range back off and use device.hints for every piece of hardware? Would that help? I'm clutching at straws here. Current dmesg, var/log/messages, altered driver (BFE) source: here UPDATE: Just get FreeBSD 6.1 and "it works"! :-) UPDATE: Hey! I just found the 1G RAM card that I had taken out at some point in all this process. I think some of my basic problems might stem from 2 Gig RAM and 1 Gig swap in the Label editor thingie. I'm about to try to increase my FreeBSD swap space to 2 Gig using this nifty documentation: http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/adding-swap-space.html The interesting thing is that FreeBSD 6.1 panics and reboots with the 2 Gig of RAM -- always right after bringing up the network, and does not crash if I unplug the network cable. So my current theory is that the BFE driver does something funky with RAM which causes the insufficient swap to choke. I remember back in the day of Mac Programming in the 80s where you would sometimes use MoveHandleHigh (or somesuch) force a chunk of memory returned from malloc to be moved to a higher portion of RAM, indicating to the OS that you *really* didn't want it shuffled around, because it would be used in a low-latency circumstance where RAM shuffling would be "bad"... Maybe something like that is down in the guts of the BFE driver??? UPDATE: I am now fairly certain that somewhere between memory management and the BFE driver, something is very wrong |
More will be posted here, assuming I get farther along than I am now... I hope.