Skip to content

Instantly share code, notes, and snippets.

@LividJava
Created May 25, 2022 17:07
Show Gist options
  • Save LividJava/d8d03b060de2b486d0fc9946454eded6 to your computer and use it in GitHub Desktop.
Save LividJava/d8d03b060de2b486d0fc9946454eded6 to your computer and use it in GitHub Desktop.
Installing 64-bit Void Linux on the dumb Best Buy NS-P11W7100

The Issue.

For the longest time since I've owned this damn tablet I've been trying my damnest to install a 64-bit operating system on this thing. It's a 64-bit processor with a damn, 32-bit UEFI, bascially meaning the thing will refuse to boot from 64-bit EFI files. Trying to boot 32-bit OSes just kinda defeats the purpose of this project.

Why Void Linux?

It wasn't my first choice but rather the one that was forced upon me. That isn't to discredit Void it's a great distibution with zero bloat and for one of the "DIY" Installs, the void installer is actually pretty handy way better than archinstall. Trying to boot Arch or Arch32 or Manjaro, or anything just was not detected by the firmware, and headache after headache they still refused to boot. I actually did manage to get Manjaro 32-bit installed, but it was just completely unusable. ArchLinux32 just refused to even be detected. At some point I just started looking around for Non-Debian distributions that supported 32-bit processors. Which suprisingly isn't a lot, but knowing what I know now through this battle. It doesn't matter.

The Install.

I had a bunch of help from people in this whole thing. People from the #xbps IRC channel, people from The Linux Experiment discord. Yeah this was an effort.

You can download and boot the 64-bit (glibc) iso file and boot it safely, I downloaded the XFCE ISO because I'm lazy, and did not want to deal with installing and configuring a DE, at least not right now. I just wanted a bootable Operating system.

After downloading your prefered image pop # void-installer (as root) into a terminal and go through the setup. But here is the important part SKIP THE BOOTLOADER SETUP just click on "I'll do it myself" or the equivalent option. After setting up all that, DO NOT REBOOT you still have some steps to setup! Rebooting at this point will make your system unbootable.

The next steps.

We need to get into the chroot. To do this we need to mount the pseudeo-filesystems, This process is taken DIRECTLY from the voidlinux documentation.

Because we already installed Void we need to mount that installation: Credit to aedinus and quinq for helping me out with this step.

# mount /dev/mmcblk1p3 /mnt/

Some notes about this, your partition may be different, make sure you remember where your root mount actually IS from the installation process, If you can't remember run lsblk and pray you can remember from that.

Run these commands (as root)

# mount --rbind /sys /mnt/sys && mount --make-rslave /mnt/sys
# mount --rbind /dev /mnt/dev && mount --make-rslave /mnt/dev
# mount --rbind /proc /mnt/proc && mount --make-rslave /mnt/proc

Copy the DNS configuration into the new root. (as root)

# cp /etc/resolv.conf /mnt/etc/

Chroot into the new installation (as root):

# PS1='(chroot) # ' chroot /mnt/ /bin/bash

If at any point you get directory doesn't exist, just create them in the /mnt/ folder (aside from the last step).

If the last step fails (you'll likely get an error that /bin/bash does not exist), you incorrectly mounted something.

AFTER THIS STEP WE CAN FINALLY INSTALL GRUB

Mount your EFI parition that you (hopefully) made in the installation:

(chroot) # mount /dev/mmcblk1p1 /boot/efi

And Install 32-bit GRUB:

(chroot) # grub-install --target=i386.efi --efi-directory=/boot/efi --bootloader-id="Void"

After it succeeds. Exit the chroot and reboot:

(chroot) # exit
# shutdown -r now

Pick a god and pray.

If you land on a login page. CONGRATION YOU DONE IT!

If you land on a GRUB terminal. DON'T PANIC THERE'S STILL HOPE YET It means GRUB was properly installed! BUT hit a snag along the way, all we need to do is manually boot the system and fix it from within the OS. It's easy trust me.

Manually booting the system

First things first, we need set the pager value, because somethings can be long and we can't scroll.

grub> pager=1

With that set we can start trying to find our Linux installation!

grub> ls

You are likely to get similar results to these:

(hd0) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (hd1) (hd2)

We can see that hd0 has 3 partitions and is likely where our OS is installed we can go through them one by one to list off any information they might have like so:

grub> ls (hd0,gpt1)/
efi/

This is where GRUB is installed and doesn't really help us here. Let's try the gpt3 one:

grub> ls (hd0,gpt3)/
lost+found/ boot/ lib64 ... (it goes on)

AHA!, HERE IT IS, this is our actual linux installation and now we can actually boot from it!

let's read out the contents of the boot folder:

grub> ls (hd0,gpt3)/boot
efi/ vmlinuz* initramfs*.img ... (it goes on)

Okay! we can boot the system!

We need to set the root, Linux Kernel, and initrd before booting. Run these commands next:

grub> set root=(hd0,gpt3)
grub> linux /boot/vmlinuz-3.XX.X (you can press tab to autofill) root=/dev/mmcblk1p3
grub> initrd /boot/initramfs-5.XX.XX (press tab)

Got it all setup without any errors? Good now type your last command in this terminal:

grub> boot

After booting there is one extra thing you gotta do! Open a terminal after logging in and run (as root) this command:

# update-grub

After that? you're all done! CONGRATS ON YOUR NEW VOID INSTALLATION!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment