liam_on_linux: (Default)
I just finished doing up an old white MacBook from 2008 (note: not MacBook Pro) for Jana's best friend, back in Brno.

I hit quite a few glitches along the way. Partly for my own memory, partly in case anyone else hits them, here are the work-arounds I needed...

BTW, I have left the links visible and in the text so you can see where you're going. This is intentional.

Picking a distribution and desktop

As the machine is maxed out with 4GB of RAM, and only has a fairly feeble Intel HD 3100 GPU, I went for Xfce as a lightweight desktop that's very configurable and doesn't need hardware OpenGL. (I just wish Xfce had the GNOME 2/Maté facility to lock controls and panels into place.)

Xubuntu (18.10, later upgraded to 19.04) had two peculiar and annoying errors.

  1. On boot, NumLock is always on. This is a serious snag because a MacBook has no NumLock key, nor a NumLock indicator to tell you, and thus no easy way to turn it off. (Fn+F6 twice worked on Xubuntu 18/19, but not on 20.04.) I found a workaround: https://help.ubuntu.com/community/AppleKeyboard#Numlock_on_Apple_Wireless_Keyboard

  2. Secondly, Xubuntu sometimes could not bring the wifi connection up. Rebooting into Mac OS X and then warm-booting into Xubuntu fixed this.

For this and the webcam issue below, I really strongly recommend keeping a bootable Mac OS X partition available and dual-booting between both Mac OS X and Linux. OS X Lion (10.7) is the latest this machine can run. Some Macs – e.g. MacBook Pro and iMac models –  from around this era can run El Cap (10.11) which is probably still somewhat useful. My girlfriend's MacBook Pro is a 2009 model, just one year younger, and it can run High Sierra (10.13) which still supports the latest Firefox, Chrome, Skype, LibreOffice etc without any problem.

By the way: there are "hacks" to install newer versions of macOS onto older Macs which no longer support them. Colin "dosdude1" Mistr has a good list, here: http://dosdude1.com/software.html

However quite a few of these have serious drawbacks on a machine this old. For instance, my 2008 MB might be able to run Mountain Lion (10.8) but probably nothing newer, and if it did, I would have no graphics acceleration, making the machine slow and maybe unstable. Similarly, my 2011 Mac Mini maxes out at High Sierra. Mojave (10.14) and Catalina (10.15) apparently work well, but Big Sur (11) again has no graphics acceleration and is thus well-nigh unusable. But if you have a newer machine and the reports are that it works well as a hack, this may make it useful again.

I had to reinstall Lion. Due to this, I found that the MacBook will not boot Lion off USB; I had to burn a DVD-R. This worked perfectly first time. There are some instructions here:
https://www.lifewire.com/install-os-x-lion-using-bootable-dvd-2260333

Beware, retail Mac OS X DVDs are dual-layer. If the image is more than 5GB, it may not fit on an ordinary single-layer DVD-R.

If I remember correctly, Lion was the last version of Mac OS X that was not a free download. However, that was 10 years and 8 versions ago, so I hope Apple will forgive me helping you to pirate it. A Bittorrent can be found here.

Incidentally, a vaguely-current browser for Lion is ParrotGeeks Firefox Legacy. I found this made the machine much more useful with Lion, able to access Facebook, Gmail etc. absolutely fine, which the bundled version of Safari cannot do. If you disable all sharing options in OS X and only use Firefox, the machine should be reasonably secure even today. OS X is immune to all Windows malware. Download Firefox Legacy from here:
https://parrotgeek.com/fxlegacy.html

However, saying all that, Linux Mint does not suffer from either of these Xubuntu issues, so I recommend Linux Mint Xfce. I found Mint 20 worked well and the upgrade to Mint 20.1 was quick and seamless.

Installation

If you make a 2nd partition in Disk Utility while you're (re-)installing Mac OS X, you can just reformat that as ext4 in the Linux setup program. This saves messing around with Linux disk partitioning on a UEFI MacBook, which I am warning you is not like doing it on a PC. (I accidentally corrupted the MacBook's hard disk trying to copy a Linux partition onto it with gparted, then remove it using fdisk. That's why I had to reinstall. Again, I strongly recommend doing any partitioning with Mac OS X's Disk Utility, and not with Linux.) All Intel Macs have UEFI, not a BIOS, and so they all use only GPT partitioning, not MBR.

I set aside 48GB for Lion and all the rest for Mint. (Mint defaults to using a swapfile in the root partition, just like Ubuntu. This means that 2 partitions are enough. I was trying to keep things as simple as possible.)

If you use Linux fdisk, or Gparted, to look at the disk from Linux, remember to leave the original Apple EFI System Partition ("ESP") alone and intact. You need that even if you single-boot Linux and nothing else.

Wifi doesn't work out of the box on Mint. You need to connect to the Internet via Ethernet, then open the Software and Drivers settings program and install the Broadcom drivers. That was enough for me; more info is here:
https://askubuntu.com/questions/55868/installing-broadcom-wireless-drivers

While connected with a cable, I also did a full update:

sudo -s
apt update
apt full-upgrade -y
apt autoremove -y
apt purge
apt clean


Glitches and gotchas

Startup or shutdown can take ages, or freeze the machine entirely, hanging during shutdown. The fan may spin up during this. The fix is an simple edit to add an extra kernel parameter to GRUB, described here:
https://forums.linuxmint.com/viewtopic.php?t=284960

(Aside: hoping to work around this, I installed kexec-tools for faster reboots. It didn't work. I don't know why not. Perhaps it's something to do with the machine using UEFI, not a BIOS. I also installed the Ubuntu Hardware Enablement stack with its newer kernel, in case that helped, but it didn't. It didn't seem to cause any problems, though, so I left it.)

GRUB shows an error about not being able to find a Mok file, then continues because SecureBoot is disabled. This is non-fatal but there is a fix here:
https://askubuntu.com/questions/1279602/ubuntu-20-04-failed-to-set-moklistrt-invalid-parameter

While troubleshooting the Mok error above, I found that the previous owner of this machine had Fedora on it at some point, and even though I removed and completely reinstalled OS X Lion in a new partition, the UEFI boot entry for Fedora was still there and was still the default. I removed it using the instructions here:
https://www.linuxbabe.com/command-line/how-to-use-linux-efibootmgr-examples

NOTE: I suggest you don't set a boot sequence. Just set the ubuntu entry as the default and leave it at that. The Apple firmware very briefly displays a no-bootable-volume icon (a folder with a question mark on it) as it boots. I think this is why, when I used efibootmgr to set Mint as the default then OS X, it never loaded GRUB but went straight into OS X.

(Mint have not renamed their UEFI bootloader; it's still called "ubuntu" from the upstream distro. I believe this means that you cannot dual-boot a UEFI machine with both Ubuntu and Mint, or multiple versions of either. This reflects my general impression that UEFI is a pain in the neck.)

The Apple built-in iSight Webcam requires a firmware file to work under Linux, which you must extract from Mac OS X:
https://help.ubuntu.com/community/MactelSupportTeam/AppleiSight

Both Xubuntu and Mint automatically install entries in the GRUB boot menu for Mac OS X. For Lion, there are 2: one for the 32-bit kernel, one for the 64-bit kernel. These will not work. To boot into macOS, hold down the Opt key as the machine powers on; this will display the firmware's graphical boot-device selection screen. The Linux partition is described as "EFI Boot". Click on "macOS" or whatever you called your Mac HD partition. If you want to boot into Linux, just power-cycle it and then leave it alone – the screen goes grey, then black with a flashing cursor, then the GRUB menu appears and you can pick Linux. The Linux partition is not visible from macOS and you can't pick it in the Startup Disk system preference-pane.

Post-install fine-tuning

I also added the ubuntu-restricted-extras package to get some nicer web fonts, a few handy codecs, and so on. Remember when installing this that you must use the cursor keys and Enter/Return to say "yes" to the Microsoft free licence agreement. The mouse won't work – use your keyboard. I also added Apple HFS support, so that Linux can easily manipulate the Mac OS X partition.

I installed Google Chrome and Skype, direct from their vendors' download pages. Both of these add their own repositories to the system, so they will automatically update when the OS does. I also installed Zoom, which does not have a repo and so won't get updated. This is an annoyance; we'll have to look at that later if it becomes problematic. I also added VLC because the machine has a DVD drive and this is an easy way to play CDs and DVDs.

As this machine and the old Thinkpad I am sending along with it are intended for kids to use, I installed the educational packages from UbuntuEd. I added those that are recommended for pre-school, primary and secondary schoolchildren, as listed here:
https://discourse.ubuntu.com/t/ubuntu-education-ubuntued/17063

I enabled unattended-upgrades (and set the machine to install updates at shutdown) as described here:
https://www.cyberciti.biz/faq/set-up-automatic-unattended-updates-for-ubuntu-20-04/

While testing the webcam, I discovered that Mint doesn't include Cheese, so I installed that, too:
sudo apt install -y ubuntu-restricted-extras hfsprogs vlc cheese
liam_on_linux: (Default)
I was just prodded by someone when suggesting that some friends try Linux. I forgot to mention that you can try it without risking your existing PC setup. It prompted me to write this...

I forget that non-techies don't _know_ stuff like that.

Download a program called VirtualBox. It's free and it lets you run a whole other operating system - e.g. Linux - under Windows as a program. So you can try it out without affecting your real computer.

https://www.virtualbox.org/

If all you know is Windows, I'd suggest Linux Mint: http://www.linuxmint.com/

It has a desktop that looks and works similarly to Windows' classic pre-Win8 look & feel.

Google for the steps but here's the basic instructions:

[1] Download and install VirtualBox

[2] Then download the Virtualbox Extensions from the same site. Double-click the extensions file to install it into Vbox. (They have to do it this way for copyright reasons.)

[3] Download Mint. It comes as an ISO file, an image of a DVD.

[4] Make a new VM in VBox. Give it 2-3 gig of RAM. Enable display 3D acceleration in the settings. (Remember, anything you don't know how to do, Google it.) Leave all the other settings as they are.

[5] Start your new VM. It will ask for an ISO file. Point it at the ISO file of Mint you downloaded.

[6] It will boot and run. Install it onto the virtual hard disk inside Vbox. Just accept all the defaults.

[7] Reboot your new Mint VM.

[8] Install the Vbox Guess Additions. On the VBox Device menu, choose “Insert Guest Additions ISO”. Google for instruction on how to install them.

[9] When it’s finished, reboot the VM.

[10] Update your new copy of Linux Mint. (Remember, Google for instructions.)

That’s it. Play with it. See if you can do the stuff you normally do on Windows all right. If you can’t, Google for what program to use and how to install it. It’s not as quick as a real PC but it works.

Don’t assume that because you know how to do something on Windows, it works that way on Linux. E.g. you never should download programs from a website and install them into Linux — it has a better way. Be prepared to learn some stuff.

If you can work it, then you can install it on your PC alongside Windows. This is called Dual Booting. It’s quite easy really and then you choose whether you want Windows or Linux when you turn it on.

All my PCs do it, but I use Windows about once or twice a year, when I absolutely need it. Which is almost never. I only use Windows if someone is paying me too — it is a massive pain to maintain and keep running properly compared to more grown-up equivalents. (Linux and Mac OS X are based on a late-1960s project; they are very mature and polished. The first version of the current Windows family is from 1993. It’s still got a lot of growing up to do — it’s only half the age.)

It’s genuinely better. No, you don’t get all the Windows programs. There aren’t many games for it, for instance. But it can do anything Windows can do, it’s faster, it’s immune to all the Windows viruses and nasties so you don’t need antivirus or a firewall or anything. That means it’s faster, too — antivirus slows computers down, but you need it on Windows.

All the apps are free. All the updates are free, forever. There are thousands of people on web fora who will help you if you have problems, you just have to ask. It’s educational — you will learn more about computers from learning a different way to use them, but that means you won’t be so helpless. You don’t need to be a white-coated genius scientist, but what it means is you take control back from some faceless corporation. Remember, the world’s richest man got that way by selling people stuff they could have had for free if they just knew how.
liam_on_linux: (Default)
Since none of my spare or test machines have hardware 3D, I was unable to try it until recently. Then I was testing an MSI Wind Top all-in-one touchscreen Atom PC as part of the Simplicity Computers project. (We've decided against it now.)

(The Wind Top works OK with *buntu, but for one entertaining bug: the axes on the touchscreen are reversed. Move your finger left, the pointer goes right; move finger up, pointer goes down. Install the drivers and config to fix this (which depends on HAL, and so doesn't work right on modern *buntu) and the screen image moves offcentre and goes all blurry, so though the touchscreen now works, you can barely read anything, it's all ugly, and the picture is offset about 5mm vertical & 1cm horizontal from where it should be and thus where the pointer is. As it's an all-in-one, there are no screen geometry controls, hardware or software. At which point, we gave up and sent it back.)

Anyway, I got Natty alpha 3 or so working on it.

Compiz crashes more times than Aeroflot in volcano season, taking the "desktop" - not that that word is accurate any more - with it.

The autohiding menu bar is insane, combining the worst of MacOS (menus randomly changing depending which window is active and having no spacial association with whichever window they control - if they control any visible window) and the worst of the Amiga (on which menus are hidden unless you whack the mouse up to the top of the screen and then right-click.) It's about as discoverable as Minoan Linear A.

The NotADockHonest™ is weird and feels raw and unfinished, not like something that shipped as part of Ubuntu 10.04 and 10.10 Netbook Remix. I don't like it as much as the Mac OS X Dock - and I don't like that much - but I am prepared to give the Unity Dock time. Maybe I'll adapt to it.

I mean, I don't like GNOME panels much, either, after all. They're much more customisable than Windows ones, except not in the ways I want (e.g. vertical orientation (b0rked), e.g. large panels but small icons; (no, you can't have that. And you can't have any pudding, either. Bad user, no biccie.))

(Incidentally again, if you like vertical docks and panels, Docky and GLX-Dock and AWM are all broken, too. If you want a nice, attractive dock that actually works quite well in a vertical orientation, try ADeskBar. It's good. Best I've found for Linux yet. Homepage seems to be down, though.)

Mind you, after a little playing, I like the WindowMaker docks much less than OS X ones. (I mean, no labels or tooltips? You are taking the mickey, right?)

But so far, the new Ubuntu 11.04 layout, from a play with a flaky, unstable implementation, just felt like it wasn't something powerful and capable enough to run a PC with. Not yet.

I have no choice but to stick with GNOME 2 on my laptop. It's seven years old, but rock-solid and nicely fast & responsive with Maverick. Much much better than Windows XP on the same hardware. But its ATI Radeon Mobility - actually a 16MB Rage II or III, roughly - doesn't work with Compiz and to give good performance (and to be able to drive a 1280×1024 external monitor) it has to be dropped to 65K colours.

Which Ubuntu provides no UI at all to do, of course.

So you have to edit /etc/X11/xorg.conf.

Only *buntu >10.x doesn't have an xorg.conf file any more. So you have to write one of your own. (I found a blank one that can be adapted, which is very handy.)

Once you've done that and got the graphics working, then you might, perhaps, want suspend/wake and hibernate/resume to work. That means adding "nomodeswitch" to the kernel boot parameters.

That means you lose the graphical boot sequence (which has the colours corrupted on this machine, anyway.)

So you might want to add "vga=791" to the kernel boot params too, to get a graphical boot back, in the same resolution as your desktop.

After doing all this, it works like a dream and is really nice, but forget any hardware 3D, so forget the Netbook interface - or the new Unity one. And also, I think, that means forget GNOME 3, as well.

The obscure and poorly-supported make of this weirdly non-standard machine?

IBM.

Not Lenovo, actual IBM. It's from 2004. A Thinkpad X31.

Saying all that, I still prefer *buntu to the alternatives.

But I think that as of or after Natty, I might be going over to Linux Mint full-time...

Mint, of course, is based on GNOME 2 and has no truck with any of this netbook or unity or GNOME 3 business.

But what is going to happen when GNOME 2 is no longer supported or updated, I wonder?

I mean (*shudder*) I might have to go over to KDE. But the ugly, it burnsssssss... I don't want 23,452,356 options to tweak, I want it to work, and it really helps if it looks vaguely professional and smart while it's at it, not like a red/green colourblind 13 year old's LSD nightmare.
liam_on_linux: (Default)
Public service announcement here, following an epic battle this evening.

Ubuntu, and thus Mint, print via CUPS, and include HP's modifications to this to support HP's printers - a subsystem called HPLIP. The snag is, the version they include in Mint 7 (based on Ubuntu 9.04) is 3.9.2 - and if you want to connect a current-model HP printer such as a Deskjet D2660 (one of the last pure-printer-only inkjets on the market, AFAICS) or a F2480 (a decent, inexpensive little all-in-one multifunction type device), these need a newer version of HPLIP.

HP provide a downloadable installer for v3.9.10 of this here:
http://hplipopensource.com/hplip-web/install/install/index.html

The snag is, it doesn't work on Mint 7. It has a whole pile of dependencies and it can't resolve them on its own. (Maybe because Mint 7 isn't a supported distro - I don't know.) I've not yet tried Mint 8 (which only came out today) or Ubuntu, but I suspect there will be similar problems on Ubuntu 9.04 at least.

But I've found a way to do it.

Pre-installing this little lot of packages allows the installer to at least run through to completion:

ubuntu-dev-tools
python-all-dev
libcups2-dev
libusb-1.0-0
libusbdev
libtool
libcupsimage2-dev

However, the HP installer still complains that a load of optional pieces are missing, so you get no printer GUI, no scanning and so on.

This additional pile fixes that:

python-qt4-common
python-qt4-dbus
python-reportlab
xsane
libsane-dev

Install all of them - you could just "apt-get install" the whole list, separated by spaces, that should do it - and HPLIP 3.8.10 installs fine.

It still doesn't print, though. To get that working, one last step is needed. As root or using "sudo", you need to go to the directory

/usr/lib/cups/filter

and make a symlink to create a standin for a missing file:
ln -s foomatic-rip foomatic-rip-hplip

Do this, reboot, plug in your new HP, and it should Just Work™.

Hope that Google finds this and it helps someone... :¬)

May 2025

S M T W T F S
    12 3
45678910
11121314151617
1819 2021222324
25262728293031

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 13th, 2025 06:40 pm
Powered by Dreamwidth Studios