You are not logged in.

#1 2020-12-12 17:28:33

lumpynose
Member
Registered: 2013-03-22
Posts: 26

can I do a pacstrap and use a usb flash drive for its files?

I'm reading the section "Installing packages from a CD/DVD or USB stick" on the pacman/Tips and tricks page ( https://wiki.archlinux.org/index.php/Pa … _USB_stick ) and was wondering if that would also work for pacstrap when setting up a new system.  I have a laptop whose wifi doesn't work and I would like to install everything from a USB stick.

Offline

#2 2020-12-12 17:37:29

d34dmx
Member
From: Mexico City
Registered: 2014-05-12
Posts: 6
Website

Re: can I do a pacstrap and use a usb flash drive for its files?

Tes, You can do ir, but make a offline mirror and setup pacman.conf

https://wiki.archlinux.org/index.php/Of … f_packages


No lo intentes... ¡Házlo!

Offline

#3 2020-12-12 18:11:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 25,106
Website

Re: can I do a pacstrap and use a usb flash drive for its files?

Sure, but how are you going to maintain this system?  Arch is the wrong choice for a machine that will not have regular internet access.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2020-12-12 19:09:41

kermit63
Member
Registered: 2018-07-04
Posts: 69

Re: can I do a pacstrap and use a usb flash drive for its files?

An alternative is to look into USB tethering, assuming you have a reasonably recent android device that can connect to your wifi network.

Offline

#5 2020-12-12 19:53:42

lumpynose
Member
Registered: 2013-03-22
Posts: 26

Re: can I do a pacstrap and use a usb flash drive for its files?

Trilby wrote:

Sure, but how are you going to maintain this system?  Arch is the wrong choice for a machine that will not have regular internet access.

I'm hoping that I can figure out what's going on after I get a full blown linux installed. For example, I have another laptop and I can't get the wifi working with it when booted to the install iso so I bought a USB ethernet converter and I plug it into the network and ssh to it (it also has a terrible keyboard so the ssh is a life saver).  But the USB ethernet converter is USB C and this other laptop is old so only USB A.  I have a C to A converter for that on order.

Offline

#6 2020-12-12 19:54:54

lumpynose
Member
Registered: 2013-03-22
Posts: 26

Re: can I do a pacstrap and use a usb flash drive for its files?

kermit63 wrote:

An alternative is to look into USB tethering, assuming you have a reasonably recent android device that can connect to your wifi network.

Hmm, I do have a Pixel 2 so that should work.  I'll have to investigate that.

Last edited by lumpynose (2020-12-12 19:55:15)

Offline

#7 2020-12-12 19:57:58

loqs
Member
Registered: 2014-03-06
Posts: 13,015

Re: can I do a pacstrap and use a usb flash drive for its files?

If you provided details of the NIC that fails from the boot media probably in another thread unless you want to class this as an X Y problem then it can be investigated.

Offline

#8 2020-12-12 21:23:12

GSMiller
Member
Registered: 2020-11-23
Posts: 75

Re: can I do a pacstrap and use a usb flash drive for its files?

lumpynose, Archlinux likes to be updated a lot, it is best to have an internet connection.
Trilby immediately saw the flaw in your plan!
It is best you find out why your internet is not working.


A dog is a man's best friend.

Offline

#9 2020-12-12 23:23:37

lumpynose
Member
Registered: 2013-03-22
Posts: 26

Re: can I do a pacstrap and use a usb flash drive for its files?

loqs wrote:

If you provided details of the NIC that fails from the boot media probably in another thread unless you want to class this as an X Y problem then it can be investigated.

I posted a similar query about the other laptop.  https://bbs.archlinux.org/viewtopic.php?id=261558  The most helpful suggestion was the one from murffatksig where he says "It's almost always easier to install via ethernet, get a working system up and running and then troubleshoot wifi."  For that laptop, HP Stream 11, I'm waiting for the ethernet USB adapter.  What do I need to do to "class this as an X Y problem" so that it can be investigated?  I can do that for both of these misbehaving laptops.

Offline

#10 2020-12-12 23:47:39

loqs
Member
Registered: 2014-03-06
Posts: 13,015

Re: can I do a pacstrap and use a usb flash drive for its files?

What is the NIC on the current laptop that does not work? If it is PCI based `lspci -nnk` output for the NIC should be similar to:

0a:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM43228 802.11a/b/g/n [14e4:4359]
	Subsystem: ASUSTeK Computer Inc. Device [1043:850c]
	Kernel driver in use: wl
	Kernel modules: wl

Or if it usb based `lsusb`.  What happens when you try and connect?  Have you tried following the steps starting at Network_configuration/Wireless#Check_the_driver_status?
Edit:
You can also install the system using tethering then debug the NIC issue as suggested.

Last edited by loqs (2020-12-12 23:53:33)

Offline

#11 2020-12-13 00:33:22

lumpynose
Member
Registered: 2013-03-22
Posts: 26

Re: can I do a pacstrap and use a usb flash drive for its files?

loqs wrote:

...

For the HP Stream 11, the output of lspci -nnk is (hopefully I typed all of this correctly):

01:00.0 Network controller [0200]: Realtek Semiconductor Co., Ltd. RTS8723BE PCIe Wireless Network Adapter [10ec:b723]
            Subsystem: Hewlet-Packard Company Device [103c:2231]
            Kernel driver in use: rtl8723be
            Kernel modules: rtl8723be, wl

ip link says (the stuff in the <angle brackets> is all caps):

2: wlan: <no-carrier,broadcast,multicast,up> mtu 1500 qdisc mq state DOWN mode DORMANT group default qlen 1000
   link/ether c4:8e:8f:58:c7:91 brd ff:ff:ff:ff:ff:ff

Doing ip link set wlan up and then dmesg|grep firmware gives me:

rtl8723be: Using firmware rtlwifi/rtl8723befw_36.bin

Doing iw dev gives me

phy#0
    Interface wlan0
        ifindex 2
        wdev 0x1
        addr c4:8e:8f:58:c7:91
        type managed
        txpower 20.00 dBm

Doing iw dev wlan0 link gives me

Not connected.

Ip link still says state DOWN mode DORMANT.

Offline

#12 2020-12-13 00:43:40

loqs
Member
Registered: 2014-03-06
Posts: 13,015

Re: can I do a pacstrap and use a usb flash drive for its files?

Dormant down is expected at that point,  <no-carrier,broadcast,multicast,up> means the interface was brought up correctly while the down means you have not yet connected to a network.
You then need to connect to a network.  Follow Iwd#Connect_to_a_network or Wpa_supplicant#Manual.
Edit:
Once you have connected to a network you will probably need to assign an IP using DHCP so follow Dhcpcd#Running.
Then Network_configuration#Check_the_connection to check it works.

Last edited by loqs (2020-12-13 00:48:17)

Offline

#13 2020-12-13 01:39:51

lumpynose
Member
Registered: 2013-03-22
Posts: 26

Re: can I do a pacstrap and use a usb flash drive for its files?

loqs wrote:

...

That's where it fails. At the iwd prompt, station wlan0 scan gives no output, but then station wlan0 get-networks gives "No networks available".  Waiting a few moments and trying the get-networks gives the same result.  With the other laptop, at this point it shows the various wifi points around me including mine so my wifi is advertising its SSID.

Edit: If I remember correctly the boot iso doesn't include wpa_supplicant so I can't try that.

On the other laptop where I use the ethernet cable I install the network manager package and as part of the setup stuff I edit /etc/NetworkManager/conf.d/dns.conf
and add

[main]
dns=systemd-resolved

Then on my first reboot into the newly installed system I do

  # systemctl enable systemd-resolved.service
  # systemctl enable NetworkManager.service

and I'm good to go.  But I forget where its wifi doesn't work while booted to the iso.

Last edited by lumpynose (2020-12-13 02:05:42)

Offline

#14 2020-12-13 01:51:46

loqs
Member
Registered: 2014-03-06
Posts: 13,015

Re: can I do a pacstrap and use a usb flash drive for its files?

Check dmesg after iwd fails to detect any networks,  see if there are any messages from the rtl8723be module.

Offline

#15 2020-12-13 02:05:01

lumpynose
Member
Registered: 2013-03-22
Posts: 26

Re: can I do a pacstrap and use a usb flash drive for its files?

No messages from the wifi.  A bunch of messages about systemd; unit=reflector, sometimes success, sometimes failed.

Offline

#16 2020-12-13 03:14:48

eschwartz
Trusted User/Bug Wrangler
Registered: 2014-08-08
Posts: 3,936

Re: can I do a pacstrap and use a usb flash drive for its files?

lumpynose wrote:

The most helpful suggestion was the one from murffatksig where he says "It's almost always easier to install via ethernet, get a working system up and running and then troubleshoot wifi."  For that laptop, HP Stream 11, I'm waiting for the ethernet USB adapter.  What do I need to do to "class this as an X Y problem" so that it can be investigated?  I can do that for both of these misbehaving laptops.

pacstrap basically just runs pacman pointed at the drive you mounted to /mnt or wherever.

cp /etc/pacman.conf .
vim pacman.conf
 # change all "Include = /etc/pacman.d/mirrorlist" lines to "Server = file:///path/to/usb/$repo/os/$arch" 
pacstrap -C ./pacman.conf /mnt 

Then pacstrap will NOT try to download the arch repos from the internet, but from your USB drive. Which presumably has the mirror of the official repos with the {core,extra,community}/os/x86_64/ directory structure, and the core.db, extra.db, community.db files needed to figure out what is available... plus any .pkg.tar.zst you think you need.

A more targeted example is described here: https://wiki.archlinux.org/index.php/Of … ed_example
tl;dr create a custom repo on your USB drive containing all the .pkg.tar.zst files you need to install on the new machine, and edit your pacman.conf to use this repo instead of core + extra + community.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#17 2020-12-13 03:54:34

lumpynose
Member
Registered: 2013-03-22
Posts: 26

Re: can I do a pacstrap and use a usb flash drive for its files?

eschwartz wrote:

...

Ok, thanks.  I'lll wait and see if  loqs has any more ideas about my wifi problem before going the usb flash route.

Offline

#18 2020-12-13 04:25:17

loqs
Member
Registered: 2014-03-06
Posts: 13,015

Re: can I do a pacstrap and use a usb flash drive for its files?

Check `rfkill` is wlan0 either hard or soft blocked?

Offline

#19 2020-12-13 05:12:42

lumpynose
Member
Registered: 2013-03-22
Posts: 26

Re: can I do a pacstrap and use a usb flash drive for its files?

I'm pretty sure I checked that but let me double check ... rfkill says it's ok.  Both bluetooth and phy0 wireless lan have no for both soft and hard blocked.

Offline

#20 2020-12-13 05:19:39

loqs
Member
Registered: 2014-03-06
Posts: 13,015

Re: can I do a pacstrap and use a usb flash drive for its files?

I am out of ideas.  I would suggest installing using tethering or performing an offline install.  If the issue is still present on the installed system copy across the output of dmesg to a system with an internet connection and post the output.

Offline

#21 2020-12-13 05:30:59

lumpynose
Member
Registered: 2013-03-22
Posts: 26

Re: can I do a pacstrap and use a usb flash drive for its files?

I'm looking at the boot messages and one of them says:

ieee80211 phy0: Selected rate control algorithm 'rtl_rc'

On the Realtek page ( https://www.realtek.com/en/products/com … /rtl8822be ) I'm guessing that setting is about/for the two things under Features General that start with 802.11.

On my wifi router's admin web page I checked the box next to "Enable Smart Connect - Let the router intelligently select the best WiFi band 2.4 GHz or 5 GHz for your WiFi connections. Smart Connect requires the 2.4 GHz and 5 GHz networks to use the same WiFi network name (SSID), security options and password."  But remember that it doesn't see any of the wifis in my neighborhood.

Offline

#22 2020-12-13 05:34:26

lumpynose
Member
Registered: 2013-03-22
Posts: 26

Re: can I do a pacstrap and use a usb flash drive for its files?

loqs wrote:

I am out of ideas.  I would suggest installing using tethering or performing an offline install.  If the issue is still present on the installed system copy across the output of dmesg to a system with an internet connection and post the output.

Ok.  Will do.

Thanks for you help!

Offline

#23 2020-12-15 02:18:45

lumpynose
Member
Registered: 2013-03-22
Posts: 26

Re: can I do a pacstrap and use a usb flash drive for its files?

loqs wrote:

I am out of ideas.  I would suggest installing using tethering or performing an offline install.  If the issue is still present on the installed system copy across the output of dmesg to a system with an internet connection and post the output.

The usb ethernet gizmo arrived today and with it I was able to get the HP laptop up and running and after installing and rebooting it all works, both wired and wifi. Even after installing and rebooting, iwd never worked for seeing the wifi router(s), but wpa_supplicant worked like a charm.

I also revamped my setup and got rid of NetworkManager and use systemd-networkd

  # systemctl enable systemd-resolved.service
  # systemctl enable systemd-networkd.service
  # systemctl enable wpa_supplicant@wlan0.service

  # emacs /etc/systemd/network/20-wired.network 
[Match]
Name=enp0s20u1

[Network]
DHCP=yes

[DHCP]
RouteMetric=10

  # emacs /etc/systemd/network/25-wireless.network 
[Match]
Name=wlan0

[Network]
DHCP=yes

[DHCP]
RouteMetric=20

Last edited by lumpynose (2020-12-15 02:25:05)

Offline

Board footer

Powered by FluxBB