Sunday, May 3, 2020

How to install Arch Linux on a multiboot USB stick with persistent storage

This post follows the previous ones and add Arch Linux to the USB stick and with persistent storage in the removable USB partition.

1) Download the iso file and copy to the ISO folder of the partition. The iso file can be downloaded from https://www.archlinux.org/download/

2) Create the partition required for the persistent ext4 storage say /dev/sda4 and find out the UUIDs of the ISO partition and also the persistent partition. In Arch Linux, the persistent partition is called cow_device.

3) Manually, add the menuentry in grub.cfg for Arch Linux as below
grub.cfg    Select all
menuentry "Arch Linux Persistent" { set isofile="/archlinux-2020.05.01-x86_64.iso" # In Linux, you can find UUID by using : sudo blkid /dev/sda? set uuid="XXXX-XXXX" set imgdevpath="/dev/disk/by-uuid/$uuid" # search --fs-uuid --no-floppy --set=isopart $uuid loopback loop (${imgdevpath})${isofile} linux (loop)/arch/boot/x86_64/vmlinuz nomodeset loglevel=0 img_dev=$imgdevpath img_loop=$isofile earlymodules=loop cow_device=/dev/disk/by-uuid/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rw persistent quiet splash initrd (loop)/arch/boot/intel_ucode.img (loop)/arch/boot/amd_ucode.img (loop)/arch/boot/x86_64/archiso.img }


4) After boot up, you will have the minimal terminal login in Linux and no GUI desktop. The first setup is probably to setup the wifi connection, if there is no Ethernet connection. Please follow this guide for the required wifi setup. http://www.linuxandubuntu.com/home/how-to-setup-a-wifi-in-arch-linux-using-terminal

5) There is also a txt file install.txt to refer what to do after the internet connect setup. Or probably want to install Anaconda and tenorflow as in previous post. Please change shell to bash before installation of Anaconda in Arch Linux

6) Tips for Arch Linux
change to bash shell before installing Anaconda : chsh -s /bin/bash; exit; echo $0
Terminal shortcuts and usage tips : https://linuxhandbook.com/linux-shortcuts/
and https://www.howtogeek.com/howto/44997/how-to-use-bash-history-to-improve-your-command-line-productivity/amp/
Display full history : history 0 | less
Build-essential package in Arch Linux: pacman -S base-devel
To install git: pacman -S git

7) As the bare-bones terminal has no mouse or trackpad working on MacBook, and in order to scroll the terminal text, press Fn-Shift-Up or Down.



No comments: