SolidHal / PrawnOS

Libre Mainline Kernel and Debian for arm laptops
https://www.PrawnOS.com
GNU General Public License v2.0
112 stars 30 forks source link

Latest release doesn't seem to boot from USB properly on CS10, but after a chroot and apt upgrade, it does? #279

Open spoelstraethan opened 3 years ago

spoelstraethan commented 3 years ago

I've used this set of steps to "rescue" installations for ArchLinuxARM and PrawnOS (and other distros like Ubuntu to repair things if there is something funky with the kernel or initramfs and it doesn't boot properly).

# this varies based on whether you've performed a microSD or eMMC or USB installation
# ARCH_DISK=/dev/mmcblk1p
ARCH_DISK=/dev/sda

# use -R otherwise youmight  get a warning about /media/removable/YourDevice being busy, the -R unmounts that first then unmounts the parent device
umount -R "$ARCH_DISK*"

mkdir -p /tmp/root
mount ${ARCH_DISK}2 /tmp/root

# If you want to do more customization/upgrades before rebooting
# Taken from: https://wiki.archlinux.org/index.php/chroot#Using_chroot
mount --bind /tmp/root /tmp/root
cd /tmp/root
cp -R /etc/resolv.conf etc
mount -t proc /proc proc
mount --make-rslave --rbind /sys sys
mount --make-rslave --rbind /dev dev
mount --make-rslave --rbind /run run    # (assuming /run exists on the system)
chroot /tmp/root /bin/bash

# I do this from the chroot in ChromeOS so I can update all the packages and detect issues BEFORE fighting with networking or Xorg/Wayland after rebooting
apt update && apt upgrade -y

# or for ArchLinuxARM
# pacman -Syu

# Ctrl+d or `exit` to leave chroot

pkill gpg-agent # started by pacman-key --init and pacman

cd /tmp # get out of root directory to release file handles
umount -R /tmp/root # recursively unmount all the binds/mounts we created
sync
reboot

# Ctrl+U at the Developer Mode screen and now your Chromebit should load PrawnOS.