Arch Linux dual boot side project

Blog Home Index & Contents

File this under “Stuff I know I will have to revisit again someday, documenting now in case it happens again later and doesn't hurt my brain twice”.

UPDATE 12/15/2021 Unsuccessful. All attempts below did not work. They came very close. The hardware I'm trying to install on is too old. I did learn a massive amount though. I'm sure I can install on newer hardware. I have a couple of old PC's I will try next. Someday. On to other things now.

False Start #1 attempt Linux Mint v21 dual boot on Macbook Pro -- failed

I wasn't bored, I just got sidetracked, which happens often in the IT world. I admit, I gave up the ghost on Linux Mint install early.
Someone, someplace has this working, just not me and not today.

Attempted to install Linux Mint v21 as a dual boot on my Macbook Pro 7,1 mid 2010 with a 250GB Samsung 850 EVO SSD drive. 3 years ago I had Linux Mint v19 installed and it worked well for a few months then crashed and burned and wouldn't boot the 154 GB Linux partition anymore. Mac OSX still booted fine on the 95.5GB HFS+ main first partition

Fast forward to 12/03/2021. I still have the same 154.5 GB Linux filesystem partition on the Macbook Pro and thought I thought v21 would be better. It installed fine from USB stick. I connected the Macbook Pro mid 2010 to an ethernet cable because it didn't find the WiFi correctly. Went to Administrator in the menu and then clicked on Driver Manager and it found the wifi driver and then also found the NVidea graphics card driver. I said OK to both of those and rebooted and I get a blank screen. Blah. Tried several new installs of that. It lights up the screen a little so I know it is running. The graphics driver is not working. Must be the wrong graphics driver. This happened twice so I gave up too easy probably.

False Start #2 Side project: Arch Linux install !!

Different approch. I read about different Linux distros. So lets try Arch Linux for a change. It is supposed to be a medium to difficult install recommended only for those with good Linux experience and I will add, and a lot of pacience too. I would say I have low Linux install skills, but pretty good Linux and Unix skills. So what the heck, I can try.

Create the USB Linux boot thumbdrive

  1. I found my Sandisk 32GB USB thumbdrive and got all the data off of it that I didn't need. I think I formatted it with Disk Utility from the Mac side. Just beware Disk Utility Erase does just that, it erases. So triple check you have the correct disk.
  2. Tried a few USB installation and then went with Etcher
  3. Go to https://www.balena.io/etcher/ and download the MacOS version currently it is 1.7.1 at the time of this writing
  4. Download Arch Linux from https://archlinux.org/download/
  5. Scroll down to HTTP Direct Downloads near the middle of the page. There are lot of mirrors. Choose one near you.
  6. I clicked one of the many United States rackspace.com to choose from
  7. archlinux-2021.12.01-x86_64.iso <-- I downloaded this distro version 2021.12.01 I like that the versions are the date. Nice
  8. Open BalenaEtcher app on Mac OSX
  9. follow the prompts. Chose the iso you just downloaded as the file, choose your USB drive as the target. And make sure it really is the USB thumbdrive and not one of your other disks
  10. click flash

Boot Arch Linux from USB thumbdrive on MAC OSX

  1. Powerdown/shutdown Mac OSX
  2. Insert USB thumbdrive into USB port
  3. Hold down ALT or OPTION key. Keep holding it. Press the power button on the Macbook Pro
  4. You will see a Yellow USB thumbdrive icon with a USB symbol on it, probably to the right and it will say EFI Boot. There will also be your Mac OSX boot and another EFI boot area too.
  5. Click the big ARROW unter the Yellow USB Thumdrive
  6. You have the choice of Arch Linux install medium (x86)64, UEFI) with or without speech. I tried the one with speech and it is cool because it says outload everything you type and everything typed out. That was too cool, so I switched back to the option without speech.
  7. Select by arrowing up or down, Arch Linux install medium (x86)64, UEFI) then press ENTER
  8. Linux starts up just like in the old days and you wind up with a command line prompt.
  9. Watch as it boots up and note any errors. Mine says it cannot find the b43 driver which is the WiFi adapter driver.

Arch Linux resources

  1. I used the following resources to install Arch Linux. Arch Linux is a fairly involved install. Not for the faint of heart.
  2. Start here, this is the Arch Linux install bible: Wiki Arch Linux installation guide
  3. Wiki Arch Linux main <-- when all else fails read the manual, and this is a very detailed manual. I recommend you spend some time. And the answers are in the details, don't skip the details.

Optional Arch Linux resources that I also used:

  1. Watch this video from March 3 2021: Arch Linux: Full Installation Guide - A complete tutorial/walkthrough in one video! This IT guy is good
  2. Arch Linux part 1 Nickolas Kraus Nicolas Kraus Arch Linux install guides parts 1, 2, 3
  3. Arch Linux part 2 Nickolas Kraus
  4. Arch Linux part 3 Nickolas Kraus
  5. Arch Linux Reddit group

When all else fails go back to ArchLinux.org

Arch Linux Installation

  1. Finally we can sart getting to the meat of the install !!
  2. You will see something like root@archiso ~ #
  3. If you want to follow along in Nickolas Kraus tutorial you are here on Part 2 at this point Arch Linux part 2 Nickolas Kraus

Arch Linux not finding WiFi adapter

  1. I booted back into Mac OSX (recommend you do this first and write down the Adapter info), upper left corner, click the Apple, click About this Mac

  2. click software report

  3. Under Network, click Wi-Fi, wait 6 sec

  4. My Wi-Fi adapter is:

    Airport Extreme
    Broadcom BCM43xx 1.0
    802.11 a/b/g/n

Arch Linux installation WiFi adapter problems on Mid 2010 Macbook Pro

  1. type the command

    ip link show
    1. My Broadcom Wi-Fi adapter doesn't show in the list for my Mid 2010 Macbook Pro
  2. type the folowing 5 commands:

    rmmod b43
    rmmod bcma
    rmmod ssb
    rmmod wl
  3. type the following command which will Add the wl module:

    modprobe wl
  4. now type the command again

    ip link show
  5. Now I see my Wi-Fi adapter at the bottom of the list

    wlan0: <BROADCAST, MULTICAST, UP, LOWER_UP> mtu 1500 qdisc fq_code1 state UNKOWN mode DEFAULT group default qlen 1000
  6. supposedly now you use iwctl utility to authenticate the wlan0: Adapter by typing

    iwclt device list
  7. I see nothing. I am supposed to see my Wi-Fi wlan adapter

  8. type

    iwctl adapter list
  9. I see the following:

    phy2 Powered:on Vendor:Broadcom Inc. Model:BCM4322 802.11a/b/g
  10. type the command the 14e4 might be different for your setup

    lspci -vnn -d 14e4:
  11. or type

    lspci -kvd::280
  12. lspci returns info about my wi-Fi and ethernet adapters. The first and last lines reads:

    Broadcom Inc. BCM4322 802.11a/b/g/n Wireless Lan Controller [14ef:432b] (rev 01)
    Kernel driver in use: wl
    Kernel modules: ssb, wl
  13. click here to check Wireless lan controller compability w Linux

  14. type this to see system log info related to wl so far. dmesg command also called “driver message” or “display message” is used to examine the kernel ring buffer and print the message buffer of kernel

    demsg | grep wl
  15. Now what?

  16. For now I am going to connect the Macbook Pro to a hardwire ethernet connection and continue the install. I'll fix the wi-fi later

Connect to wired ethernet

  1. Borrowed one of my 3 Tp-link Deco 5 mesh routers, not the main router, but one of the satellite routers, specifically moved the one from the garage into my office and powered it up there.
  2. Plugged an ethernet CAT-5 cable into the Deco 5 and the other end into the Macbook Pro ethernet port
  3. Conintue the Arch Linux install

Partition drive leaving OSX partition intact

  1. I alreay have a 154.08 GB Linux partition /dev/sda4 and a 95.5GB OSX HFS+ partition /dev/sda1.
  2. Go to the 32 minute mark of this video Arch Linux: Full Installation Guide - A complete tutorial/walkthrough in one video!. Warning he is not keeping his OSX partition, he is blowing away the entire disk, so if you follow exactly what he does you will not have OSX anymore it will not be a dual boot.
  3. Note: You don't need a SWAP partition anymore, swap files are used now on modern Linus installations and they are probably faster.
  4. So you just need one partition for modern Linux. In the old days it took several partitions. Not anymore.
  5. Again: Be careful with this step if you want to keep your OSX partition.
  6. Note: The partition type of the Arch Linux partition does not matter, as it will be reformatted.
  7. Go to 37 min mark of video. I want to change 4th partition, the Linux partition type to Linux LVM so I type
    fdisk /dev/sda
  8. it types
    Command (m for help):
  9. I type p to list all the partitions
    p
  10. fdisk shows me the partion table. Which I have 4 partitions and the 4th one is the Linux partition
  11. I type t to change the partition type
    t
  12. to change the type and it says and I type 30 for Linux LVM
    Partition number (1-4, default 4): 30
    Changed type of partition to "Linux LVM"
  13. type w to write the partition table
    w
    The partition table has been altered.
  14. create the LVM on /dev/sda4 the 4th partition which is Linux partition. This is for my case. It may be different for your case
  15. type
    pvcreate --dataalignment 1m /dev/sda4
  16. it replies:
    Warning: ext4 signature detected o /dev/sda4 at offset 1080. Wipe it? [y/n]: y
    Wiping ext4 signature on /dev/sda4.
    Physical volume "/dev/sda4" successfully created.

Create LVM's Logical Volume Groups (like partitions)

  1. Next create a volume group. Use the partition name were you will be putting your Linux, in my case sda4
  2. A volume group is a container of logical volumes
  3. logical volumes are essentially the same as partitions
    vgcreate volgroup0 /dev/sda4
    Volume group "volgroup0" successfully created
  4. Now create a locgical volume in volgroup0 (similar to a partition)
    lvcreate -L 30GB volgroup0 -n lv_root
    logical volume "lv_root" created
    lvcreate -l 100%FREE volgroup0 -n lv_home (or example: use "-L 250GB" to make volume size lower)
    logical volume "lv_home" created
  5. load dm_mod, scan for volumes, activate the volumes
    modprobe dm_mod
    vgscan
    vgchange -ay
  6. format lv_root the root partition
    mkfs.ext4 /dev/volgroup0/lv_root
  7. mount the root partition
    mount /dev/volgroup0/lv_root /mnt
  8. format lv_home the home partition
    mkfs.ext4 /dev/volgroup0/lv_home
  9. Create the home partition mount point
    mkdir /mnt/home
  10. Mount the home volume
    mount /dev/volgroup0/lv_home /mnt/home
  11. Create the /etc dirctory
    mkdir /mnt/etc
  12. Create the /etc/fstab file
    genfstab -U -p /mnt >> /mnt/etc/fstab
  13. Check the /etc/fstab file, it should have 2 UUID's one for lv_root and one for lv_home
    cat /mnt/etc/fstab

Can we finally start installing Arch Linux (moving files into the new logical volumes)?

1:01 (1 hour and 1 minute mark) of this video: Arch Linux: Full Installation Guide - A complete tutorial/walkthrough in one video!

click here then search this page for Install Arch Linux and do those commands they will be the same commands that I used. This is because we setup volgroup0 and then created the partitions inside of that.

using pacman -S I installed both linux and linux-lts (long term) and headers for both. Then at boot time I can select either of them so if I mess up one of them I will still have the other running.

  1. Mount the boot partition

    mount /dev/sda1 /mnt/boot <-- in my case because I have an EFI partition there already

SSH into ArchISO USB thumbdrive live install

Install Arch Linux via SSH from local system

Make life easier so I can cut and paste commands.

Type passwd command after booting USB live Arch to change root password to arch of whatever you desire

passwd
arch
arch

Show ip of the Arch ISO usb. Type this on Arch USB system

ip address

SSH from terminal app from a local system to the Arch USB live iso

ssh root@192.168.xx.xx

Worked 1 time. After I rebooted the Arch USB live ISO I got an error when I SSH'd from the iMac to the Arch usb

  ssh root@192.168.xx.xx

Getting the following error and not able to connect from iMac to Arch installs

  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  @    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
  Someone could be eavesdropping on you right now (man-in-the-middle attack)!

  ECDSA host key for 192.168.68.109 has changed and you have requested strict checking.
  Host key verification failed.

The Fix

on iMac
  open a terminal on the Mac you are using to SSH to the other Mac
  cat ~/.ssh/known_hosts
  nano ~/.ssh/known_hosts

  delete the line with the same ip address as the Arch Linux install system the one you are trying to upgrade . Save the edited file.
  ^K = nano command to Delete line
  ^O = nano command to write Out file (then press ENTER to save the file)
  ^X = nano command to eXit

  try the following command again:

  ssh root@192.168.68.109

  if the password does not work

  Go to the remote system, the one you are booting from the Arch USB thumbdrive. Might have to do the following command on the remote system keyboard:

  password
  arch
  arch

  ssh root@192.168.68.109

  It works!!

Troubleshooting new installation of Arch Linux on Macbook Pro 7,1 mid 2010 (old)

Dang, new system boots from Hard Drive then freezes 2 lines into the Arch Linux boot. Tried again to boot and now Grub won't boot the LVM volume. The error is Startimage missing  I think it is the NVIDIA graphics card that is causing the hang, and something is not right in the EFI Grub area. First fix Grub EFI boot.

Boot from the USB live thumbdrive again until you see the prompt root@archiso / #

Note: already have Arch Linux installed on the SSD hard drive in the LVM so don't touch the /dev/sda4 partition during troubleshooting
Show partitions/drives on the system as a refresher
fdisk -l

/dev/sda1   200M EFI System       <-- EFI boot in this case it is GRUB. Yes you can alter this, reformat and start over if you want.
/dev/sda2  88.3G Apple HFS/HFS+   <-- OSX partition - do not alter this partition
/dev/sda3 619.9M Apple Boot       <-- Apple Boot partition - do not alter this partition
/dev/sda4 143.5G Linux LVM        <-- New Arch Linux LVM (Logical Volume Manager) partition. LVM is very cool and handy, give it a try

/dev/sdb1   776M Empty            <-- USB Arch Linux live drive installer files area. Not sure why it says it is Empty.
/dev/sdb2    74M EFI              <-- EFI boot on USB thumbdrive created from BalenaEtcher app

Format EFI area on the SSD hard drive again

Already created the EFI GRUB partition so just need to format it and reload GRUB
mkfs.fat -F32 /dev/sda1
Mount the root and home volumes and boot volume too if needed
mount /dev/volgroup0/lv_root /mnt
mount /dev/volgroup0/lv_home /mnt/home
mount /dev/sda1 /mnt/boot

Fix GRUB. Setup and install GRUB again

Create the EFI directory. Not sure why the EFI directory was not there because it was created in the first install process
mkdir /boot/EFI

Mount the EFI partition

mount /dev/<DEVICE PARTITION 1> /boot/EFI
mount /dev/sda1 /boot/EFI   <-- this is my case, yours might be different

Access the in-progress Arch installation that was already done previously. Cool command to access the Arch Files installed on SSD into the LVM

arch-chroot /mnt

Show the mounts, partitions and volumes

lsblk

Install pactree

pacman -S pacman-contrib

check if GRUB installed

pactree GRUB

Install GRUB into /boot/EFI which is mapped to /dev/sda1 with the mount command:

grub-install --target=x86_64-efi --bootloader-id=grub_uefi --recheck  note: default is --target=x86_64-efi so you can omit that part

Grub now works well and boots everytime!!

Arch Linux still hangs

Reboot
when you see the GRUB menu press  e
scroll down and find the quiet command and delete
Press F10
it will boot in a more verbose mode which shows that it is hanging at
starting Hostname Service

No vmlinuz-linux in /boot

The normal reason this is hanging at this point is because /boot is not mounted. Which it wasn't in fstab and wasn't persistently mounted!!
And there is no vmlinuz in /boot.  I must have messed that up during installation
So booted the USB live Arch again and mounted root and home again and then also did
mount /dev/sda1 /mnt/boot
if the mount point doesn't exist then
mkdir /mnt/boot

I can ssh into the system from my iMac for instance using this command:

ssh root@192.168.68.109

install linux again this time make sure /boot is mounted to /dev/sda1

pacstrap /mnt base linux linux-firmware

now I see vmlinuz-linux in /mnt/boot

keep your fingers crossed and rebooted
Dang. not quit
Well it got past Started Hostname Service
froze up at Finished Load/Save Screen Backlight Brightness of leds:smc::kdb_backlight.
Try a few more things
press e when you see the GRUB menu at bootup. Ed the file to not be quiet
also changed from loglevel=3 to loglevel=7 which is a lot more detailed output.

There is a bunch of errors that Nvidia GeForce 320M GPU in this system is supported through the
NVIDIA 340.xx legacy drivers. Please visit http://www.nvidia.com/object/unix.html for more info.
The 495.44 NVICIA driver will ignore this GPU.
No NVIDIA GPU fount.
remove Nvidia wireless_tools and Nvidia-lts
pacman -R NVIDIA
pacman -R wireless_tools
pacman -R NVIDIA-lts
reboot with loglevel=7 and see if removing the graphics software and wireless_tools helps.
nope, that didn't help. I'm thinking about starting over.

Removing everything but essential packages 12/13/2021 9pm

Busy with christmas and other things, so haven't touched Arch linux dual boot box for awhile. I decided to remove everything except the base packages. You can see how to do this on the wiki.archinux.org pages here

[remove everything except essential packages](https://wiki.archlinux.org/title/Pacman/Tips_and_tricks#Removing_everything_but_essential_packages)

False Start #3 -- Not giving up, trying something new download ArchCraft (based on ArchLinux) 2021-12-14

Download ArchCraft, a Linux Disto based on ArchLinux, from [ArchCraft.io](https://archcraft.io/download.html#second) v 2021.10.12 size=2.06GB
Balena Etcher to create bootable USB. Which in this case is a 4GB microSD card plugged into a SD adapter plugged into the SD slot on the iMac
10 min to create the bootable ArchCraft
Etcher validation took a couple minutes
Etcher is done

boot ArchCraft SD card

Plug the MicroSD card into the macbook pro, press the power button and now hold alt key for a few seconds
Boot the SD card, it is an icon that looks like an SD card
Grub screen pops up with 4 choices
Try choice #1, it boots slow about 2 minutes, screen blanks, curser flashes upper left corner then nothing

Try booting from SD card again w NVIDIA support

boot again from SD card
Try choice #3 with NVIDIA
again takes a minute for the screen to show 3 small squares
again just a flashing cursor and no progress
looks like it doesn't like the graphics drivers

Try the SD Card boot into RAM

boot again from SD card
try choice #2 boot to RAM
It is slow to boot, 4 min

ArchCraft boot install is not progressing

Next !!!! False Start #3 Try Manjaro also based on Arch linux 2021-12-14 11pm

Downloaded Manjaro iso w Gnome desktop environment from [here](https://manjaro.org/downloads/official/gnome/)
There ar 3 flavors
1) XFCE which is designed to be lightweight for older hardware and looks similar to Mac OSX
2) KDE similar in look and feel to Windows 10
3) Gnome
10 min to download 3.3GB

Use BalenaEtcher to create the boot USB (in this case SD card)

12 minutes until this is done

It boots and I can see stuff, but then it seems to freeze
I did read that it is terrible with the track pad, so maybe I should try plugging in a USB mouse???

Download Manjaro minimal with XFCE desktop 2021-12-14 11:30pm

6 minutes to download
12 min to burn to USB (SC card)
plug into macbook pro SC card slot and boot holding down ALT key
Looks like ArchLinux booting up. no errors

I see a mouse cursur and now I see graphics!! It seems to be working !!!!!!!!!!!!! Yahoo !!

Install Manjaro dual boot 2021-12-15 1AM

Click Install near the bottom of the Screen
It recognizes LVM which I had setup previously. At the top of the screen I select volgroup0 I selected Replace a partition
it doesn't look like it will keep the LVM using this installer though.
When I click on Manual Partition then it recognizes LVM
Trouble with trying to create LVM and EFI. It wants at least 300M efi boot area.

boot Arch Linux thumbdrive to repartition

Repartition /dev/sda disk
create a 2nd new 500M EFI FAT32 boot partiion where /dev/sda4 is. This is because it is easier to create a 2nd EFI that is larger than to try
and grow the original 200M EFI
create a new LVM vg0 at /dev/sda5
do the steps above to create and format both. EFI is formated FAT32 and LVM is formatted type 30 LVM careful not to touch the other partitions

Now install Manjaro

select Manual Partition
do not format the LVM or anything edit EFI and do not format
edit LVM and do not format. Put in the mount points.
It did the entire install then crashed when it tried to install Grub to the new EFI
The advanced automated Manjaro installer just does not seem to like LVM
Research shows to use Manjaro Architect to install manually
I looked all over. Supposed to be a button to click from the Live CD iso install to start up Manjaro Architect
Finally figured out Manjaro dropped support for Manjaro Architect early in 2021.

Install Manjaro from CLI (terminal Command Line Interface) Works !!

Followed this web page pretty much to the letter
[How to install Manjaro using CLI only](https://archived.forum.manjaro.org/t/howto-install-manjaro-using-cli-only/108203)
It worked. Did take awhile, maybe 1 hour
no graphics just cursor but that is OK

Install base Desktop environment

Followed this guice [Install Desktop Environment](https://archived.forum.manjaro.org/t/howto-extend-manjaro-cli-to-lxde/110139)
I typed startx and X tried to work. Fllickered screen then went blank.

pacman -S xorg-twm xorg-xclock xterm

This pacman command fixed it !!!  Popped up 2 X-terminals