Install to external HD?


I’m trying to install Archlabs, but the al-installer only detects the drives physically in my computer, and not the external USB drive I’d like to install to. If I use an old ISO that still has Calamares as the installer, it lists /dev/sdc just fine, but I’d prefer to start with the latest ISO. Am I missing a setting or something that would allow al-installer to detect/install to an external drive?


Was the drive mounted during the live session?

That is a good question. I will have to try again and check.

I’ve attached a screenshot showing my problem. I have three disk (an SDD, a HDD, and the external USB I’m trying to install to) that all show up in Thunar, but only two show up in the installer. The drive is mounted fine in Thunar, but doesn’t appear in al-installer.

You don’t need the drive mounted, the installer is simply blacklisting USB devices.

If you really want to install to an external USB drive you’ll need to edit the installer script

Copy paste the following over the lines specified in the script /installer/installer

lines 24-35

readonly KBD="$(find /usr/share/kbd/keymaps -name '*.map.gz')"
readonly SYS_MEM=$(grep 'MemTotal' /proc/meminfo | awk '{print int($2 / 1024)}')
readonly SYS_DEVS="$(lsblk -lno NAME,SIZE,TYPE,TRAN | awk '/disk/ {print "/dev/" $1 " " $2}')"
readonly DEV_COUNT="$(wc -l <<< "$SYS_DEVS")"
readonly LOCALES="$(awk '/\.UTF-8/ {gsub(/# .*|#/, ""); if($1) print $1 " -"}' /etc/locale.gen)"
readonly CONSOLE_MAPS="$(awk '{gsub(/\.map\.gz|.*\//, ""); print $1 " -"}' <<< "$KBD" | sort -r)"

# create a regex string of all usb devices on the system
# ignore these devices entirely during partition list creation
#for dev in $(lsblk -lno NAME,TRAN | awk '/usb/ {print $1}'); do
#   USB_DEVS="${dev}$([[ $USB_DEVS ]] && echo -n "|$USB_DEVS")"

lines 184-190

#if [[ $USB_DEVS != "" ]]; then
#        awk "!/$USB_DEVS/"' && /disk|part|lvm|crypt|NAME/ {print $0}' > /tmp/.devlist
   awk '/disk|part|lvm|crypt|NAME/ {print $0}' > /tmp/.devlist

lines 767-771

#if [[ $USB_DEVS != "" ]]; then
    #PARTS="$(lsblk -lno TYPE,NAME,SIZE | awk "/$str/"' && !'"/$USB_DEVS/"' {sub(/^part/, "/dev/"); sub(/^lvm|^crypt/, "/dev/mapper/"); print $1$2 " " $3}')"
PARTS="$(lsblk -lno TYPE,NAME,SIZE | awk "/$str/"' {sub(/^part/, "/dev/"); sub(/^lvm|^crypt/, "/dev/mapper/"); print $1$2 " " $3}')"

Thanks! I’ll try that

The last two blocks’ line numbers are likely wrong but you should be able to find them just by searching the file for the string USB_DEVICES using / for vim search and Ctrl-f for geany

I still have AL 2018.03 in the pen drive, at the time I just indicated the drive previously formatted and partitioned.

1 Like

I think it’s a recent change to the installer so that the install media does not show up as a target (or maybe that was a different distro I read about that does that).

1 Like

Yea, its been fixed so it only blacklist the install media, not all usb devices.

1 Like

@PackRat @natemaia
I saw this change in the last installation, this helps to avoid errors in deleting the wrong disk! :joy: