You are not logged in.
Greetings ![]()
I'm finally attempting the switch to linux and have settled on arch as the most appropriate way to do this. A big priority is keeping the system as clean as reasonably possible. In that spirit, my intention is to wipe the system each time I make a mistake, unless the re-install starts getting really long. Unfortunately, the instructions for doing this,https://wiki.archlinux.org/index.php/Pa … l_packages (when run in the linux live session booted from USB), create a problem:
# pacman -D --asdeps $(pacman -Qqe)
# pacman -D --asexplicit base linux linux-firmware
# pacman -Qtdq | pacman -Rns -# pacstrap /mnt --needed nano
zsh: command not found: pacstrap
This is after I've run pacstrap to install something (test was with sudo..), to confirm it worked previous to getting rid of the packages. I've tried marking pacstrap as explicit so it won't be removed, that doesn't work.
error: could not set install reason for package pacstrap (could not find or read package)
I've wondered if it's just part of another package and that therefore I should mark -that- package as explicit, but I really doubt that's the problem, so I haven't researched it that much.
I tried this: https://archlinuxarm.org/forum/viewtopi … =60&t=8529
and got:
error: target not found: pkgfile
Re-booting from the USB brings pacstrap back, but it seems that shouldn't be necessary.
To thicken the plot, I checked what would happen if I really did try to remove everything, by not marking anything as explicit:
# pacman -D --asdeps $(pacman -Qqe)
# pacman -Qtdq | pacman -Rns -
4 lines of output followed by:
warning: dependency cycle detected:
warning smbclient wil be removed after its cifs-utils dependency
warning: pacman is designated as a HoldPkg.
:: Hold Pkg was found in target list. Do you want to continue? [y/N]
I don't think I've ever said yes to that, it looks like bad things will happen. The impression I get is that once you start installing things with pacstrap, even just the basics, base linux linux-firmware, removing it isn't as simple as the given instructions indicate.
..so now what I'm left with is running this code:
# pacman -D --asdeps $(pacman -Qqe)
# pacman -D --asexplicit base linux linux-firmware
# pacman -Qtdq | pacman -Rns -
, then running https://wiki.archlinux.org/index.php/pa … kage_cache
# pacman -Scc
then re-booting back into the live environment to get pacstrap back, crossing my fingers and re-starting the installation.
..so to end with a question, is rebooting necessary? What is the elegant clean way of doing this? Is there one? Thanks! ![]()
Edit: I'm aware that pacstrap can be re-built, there's a section in the wiki on that. But that seems just as clumsy as re-booting, if not more so.
Last edited by mikethe1wheelnut (2021-03-12 23:44:32)
Offline
my intention is to wipe the system each time I make a mistake...
That's a great way to memorise the install process, and a terrible way to learn from your mistakes.
Offline
# pacman -D --asdeps $(pacman -Qqe)
# pacman -D --asexplicit base linux linux-firmware
# pacman -Qtdq | pacman -Rns -Why do any of the above if you are goign to wipe the installation?
# pacstrap /mnt --needed nano
zsh: command not found: pacstrapYou already have an installed system so what is this command meant to achieve?
Offline
mikethe1wheelnut wrote:my intention is to wipe the system each time I make a mistake...
That's a great way to memorise the install process, and a terrible way to learn from your mistakes.
..my perspective is somewhat different - there's enough learning happening and required already that this seems an expedient way of keeping momentum going until I'm ready to absorb the rest of the material. I've tried to learn languages from friends, and ended up giving up when they were overly insistent on perfect pronunciation.
Offline
# pacman -D --asdeps $(pacman -Qqe) # pacman -D --asexplicit base linux linux-firmware # pacman -Qtdq | pacman -Rns -Why do any of the above if you are goign to wipe the installation?
When you say "wipe the installation", what do you mean? Are you saying that -by rebooting- the entire installation is automatically wiped? (this would be new information for me)
# pacstrap /mnt --needed nano zsh: command not found: pacstrapYou already have an installed system so what is this command meant to achieve?
This command is only intended to be run once all the packages I've installed have been removed. Once I've done more research, I'll know how to remove only the packages I've installed that I subsequently decide I don't want anymore.
Offline
When you say "wipe the installation", what do you mean? Are you saying that -by rebooting- the entire installation is automatically wiped? (this would be new information for me)
It would also make sense. But re-booting is still time-consuming, obviously. The original issue remains that removing installed packages breaks pacstrap, which doesn't seem right.
Offline
loqs wrote:# pacman -D --asdeps $(pacman -Qqe) # pacman -D --asexplicit base linux linux-firmware # pacman -Qtdq | pacman -Rns -Why do any of the above if you are going to wipe the installation?
When you say "wipe the installation", what do you mean? Are you saying that -by rebooting- the entire installation is automatically wiped? (this would be new information for me)
In that spirit, my intention is to wipe the system each time I make a mistake, unless the re-install starts getting really long.
Yet the wiki package you link to and the commands above will not wipe an installation, they will remove packages not marked as explicitly installed. It does not remove files that are not tracked by pacman such as anything in /home or any log files or the package cache or the pacman database and log. Typically you would wipe an installation by formatting all of the installations partitions.
loqs wrote:# pacstrap /mnt --needed nano zsh: command not found: pacstrapYou already have an installed system so what is this command meant to achieve?
This command is only intended to be run once all the packages I've installed have been removed. Once I've done more research, I'll know how to remove only the packages I've installed that I subsequently decide I don't want anymore.
That does not explain what you expect the command to do. You already have pacman installed so why use pacstrap? Why specify /mnt? Why specify nano without base linux linux-firmware?
Last edited by loqs (2021-03-12 21:32:26)
Offline
I tried this: https://archlinuxarm.org/forum/viewtopi … =60&t=8529
Are you running Arch or ArchARM?
They're different distros and there is absolutely no guarantee that commands meant for one of them will work on the other.
The pacstrap command isn't installed by default, it's part of the arch-install-scripts package and it makes no sense to use it on an already installed OS, it's only designed to install Arch on a blank drive (or container).
Offline
mikethe1wheelnut wrote:I tried this: https://archlinuxarm.org/forum/viewtopi … =60&t=8529
Are you running Arch or ArchARM?
They're different distributions...
Arch. The -only- reason that's there is to give indication of some of the research I've done to try to solve the problem.
The pacstrap command isn't installed by default, it's part of the arch-install-scripts package and it makes no sense to run it from an installed OS, it's only meant for installing Arch on a blank drive (or container).
..and here I'm trying to run it from an arch live session from a usb, on a drive that .. hasn't been explicitly just created or formatted. But it not working is different from it not being found at all..
Last edited by mikethe1wheelnut (2021-03-12 21:44:19)
Offline
zsh: command not found: pacstrapBut it not working is different from it not being found at all.
Are you referring to some other output you have not posted?
Offline
Yet the wiki package you link to and the commands above will not wipe an installation, they will remove packages not marked as explicitly installed. It does not remove files that are not tracked by pacman such as anything in /home or any log files or the package cache or the pacman database and log. Typically you would wipe an installation by formatting all of the installations partitions.
Indeed, I hadn't thought of (re)formatting the partitions.. /home has nothing in it (don't think..), I've cleared the package cache separately, but the rest.. is research still to do. Now you mention it, until I gain much more clarity and confidence, (re)formatting sounds like an excellent idea. :-)
That does not explain what you expect the command to do. You already have pacman installed so why use pacstrap? Why specify /mnt? Why specify nano without base linux linux-firmware?
I expected the command to re-install nano if it wasn't already there. nano was a random choice, a small program that should install quickly if pacstrap worked. /mnt was specified to follow the instructions in the wiki.
Offline
At the point in the installation you execute pacstrap the system is mounted to /mnt with / being the installation media.
Running it from the installed system with no system mounted to /mnt would fail even if the command was installed.
You should not pacstrap on the installed system just use pacman.
# pacman -D --asdeps $(pacman -Qqe)
# pacman -D --asexplicit base linux linux-firmware nano
# pacman -Qtdq | pacman -Rns -As nano is added to the list of packages marked as explicitly installed it will then not be removed so you do not need to reinstall it.
Last edited by loqs (2021-03-12 21:55:36)
Offline
zsh: command not found: pacstrapmikethe1wheelnut wrote:But it not working is different from it not being found at all.
Are you referring to some other output you have not posted?
-No. You said:
The pacstrap command isn't installed by default, it's part of the arch-install-scripts package and it makes no sense to run it from an installed OS, it's only meant for installing Arch on a blank drive (or container).
..that seems to indicate that the command is only supposed to be run -once-, on a blank drive. So even running it twice (say you have a super long list of software you want installed), would be a mistake. (which I doubt is the case, since I've done this and it seemed to work fine). But even if you ran it more than once, or tried to run it from an installed OS (I think I tried this and of course it didn't work..), I presume it would give an error different from "it can't be found". -that "zsh: command not found: pacstrap" comes from running it in the linux live session..
Last edited by mikethe1wheelnut (2021-03-12 22:03:12)
Offline
pacstrap --needed /mnt nano
==> ERROR: pacstrap: invalid option -- '-'Last edited by loqs (2021-03-12 22:17:33)
Offline
# pacman -D --asdeps $(pacman -Qqe) # pacman -D --asexplicit base linux linux-firmware # pacman -Qtdq | pacman -Rns - # pacstrap /mnt --needed nano zsh: command not found: pacstrap
If you are running these commands from the Live USB then they are performing those actions on the Live USB, not on your already installed system.
By running them you are removing the arch-install-scripts package and thus the pacstrap command from the Live USB session...
None of the above is making any changes to your already installed system.
Offline
At the point in the installation you execute pacstrap the system is mounted to /mnt with / being the installation media.
..thank's a ton for that. It's not what I was asking about, but touches on other confusions I had. I've tried to understand where one file system stopped and another began, but had set aside the question. ..it sounds like for the installation, the only partitions that need to be mounted are the ones that you are going to use pacstrap to put files into. (I was previously also mounting a partition to /home, not knowing what I was doing -but this is going off-topic now..)
Running it from the installed system with no system mounted to /mnt would fail even if the command was installed.
You should not pacstrap on the installed system just use pacman.
Understood! :-) This post is intended to address the behavior of said commands when executed in the live session :-)
As nano is added to the list of packages marked as explicitly installed it will then not be removed so you do not need to reinstall it.
You're quite right, that is confusing. I should have been more careful with my original post.
Offline
pacstrap --needed /mnt nano ==> ERROR: pacstrap: invalid option -- '-'
Confusion? What I actually put in was:
# pacstrap /mnt --needed nanoOffline
mikethe1wheelnut wrote:# pacman -D --asdeps $(pacman -Qqe) # pacman -D --asexplicit base linux linux-firmware # pacman -Qtdq | pacman -Rns - # pacstrap /mnt --needed nano zsh: command not found: pacstrapIf you are running these commands from the Live USB then they are performing those actions on the Live USB, not on your already installed system.
By running them you are removing the arch-install-scripts package and thus the pacstrap command from the Live USB session...
None of the above is making any changes to your already installed system.
Bingo. Now we're on to something.. ..ok, I think it's time for me to go back to the documentation, re-read it all.. I propose to come back and mark this solved if that reading resolves everything.. (!) :-D
Offline
Slithery wrote:mikethe1wheelnut wrote:# pacman -D --asdeps $(pacman -Qqe) # pacman -D --asexplicit base linux linux-firmware # pacman -Qtdq | pacman -Rns - # pacstrap /mnt --needed nano zsh: command not found: pacstrapIf you are running these commands from the Live USB then they are performing those actions on the Live USB, not on your already installed system.
By running them you are removing the arch-install-scripts package and thus the pacstrap command from the Live USB session...
None of the above is making any changes to your already installed system.
Bingo. Now we're on to something.. ..ok, I think it's time for me to go back to the documentation, re-read it all.. I propose to come back and mark this solved if that reading resolves everything.. (!) :-D
..huh.. except that when I re-boot from the usb again, I get pacstrap back. So this has to mean that there are -three- beasts involved -> 1) the system getting installed, 2) the Live session, and 3) the iso on the usb- -> because if packstrap was getting deleted from the iso, I'd have to replace the iso.. ..fascinating..
Last edited by mikethe1wheelnut (2021-03-12 22:31:52)
Offline
Correct.
I never said that you were removing packages from the USB stick, I said 'the live session'.
When you boot the Live USB it loads a temporary Arch install into memory, from that point on the USB stick is irrelevant. All of your actions were happening on this session, if you reboot then your computer will reload the USB to start a new 'live session'.
Offline
loqs wrote:pacstrap --needed /mnt nano ==> ERROR: pacstrap: invalid option -- '-'Confusion? What I actually put in was:
# pacstrap /mnt --needed nano
I will blame my inability to transcribe accurately on trying to understand post #13.
Offline
mikethe1wheelnut wrote:loqs wrote:pacstrap --needed /mnt nano ==> ERROR: pacstrap: invalid option -- '-'Confusion? What I actually put in was:
# pacstrap /mnt --needed nanoI will blame my inability to transcribe accurately on trying to understand post #13.
![]()
Offline
When you boot the Live USB it loads a temporary Arch install into memory..
..so into the RAM? ..must be..
Offline
I feel like marking this solved. You guys rock! ![]()
Offline
Slithery wrote:When you boot the Live USB it loads a temporary Arch install into memory..
..so into the RAM? ..must be..
Yes see also SquashFS then a copy on write overlay is put on top of it.
Offline