These are some notes I made regarding a laptop that I ordered on the afternoon of 27 February, and which I received on the evening of Monday, 05 March, 2001. There isn't much order, in that I tried to preserve the order in which I recorded things, intending to thus provide an out-of-band clue as to what struck me at various stages of obviousness. As should be apparent, I'm running FreeBSD on it.
Specs | |
---|---|
CPU speed & type | 750 MHz Pentium III |
Memory | 256 MB |
Disk | 20 GB |
Screen | 15" SXGA+ (1400x1050) |
Other peripherals | CD-RW |
Other miscellanea | extra battery; port replicator; DC Power Inverter |
Price (including taxes & shipping) was <US$2520. The ``DC Power Inverter'' is not specific to anything: it plugs into a ``cigarette lighter'' electrical source and provides 115 VAC via US-style electrical receptacles. Thus, using it incurs several inefficiencies (or so I presume).
One of my colleagues saw the laptop, and asked if it was a Dell -- seems her boyfriend has a Dell Inspiron 5000e, and they are sufficiently similar to cause someone to notice. And the BIOS update available at software.tuxtops.com mentions that it is for the Compal 30W or a Dell Inspiron 5000e.
As noted, YMMV; it appears to work for me. Even under FreeBSD 5.0-CURRENT, once I put the line in /etc/rc.devfs to make a symlink for /dev/mouse.]--- XF86Config.new Tue Mar 6 09:12:20 2001 +++ /etc/XF86Config Tue Mar 6 09:45:27 2001 @@ -43,6 +43,9 @@ Identifier "Monitor0" VendorName "Monitor Vendor" ModelName "Monitor Model" + HorizSync 31.5-82 + VertRefresh 40-110 + Modeline "1400x1050" 107.85 1400 1450 1500 1999 1050 1058 1070 1150 EndSection Section "Device" @@ -56,7 +59,7 @@ #Option "reference_clock" #Option "shadow_fb" Identifier "Card0" - Driver "ati" + Driver "r128" VendorName "ATI" BoardName "Rage 128 Mobility LF" BusID "PCI:1:0:0" @@ -83,7 +86,9 @@ EndSubSection SubSection "Display" Depth 24 + Modes "1400x1050" "1280x1024" "1024x768" "800x600" "640x480" EndSubSection + DefaultFbBpp 24 EndSection Section "DRI"
It was a bit of a hassle to set up the floppy, so here's an image of the floppy
I used. I used the command
More BIOS stuff: here are the settings I am using (F2 to enter BIOS SETUP):
I have yet to try burning a CD with it. [Later note 16 Apr 2001:
I have burned both CD-Rs and CD-RWs with it, using N38W2 BIOS Revision 1.06L.T01 (for Linux Test)
to create it; reverse the dd bs=720k of=38W2BIOS.flp if=/dev/rfd0c
of=
and if=
parameters to copy it to a floppy. When you receive it, it should be
precisely 1474560 bytes long. (Note that this will take a while; my
link is just a basic residential ADSL.)
Main
Quiet Boot Enabled Video Display Device Simul Mode Television Port Device Enabled Television Type NTSC
System Devices
IDE Controller Both FDD Controller Enabled Internal Touchpad Auto Disabled Serial Port Auto Infrared Port Off Parallel Port Auto USB Keyboards Disabled
Power
Power Management Mode Customized Standby Time-out Disabled Suspend Time-out Disabled Suspend Mode Save-To-RAM Resume on Modem Ring Off Resume on Time of Day Disabled Resume Time 00:00:00 Intel(R) SpeedStep(TM) Automatic
Boot
Floppy CD ROM/DVD Internal Hard Drive psm
debugging with the original BIOS showed that the two are not
distinguishable. Bummer. I have yet to try it wit the new BIOS,
because I'm writing this stuff up.]
burncd
.]
One of the things I had decided to do on this machine is set it up so I could build & boot from different FreeBSD slices. To that end, I set up the partitioning (then modified it to):
[Note that the X slice is pointed to by partition table entry #4, which is why the references to theX 538 MB (I'm hoping to make this a "suspend to disk" slice) ad0s1a 160 MB root/boot for 1st -STABLE ad0s1e 1884 MB /usr for 1st -STABLE ad0s2a 160 MB root/boot for 2nd -STABLE ad0s2e 1884 MB /usr for 2nd -STABLE ad0s3a 160 MB root/boot for -CURRENT ad0s3e 1884 MB /usr for -CURRENT ad0s3b 1024 MB swap (common to all; /tmp is an MFS (md, in -CURRENT)) ad0s3g 1024 MB /var (common to all) ad0s3h 9.5 GB /common (just that; contains /home, /usr/local, /cvs, &c.)
ad0sxy
make some sort of sense...
even though the chunk of disk that corresponds to the X slice is before any of
the slices that FreeBSD uses.
This isn't the original allocation scheme I used: I had allocated only(!)
96 MB for the root filesystems, and that was pushing things rather close
on -CURRENT (which is which the machine was running when I did the above
df
), and it was also cutting things rather close for the
/usr filesystems. Note that the process of reorganizing the filesystems
was rather painful; it took about 12 hours (even though I used an
adapter to connect the laptop's disk drive to a fairly beefy machine at
work and did the dumps & restores disk-to-disk). As expected, it's the
restore time that really establishes the bottleneck. Things are
much better if you do the allocation right to begin
with.
And now that I've actually populated each of the slices (and booted off
of each of the bootable ones), here's what df
and
swapinfo
have to say:
dhcp-140[1] df -k; swapinfo Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/ad0s3a 158783 69703 76378 48% / devfs 1 1 0 100% /dev /dev/ad0s1a 158783 41585 104496 28% /S1 /dev/ad0s1e 1870791 807741 913387 47% /S1/usr /dev/ad0s2a 158783 41754 104327 29% /S2 /dev/ad0s2e 1870791 791718 929410 46% /S2/usr /dev/ad0s3e 1870751 743571 977520 43% /usr /dev/ad0s3g 1016303 32086 902913 3% /var /dev/ad0s3h 10277074 5263328 4191581 56% /common procfs 4 4 0 100% /proc /dev/md10c 520140 24 478508 0% /tmp Device 1K-blocks Used Avail Capacity Type /dev/ad0s3b 1048448 4176 1044272 0% Interleaved dhcp-140[2] uname -a FreeBSD dhcp-140.catwhisker.org 5.0-CURRENT FreeBSD 5.0-CURRENT #46: Sat Jun 23 13:23:14 PDT 2001 root@dhcp-135.catwhisker.org:/common/C/obj/usr/src/sys/LAPTOP_30W i386 dhcp-140[3]
Here's some narrative about the process I used:
Now, it happened that the install media I had available was 4.1-R.
And in running sysinstall, I was finally able to set up that
partitioning, but if I tried to tell sysinstall that I wanted to boot
off of a slice on ad0s2
or ad0s3
, it whined that FreeBSD couldn't cope
with that. (For that matter, the partitions on ad0s2
and ad0s3
were
created as ad0s2e
, ad0s2f
, ad0s3e
, and ad0s3f
. I used disklabel -e
to change the names to what made more sense given their intended use.
Since this was a simple matter of just changing the partition name,
rather than the size or position of a slice, it was pretty
straightforward. It was a little more challening to set up the
suspend-to-disk ``partition'' so that its table entry was 4th,
though the space it occupied on disk was 1st. I actually defined it as
1st, and well after things (other than suspend-to-disk) were working, I
booted single-user and ran fdisk
to change the 1st
partition table entry to have the characteristics of the 2nd; change the
2nd to have the characteristics of the 3rd; change the 3rd to have the
characteristics of the 4th; finally, change the 4th to have the
(original) characteristics of the 1st. (I used boot0cfg -v
to get the characteristics of each tabel entry in a nice, compact
display -- on a different vty.) This is a time-consuming,
laborious process.
And I set up /etc/fstab so that when I'm booted off of ad0s1a
, ad0s2a
is mounted as /S2 and ad0s3a
is mounted as /C.
But where things get interesting is that after installing 4.1-R on s1,
I used dd
to copy each of the filesystems on ad0s1
to their
respective counterparts on ad0s2
. I then re-mounted the filesystems
(as /S2
and /S2/usr
-- though the latter mount isn't needed for what
comes next) and edited /S2/etc/fstab,
so that when I boot off of
ad0s2a
, ad0s1a
gets mounted as /S1
(and ad0s1e
gets mounted as
/S1/usr
).
So I re-boot, and get a list of 3 ``FreeBSD'' slices; I hit F2 to select
the second one... and everything is Just Fine. :-) (I've done this
with another machine, extending the exercise to the ad0s3
slice.)
So the mechanism uses some disk space & takes some time, but it
provides for a comparatively easy-to-get-to fallback in case a planned
upgrade fails: just boot off of one of the slices, exercise things
enough to build confidence, dd
the filesystems over, and start the
next upgrade cycle.
The machine is generally set up as a DHCP client. And maybe I'm Really
Weird, but I don't like the idea of the client specifying a hostname to
use. So I cobbled up a bit of shell-scripting called /etc/dhclient-exit-hooks
to
provide a likely hostname. I set up /etc/rc.conf
so that
the machine's default hostname is just localhost
. That
appears to allow most things to work for me (though changing the
hostname out from underneath X11 isn't friendly at all...).