Boot manager needed for 2006 iMac

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
rumplestiltskin
Level 2
Level 2
Posts: 58
Joined: Fri Feb 16, 2018 7:34 pm
Location: West of the Pecos

Boot manager needed for 2006 iMac

Post by rumplestiltskin »

I probably pooched this on my own as I evidently did not follow some instructions properly. Here's my situation:

I have a 2006 Core2Duo iMac. I did a fresh install of Snow Leopard ( 10.6.8 ) on it. Worked perfectly. But you can't use this safely on the Web so I partitioned the drive and installed Mint 18.3 on the freed-up space. Runs perfectly.

My problem is that I must depress the Option key at boot in order to see both the boot devices, then select the boot volume named "Windows", press Enter, and then I see the boot manager (grub?) which shows both the Mint and Mac boot volumes. Obviously, I missed some step that would get me to this boot manager without having to do the Option key, etc.

I imagine this is a fairly easy fix but I'm clueless. If I just need to continue using the Option key, etc. when I startup or restart the Mac, so be it; but I'd love to get it resolved.

Thanks in advance for any advice!

Barry
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
trytip
Level 14
Level 14
Posts: 5367
Joined: Tue Jul 05, 2016 1:20 pm

Re: Boot manager needed for 2006 iMac

Post by trytip »

a boot loader needs to be installed in the first sectors of the hard drive. you need to create a boot partition if you want to keep your mac or format the whole drive with ext4 linux filesystem and get rid of apples.

creating a boot partition is easier done if you are familiar with partitions. at this point you need to decide if it's worth keeping ios.
boot in your mint and post:

Code: Select all

lsblk -o NAME,TYPE,FSTYPE
inxi -Fxzd
Image
User avatar
rumplestiltskin
Level 2
Level 2
Posts: 58
Joined: Fri Feb 16, 2018 7:34 pm
Location: West of the Pecos

Re: Boot manager needed for 2006 iMac

Post by rumplestiltskin »

I started (on the Mac side) with creating a new partition of about 200GB. I then rebooted from the Mint CD and ran the installer. I used the parted(?) in the installer to break that partition into two of 192GB and 8GB for "/" and "swap", respectively. The installer complained about not having a boot partition. I split "swap" into about 7GB and 1GB for "swap" and "boot", respectively. The installer then let me continue and finished without an issue.

Based upon your reply to my post, should I have created the "boot", "swap", and "/" in that order? Or was I hamstrung because I already had OSX installed first?

I've seen something called REFind (or something like that) that allegedly creates the boot partition and installs some sort of boot loader. Would that be an option?

I don't mind wiping out the HD and starting from scratch if necessary. Perhaps using Boot Camp to create the partition is a better method?

Or if it's just better to dedicate this machine to Mint I can do so as I have another Mac that can run Snow Leopard (and I need to keep such a machine around for specific tasks that are impossible to accomplish on my Sierra and newer Macs).

I know; lots of questions. You are appreciated.

Thanks,
Barry
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: Boot manager needed for 2006 iMac

Post by fabien85 »

The simplest is indeed that you install refind, that will take care of everything (you may even be able to get rid of grub after that)
You can install it from macOS: get it from this page (binary zip file that you will then decompress). Then you can follow the (simple) install instructions fromthis page ; or more simply on macOS you can just drag and drop the install script into a terminal.

When you reboot, you should get to the refind screen, which should provide one or more entries to boot Mint. Depending how exactly you installed it (which I dont know), the entry may be called "Boot grubx64.efi from EFI partition" with a ubuntu icon, or "Boot /boot/vmlinuz-somenumber from X GB ext4 volume" with a Mint icon, or "Boot legacy bootloader" with an unkown OS icon. In short, any entry which is not the one for macOS.
Tell us if it worked and what entry exactly you get.
User avatar
rumplestiltskin
Level 2
Level 2
Posts: 58
Joined: Fri Feb 16, 2018 7:34 pm
Location: West of the Pecos

Re: Boot manager needed for 2006 iMac

Post by rumplestiltskin »

Downloaded and installed per instructions. Rebooted. Indeed, the boot screen came up. Interestingly, when I selected the Mint option (see picture), I got a screen-and-a-half of verbose booting which hung at "downloading apt and cleaning" (or something like that). After two minutes or so, I powered off and tried it again. I selected the third-from-left option which, IIRC, was booting "Legacy from whole disk volume". That one brought me to the Mint boot-screen options which, when left alone, proceeded to boot into Mint.

I restarted and refind remembered my (third-from-left) choice so, after a short period, it automatically booted to that "Legacy" choice which then defaulted to Mint (the first choice in the Mint loader list). So the problem is solved. I was thinking that the intervening Mint bootloader might be bypassed but I see there are some troubleshooting choices there that should remain available.

So THANK YOU! for the assistance. The refind download link was helpful. The "simple" instructions at the linked webpage, however, were...rambling, to be charitable. I just followed your direction to drop the refind-install script into a Terminal window while I was booted into OSX, provide my password when prompted, and rebooted. Nice and simple. :D
refind screenshot.jpg
User avatar
rumplestiltskin
Level 2
Level 2
Posts: 58
Joined: Fri Feb 16, 2018 7:34 pm
Location: West of the Pecos

Re: Boot manager needed for 2006 iMac

Post by rumplestiltskin »

trytip wrote: Wed Nov 21, 2018 1:04 am a boot loader needs to be installed in the first sectors of the hard drive. you need to create a boot partition if you want to keep your mac or format the whole drive with ext4 linux filesystem and get rid of apples.

creating a boot partition is easier done if you are familiar with partitions. at this point you need to decide if it's worth keeping ios.
boot in your mint and post:

Code: Select all

lsblk -o NAME,TYPE,FSTYPE
inxi -Fxzd
In case this is still of interest (and thanks for trying to help):

macuser@macuser-iMac ~ $ lsblk -o NAME,TYPE,FSTYPE
NAME TYPE FSTYPE
sr0 rom
sda disk
├─sda4 part swap
├─sda2 part hfsplus
├─sda5 part
├─sda3 part ext4
└─sda1 part vfat

macuser@macuser-iMac ~ $ inxi -Fxzd
System: Host: macuser-iMac Kernel: 4.10.0-38-generic i686 (32 bit gcc: 5.4.0)
Desktop: Cinnamon 3.6.6 (Gtk 3.18.9-1ubuntu3.3)
Distro: Linux Mint 18.3 Sylvia
Machine: System: Apple product: iMac6 1 v: 1.0
Mobo: Apple model: Mac-F4218FC8 v: DVT
Bios: Apple v: IM61.88Z.0093.B07.0706281250 date: 06/28/07
CPU: Dual core Intel Core2 T7600 (-MCP-) cache: 4096 KB
flags: (lm nx pae sse sse2 sse3 ssse3 vmx) bmips: 9310
clock speeds: max: 2333 MHz 1: 1667 MHz 2: 1500 MHz
Graphics: Card: NVIDIA G73 [GeForce 7300 GT] bus-ID: 01:00.0
Display Server: X.Org 1.18.4 drivers: nouveau (unloaded: fbdev,vesa)
Resolution: 1920x1200@60.24hz
GLX Renderer: Gallium 0.4 on NV4B
GLX Version: 2.1 Mesa 17.0.7 Direct Rendering: Yes
Audio: Card Intel NM10/ICH7 Family High Definition Audio Controller
driver: snd_hda_intel bus-ID: 00:1b.0
Sound: Advanced Linux Sound Architecture v: k4.10.0-38-generic
Network: Card-1: Marvell 88E8053 PCI-E Gigabit Ethernet Controller
driver: sky2 v: 1.30 port: 1000 bus-ID: 02:00.0
IF: enp2s0 state: down mac: <filter>
Card-2: Broadcom BCM4321 802.11a/b/g/n
driver: b43-pci-bridge bus-ID: 03:00.0
IF: wlan0 state: up mac: <filter>
Drives: HDD Total Size: 250.1GB (5.8% used)
ID-1: /dev/sda model: ST3250824AS_Q size: 250.1GB
Optical: /dev/sr0 model: MATSHITA DVD-R UJ-85J
rev: FCQA dev-links: cdrom,cdrw,dvd,dvdrw
Features: speed: 24x multisession: yes
audio: yes dvd: yes rw: cd-r,cd-rw,dvd-r state: running
Partition: ID-1: / size: 182G used: 7.3G (5%) fs: ext4 dev: /dev/sda3
ID-2: swap-1 size: 7.00GB used: 0.00GB (0%) fs: swap dev: /dev/sda4
RAID: No RAID devices: /proc/mdstat, md_mod kernel module present
Sensors: System Temperatures: cpu: 43.0C mobo: N/A gpu: 51.0
Fan Speeds (in rpm): cpu: 997
Info: Processes: 187 Uptime: 21 min Memory: 400.8/3012.1MB
Init: systemd runlevel: 5 Gcc sys: 5.4.0
Client: Shell (bash 4.3.481) inxi: 2.2.35
macuser@macuser-iMac ~ $
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: Boot manager needed for 2006 iMac

Post by fabien85 »

Congrats

For the record, this seems to be the full specs of the machine : https://everymac.com/systems/apple/imac ... specs.html

It's one of these peculiar machines with a 32-bit EFI and a 64-bit CPU.
Did you install 32-bit or 64-bit by the way ?
You can install 64-bit in Legacy mode, so it may be what you did.

It's a bit funny that refind provides an entry for the linux kernel.
This is normal in 64-bit, because the kernel has EFI 64-bit support so it can bootload itself. But as far as I know this support is not available for 32-bit EFI, so the entry shouldnt even be there (unless update happened to refind and/or the kernel that I'm not aware of). This is probably the reason why booting the Mint entry fails at a point. (I'm even surprised it starts at all)
There is a way to hide this entry if you are interested.
User avatar
rumplestiltskin
Level 2
Level 2
Posts: 58
Joined: Fri Feb 16, 2018 7:34 pm
Location: West of the Pecos

Re: Boot manager needed for 2006 iMac

Post by rumplestiltskin »

fabien85 wrote: Thu Nov 22, 2018 6:43 am Congrats

For the record, this seems to be the full specs of the machine : https://everymac.com/systems/apple/imac ... specs.html

It's one of these peculiar machines with a 32-bit EFI and a 64-bit CPU.
Did you install 32-bit or 64-bit by the way ?
You can install 64-bit in Legacy mode, so it may be what you did.

It's a bit funny that refind provides an entry for the linux kernel.
This is normal in 64-bit, because the kernel has EFI 64-bit support so it can bootload itself. But as far as I know this support is not available for 32-bit EFI, so the entry shouldnt even be there (unless update happened to refind and/or the kernel that I'm not aware of). This is probably the reason why booting the Mint entry fails at a point. (I'm even surprised it starts at all)
There is a way to hide this entry if you are interested.
- Yes, this is one of the "peculiar" 32/64-bit machines. I don't recall exactly what I saw that convinced me to install 32-bit Mint; might have been something at the Mint page and/or the fact that this iMac is limited to 3GB of RAM (even if 4GB is installed, it only sees 3GB).
- I did see some files in the refind folder (after I unipped the download) that referred to 64-bit but, not knowing whether I should delete anything from that folder before attempting the install, I just left it alone and did the refind install.
- When I did the first boot into refind, of course I chose the Mint entry so it was a surprise when it "went verbose" and then hung. I thought I had totally pooched everything and would have to lobotomize and start over.
- As I mentioned, the generic Linux entry to its right was the next thing I tried after a reboot and it worked. (Oh happy day!)
- Yes, I would like to know a way to hide that dangerous refind entry.

I've done a number of updates to Mint (everything that's appeared in the update manager - I think I have the name right; I'm on my Mac right now) and it's running very well; not bad for a 12 year old Mac whose original owner dropped it off and asked me to wipe it clean before I bring it to the recycling center. I did the wipe but it's running Mint so well I can't think of a reason why it shouldn't continue being a happy camper in my workshop.


Thanks,
Barry
User avatar
rumplestiltskin
Level 2
Level 2
Posts: 58
Joined: Fri Feb 16, 2018 7:34 pm
Location: West of the Pecos

Re: Boot manager needed for 2006 iMac

Post by rumplestiltskin »

Yes, it was the everymac entry that led me to install 32-bit.
Screen Shot 2018-11-22 at 9.13.42 AM.png
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: Boot manager needed for 2006 iMac

Post by fabien85 »

When you launch the entry vmlinuz-..., what you do is to launch the so-called EFI stub loader so that the kernel bootloads itself, i.e. it makes the hardware initializations etc before loading itself. The fact that the boot went verbose is perfectly ok and expected, the first time you launch a kernel through refind. That's what happens to me when I install refind the first time (on a 64-bit machine with 64-bit EFI, so that the entry perfectly works). You can later tweak it if you want.
In your case the EFI is 32-bit but the CPU is 64-bit, so that's probably what confuses the kernel. The EFI stub loader is relatively recent, at least more recent than grub. I thought it was not even available for 32-bit, but it turns out it now is. Anyway it was probably not designed with these hybrid 32/64-bit machines in mind.

I will come back later with instructions on how to hide this entry (and customise the appearance of refind if you want). I have to run to a meeting right now.
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: Boot manager needed for 2006 iMac

Post by fabien85 »

Refind is an EFI executable (as the name suggests), so it lives on the EFI partition, which is the first partition in your case : /dev/sda1 formatted as FAT
The configuration file that rules the refind appearance and behaviour is also on that partition (that way, refind is independent of OSes, e.g. it is not affected if you remove macOS or Linux)

What you need to do is to get access to that file by mounting that EFI System Partition (ESP in the following).
On a Linux system installed with EFI, that partition would be mounted and available at /boot/efi
In your case you installed as Legacy, so you shouldn't find anything at /boot/efi normally (but check).

Here it depends whether you want to get access to the ESP only once, or whether you would like to keep easy access to it in future. (I would go for the second solution, be it only in case you need to experiment a bit to get exactly the refind behaviour that you want. But it's your choice)

One-time access:

Code: Select all

sudo mount /dev/sda1 /mnt
the ESP will be available at /mnt . You should see there an EFI/ directory containing an APPLE/ directory and a refind/ directory. The refind config file is refind.conf so you can edit it with

Code: Select all

sudo nano /mnt/EFI/refind/refind.conf
(nano is a text editor, ctrl+o saves a file, ctrl+x exits the editor. you can use another editor if you want, but you will need to open the file as root to be able to write the changes)

Recurrent access:
Put an entry in the fstab for the ESP to be mount at /boot/efi. To do this:
1) Find the UUID of the ESP

Code: Select all

lsblk lsblk -o NAME,FSTYPE,UUID
locate the sda1 and copy the UUID
2) edit the fstab

Code: Select all

sudo nano /etc/fstab
Add the following two lines in the file:

Code: Select all

# /boot/efi is on /dev/sda1
UUID=the-uuid     /boot/efi     vfat    noatime,utf8,fmask=0133,errors=remount-ro      0       1
where the-uuid is the UUID found in step 1.
You should keep a blank line at the end of the fstab file. Save your changes with ctrl+o and exit nano with ctrl+x
3) Tell the system to remount partitions

Code: Select all

sudo mount -a
4) Now the ESP should be available at /boot/efi, so you can edit the refind config file with

Code: Select all

sudo nano /boot/efi/EFI/refind/refind.conf
Now have a look at http://www.rodsbooks.com/refind/configfile.html to learn how to tweak refind to your liking.
The file itself contains lots of comments (lines starting with a #) that should make most things self-understandable
e.g. one of the first thing you can tweak is the timeout, i.e. how long refind waits before booting the default entry. It's the tag "timeout". Further in the file you have a tag to control the default entry you want to boot, with the tag "default_selection".
To hide an entry, you can play with the tags "dont_scan_volumes", "dont_scan_dirs" and "dont_scan_files".
e.g. you can give a label (say Mint) to your Linux filesystem with gparted (from a live medium), and then use the line dont_scan_volumes Mint. Or you can use the hammer dont_scan_dirs +,boot.

By the way http://www.rodsbooks.com/refind/themes.html also explains how to theme refind if you want, i.e. change the background image, the OS icons... Some cool-looking themes are shown and available on the page.
User avatar
rumplestiltskin
Level 2
Level 2
Posts: 58
Joined: Fri Feb 16, 2018 7:34 pm
Location: West of the Pecos

Re: Boot manager needed for 2006 iMac

Post by rumplestiltskin »

Thank you for your help. I had happened upon Rod's site last night but didn't try any of his instructions as it was late and I was tired. Glad to have your instructions in the light of day. :D

Barry
fabien85
Level 7
Level 7
Posts: 1877
Joined: Tue Mar 11, 2014 4:30 pm

Re: Boot manager needed for 2006 iMac

Post by fabien85 »

I just found out that there is a much simpler way of hiding the entry, introduced in the latest versions of refind.
Just select the entry and press the key "-".
This is documented here : http://www.rodsbooks.com/refind/configfile.html (section "Hiding entries dynamically")
User avatar
rumplestiltskin
Level 2
Level 2
Posts: 58
Joined: Fri Feb 16, 2018 7:34 pm
Location: West of the Pecos

Re: Boot manager needed for 2006 iMac

Post by rumplestiltskin »

Perfect! Thanks. Easy-peasy.

Hope you're having a great Thanksgiving weekend.

Barry
Locked

Return to “Beginner Questions”