I'm installing Arch for the first time and i'm a bit confused about the setup process. I have partitioned my disk while in a zsh shell and now I'm supposed to mount my linux filesystem partition to /mnt which is the part that confuses me. How do I already have the linux filesystem that /mnt exists within? And when if I mount it to /mnt will there be an entire linux filesystem in there starting at root like this /mtn// ?
#First time installing Arch
397 messages · Page 1 of 1 (latest)
have you formatted the partition with mkfs?
yeah
I mean it's not that it doesn't work I just don't understand why
.aw installation_guide
Arch Wiki: Installation guide
the mkfs command formatted the partition with a filesystem, which allows you to mount it and contains things like a journaling system (depending on the filesystem)
Yeah but mount it to what?
After you've done this (ext4 may be replaced with another filesystem in this command) you install linux using the iso
.
So the partition which will be root should be mounted to /mnt
and that command installs the OS
If I already have a linux filesystem whats the point of mounting another one to it?
you're booted into the iso, so you have a directory from the iso called /mnt
that is where you mount your filesystem to
your question is unclear, I recommend you show a picture of your lsblk -f and which partitions you're talking about
I mean sda3
and that's what you want to be root, right?
my only confusion is that it doesn't seem to be mounted, so you need to run:
mount /dev/sda3 /mnt
and then you can install the core parts of the system
if you mount it, you should find that ls -a /mnt shows no output beyond dots (which indicate current and previous directory)
What confuses me is what I am in rn. I guess I don't really understand what an ISO is? I thought it was just the OSs code that had to be fully installed before it could run
Like am I in a bootloader or what
okay so the ISO is pretty much a very minimal operating system designed to install a proper operating system, it comes with software like cfdisk, pacman, the arch-install-scripts
the bootloader would be the option to select an OS
When I chose what OS I wanted I thought that was UEFI?
so in the iso, you can do (as an example) pacman commands, though only in a limited manner as you can't make many changes to the packages in the iso, if you tried to do pacman -Syu in the ISO, it likely wouldn't work
UEFI is more related to the BIOS
the names are frankly, more than a little confusing
I thought UEFI is an alternative to BIOS?
essentially yes
but uefi / bios are not the same as bootloader
bootloader is where your kernel sits for the OS
@wraith ledge might be better at explaining it?
Ah so rn im in a minimal version of Arch and I have to configure it to install the rest of the stuff?
And by mounting sda3 to /mnt I create the real filesystem?
well, you do that after mounting it
Create the filesystem that is?
you already created the file system, we can see it is ext4
Also the actual Linux file system partition that I formatted with ext4, does it have a root with bin, boot, dev etc inside it that is appended to the mnt directory? Or how does mount really work?
okay lets take a step back, lets say I have a disc which has these folders in it:
/pictures
/videos
/music
if I go into the iso, and I do ls -a /mnt nothing beyond the dots to signify current and parent directory should come up
if I then mount the disc with those above directories to /mnt, and run ls -a /mnt again, now it should show us pictures videos music
if all you have done is set the filesystem as ext4, when you mount it to /mnt, it should have no entries in ls -a /mnt
after mounting it if you do the command I'm quoting from the above image, you will then have a set of directories be created
You would, at this point, have the very basic elements of a functioning operating system
The next two parts to the installation guide are this:
the fstab basically mounts things, so in this case, your root directory (where your OS is installed) would be in there, and you may add secondary drives, it would also contain your SWAP partition, so that that is booted up on start up.
Chroot gives you preliminary access to your OS through the ISO
by chrooting, you can set your OS up properly, for instance you might want to enable NetworkManager or whatever equivalent you have chosen.
Something I thought to mention is if you’re using uefi, make sure to mount your boot partition at /mnt/boot/efi
that's optional, some people just do /mnt/boot
Is it really? Maybe I was doing something wrong with my install 😂
O well it all worked in the end
This confuses me. Does your disc not have a linux file system starting at root? And if it does why doesn't ls -a /mnt only show /?
What?
Thats how I feel lol. What part of the question is wrong?
I made a directory, it's empty, I looked inside of the directory, it shows me current and parent directories (. and ..)
ls just lists what's in a directory
ooh
i love these kinds of posts
what difficulty r u facing bud?
ill try my best to resolve it
it's turned into mostly a "but how does that work" thread, which is fine, they want to understand as much as possible about the process
oh that's cool
i think i'm pretty qualified to educate them on the complexities of linux and the installation process
well what would they like to know ?
oh of course, just something about your account saying enable video seems, off topic
this is a weird thread
Yeah I know that. This is how I think it works, please explain where im wrong:
Your disc has the "typical" linux filestructure meaning that it starts at / and has all the other typical directories. Inside one of these subdirectories you have /pictures, /videos and /music. When you mount that disc to /mnt doing ls -a inside mount would just show up as ., .. and / since thats the top level directory.
Where you’re mistaken here is you aren’t going to mount your ISO, you will mount your other drive because that’s where you will be installing the OS
if / is top level, then when you do ls -a /mnt, it's showing the top level of the mounted directly, which is all child directories of /
Basically, everything inside of / in that disk goes into /mnt, allowing you to change files in it. A disk has to be mounted in order to change files on it easily
Basically / is /mnt after you copy it, there is no / folder in /mnt
/mnt is essentially the root directory /mnt=/
Yeah.
which means if you do mount /dev/sda3 /mnt and then ls -a /mnt you should only see . .. - current and parent directories
And that drive needs to be mounted so you can change the files in it. (To install arch)
Almost always, to change the files in a drive you need to mount it first. And when you do that, everything in the / directory of that drive goes in /mnt
Ah ok so then im basically installing arch into /mnt only?
yes, as your root partition will be mounted there
-A is easier to understand (same as -a but w/o the implied . and ..)
Yeah, but that is changing the disk, its kindof like the disk is symlinked to that folder, whenever you change that folder its changed on the disk (at least to my knowledge)
if you are ever in a pinch and need to recall the functions of a particular function such as "ls" you could always read it's corresponding man page. by typing man<thing you wanna search abt>
yes, but that's a mountpoint for when you're in the ISO only, when you boot it up without the ISO, it won't be in /mnt as you won't be using the ISO as an environment
Basically, it makes changes to the real disk when you make changes to /mnt
@blazing glacier the root directory is the heart of your system think of it as the windows32 folder in windows
or better yet the c:// drive
I think we may be overwhelming them
all the other mount points are subordinate to the root directory
I think this is the part that has me confused really. Where does my current mini version of arch exist? In ram?
no no i think he's doing okay
slightly lol
that's the iso
yes
your current version is from the iso and is loaded into memory
when ur booting into an iso a mini partition is made where the iso is stored in
basically
there's a partition, known to the system as /dev/sda3, right
so to access the files there, we first need a system for file paths and whatnot; something to organize the files and their metadata and separate /home/user/test (some file in home directory) from /usr/bin/test (a command)
once we have such a filesystem, we can attach it to a directory like /mnt with the mount command
couldnt it be on the usb depending on boot option
important to note you set up a filesystem, then you install an OS on top of the filesystem
https://wikiless.sethforprivacy.com/wiki/Mount_(Unix)?lang=en
tl;dr: mount is a command that makes the stuff on a device (a drive or partition) accessible
In computing, mount is a command in various operating systems. Before a user can access a file on a Unix-like machine, the file system on the device which contains the file needs to be mounted with the mount command. Frequently mount is used for SD card, USB storage, DVD and other removable storage devices. The command is also available in the E...
Basically on that iso
this is the linux equivalent of creating drive letters for your drives
except you get to choose the names now
I mean i think its technically in memory, but you can think of it like its on the usb where you have the iso
afaik, yes, and the iso tells the computer how to put it there
This is my understanding, but I'm always open to being challenged or corrected, but the problem I have is, if I'm wrong, I also don't particularly care at the moment XD
it depends on the size of your boot partition
some can handle being at /mnt/boot and some cant
note that if there is data inside the directory it gets moved away until the mount is undone
The filesystem you are speaking of, I assume it exists within sda3? And I basically set that filesystem as the "default" for the iso by mounting it?
You shouldnt really have important stufd in /mnt anyeay tho lol
Not really.
not the default; just the one associated with /mnt at the present moment
ehh, you can use it as a place to put random crap you dont wanna keep
Basically, sda3 has a load of files, ok? You want to change those files, add some new ones to install arch. However, /dev/sda3 isnt a folder right now. Your os doesnt know what you want to do with it. So you mount it, basically telling your os you want access to the files, and to put those files in /mnt. And after that, you can create all the files that are needed for arch to work.
i just put that in ~/Downloads ¯_(ツ)_/¯
stay ontopic
Yes but what files are on there rn? Nothing right?
yea and thats a thing in windows too
in what, exactly?
/dev/sda3?
sda3
Yeah i think so. But you mount it so you can put stuff on there.
your root partition is empty as of now
Basically / is empty, but you want to put folders (and files) in there, so you mount it
I think this is where I have it wrong. I thought making the partition type for sda3 linux filesystem and then making it ext4 created like a root directory with /dev /mnt /bin etc inside it which im guessing is not correct?
no, as far as i know
setting the type doesn't really do anything
that is not true
it's just so things can tell what it is
yeah
No, thats done after, when installing arch iirc
and formatting it as ext4 just allows data to be stored in it
pacstrap is what makes those directories
Btw, why choose ext4 and not btrfs?
at least in the case of arch
I think it's very sensible someone who is installing arch for the first time and is asking questions as basic as these sticks to ext4
if they want to learn about btrfs, zfs, xfs, and things like subvolumes, that's valid, but I do advise one does not run before they can walk
So when I mount sda3 to /mnt im really just giving the ISO access to that part of my harddrive?
it already has access
mount lets programs directly see the files themselves
letting ls (list command) show what's on there
letting rm (remove command) delete what's on there
etc
Yeah basically.
This is overcomplicating it, stick with what you said tbh
yea and you can switch later
Ok but I think of this as the sda3 partition only existing inside /mnt and not being available to everything else?
i mean alfons asked so im not gonna lie
yeah thats a good way of seeing it
its just an interface
Yes exactly.
again this is the way that windows makes a c drive be called a c drive
and a d drive be called a d drive
(And an e drive be called an e drive
)
also we don't know if sda3 is your root partition, it may be something else
Yeah, e.g. mine is nvme0n1p2
And i have another that is sda1
But so when I save a file inside for example /home/alfons it still stores it in the sda3 partition existing within /dev?
yes
Yep!
it is according to the screenshot way way up there
oh
.
right
you dont need to understand this too much
just treat it like assigning drive letters for now
and theres a page on mounting if you wanna check it out later
.aw mount
Arch Wiki: Mount
Ohhh so mounting it to /mnt is really only to know of its existance and therefore to be able to use it?
you're probably looking into this too much though; i advise you just move on
pretty much
lmfao thats so much simpler than I thought
Basically. Mounting it allows you to access and change all the files in it.
ok cool now I understand lol
Nice! If this solved, please prepend [Solved] to the title
they're trying to install arch linux for the first time...this isn't solved unless whilst typing all this they've also been installing everything
Oh i thought they were just asking about what mounting is, carry on then :p
I haven't. Should I not close this and make another one if I encounter more stuff I don't understand? Because I have to go for a while
they're asking questions as they go to get a better grasp of how everything works. Some people just plow through, some people want to understand better, which likely sets them up to be better at fixing issues later on 🙂
best just to keep it open I think
feel free to continue using this one
You can keep it open, and ask here later :v)
probably more convenient anyway
Alright ty all so much for your help! 🙂
Np, happy to help :D
yw
For when you come back, remember, the big scary guide is the best, if you're stuck on part of it, just ask a question! Big scary guide below:
.aw installtion_guide
No results found
Arch Wiki: Installation guide
.aw installation_guide
Arch Wiki: Installation guide
.aw beginners
Arch Wiki: Beginners
lol ok sounds good!
beginners is faster to type
.aw installation_guide
Arch Wiki: Installation guide
the same page 4 times, so you can't really miss it!
yep!
@blazing glacier id recommend you get used to reading the archwiki
and if you cant do that
theres a page for that too somehow
.aw reading
No results found
Arch Wiki: Help:Reading
there
Yeah iv'e been reading it a bit
good
Is there a reason the colour disappears and the prefix(root@archiso) format changes?
to signify that you're chrooted
And what does that mean exactly? That i'm no longer in the root directory?
Basically, you're telling the system to act like the root is at /mnt (where your actual root partition is mounted) instead of / (the ISO's root partition)
And its now grey because im in the ISOs root partition?
to put it even more simply
If you ran pacman -S sl when it was red, you would be trying to install the sl package into the iso
now that you're chrooted, if you run pacman -S sl, it will try to install the sl package onto the system you're installing onto the computer
No, you're in your install's root partition
So it being grey means that im in the actual root that I will be using when I've fully installed the system?
what Me Derp and I are saying is all the same thing.
You have:
USB STICK:
Arch ISO
Which has the tools for you to build arch on it.
You also have:
SDA:
SDA 1: bootmanager partition
SDA 2: SWAP
SDA 3: Where you are installing arch onto your computer
When you're red you're using the arch ISO to do things.
When you chroot and stop being red you're now using your system.
Pacstrap is an extension of pacman to install the system, but once you are chrooted and you use pacman, you're not using pacman from the arch ISO, you're using pacman from SDA3
(drive and partitions based on your above screenshot)
yes
ooh I see. It's quite counterintuitive for it to have color in the temporary version and not in the permanent one no?
I don't agree, but I also have no say in that, I'm not a contributor to the code
Ah very well now I understand. Thanks!
well it's a different shell
the ISO uses zsh well the actual system uses bash (of course you can change that, but that's just the default)
one thing that confuses me, why does it still say root@archiso and not just root@arch if I'm now using the system?
chroot just inherits the hostname from the ISO, it will be different once you boot into the system
ah kk
@blazing glacier which part of the install guide are you up to?
3.3 in the installation guide. Trying to understand why I have to do everything rather than just do it so it takes a while lol
don't forget to have installed something for the internet (like networkmanager), or you'll need to remount and rechroot and install it, presuming you want the machine to be online
It's a vm if that matters and the ping command works even though I haven't installed something for the internet?
if it's a VM that's good, as it's just for learning
Does it only have internet connectivity because its a vm?
you're in chroot right?
if by chroot you mean the system installed in sda3 yes I thinks so
???
no I mean are you loaded live or via the chroot command from the iso
arch-chroot /mnt remember that?
^
wdym by loaded live?
not using the iso
I thought it was either using the ISO or using what I installed on sda3. Is there another possibility?
Okay so:
I installed the ISO on my usb
I used that to install arch, in part via chrooting
I shut down, removed the ISO, and then boot up without the ISO and thus without needing to use arch-chroot
The system you are referring to here is installed on sda3 no?
you can access SDA3 by booting up normally (presuming you have a bootloader installed) or via the ISO
think of the ISO as bringing the components to build a ship
chrooting as dry dock
and booting your system as being on the open waters
When you say "in chroot" do you mean that I've chrooted /mnt in which I pacstrapped?
wdym by "dry dock"? An environment in which I assemble the pieces brought by the ISO?
I was making an analogy to a ship...
Yes, is the second part of my chat an apt way to describe it?
I still don't know where you are
have you booted into sda3 without using arch-chroot? or have you done it via the iso using arch-chroot?
I used arch-chroot
then you have internet through the iso
so make sure you install networkmanager or the equivilant
ok but still, I just think of chroot as a command to change where my system thinks root is. I don't understand how I can be "in" chroot
you're thinking too hard about the grammar, you are chrooted, that's all I mean
so all I need to know is that the ISO has networktools to connect to the internet while the real install doesn't yet?
yes
the iso comes with...I think currently systemd-networkd? or something similar name wise, though I think they're planning to move to NetworkManager at some point in the future
Why would I have to remount and rechroot it? Couldn't I just install it after the fact?
oh nvm because then I won't have the ISO so I cant use those network functions?
speaking from very personal experience, whilst it is technically possible to install a networkmanager offline (by getting it from an online machine on a usb stick), it's easier to install it online
pacman -S networkmanager
will result in a 404 error
I remember my first arch install, forgot to install network manager and I was so lost for a bit 😂
Same
Ok so I have restarted my install on an old pc instead of in virtualbox because virtualbox sucks. Now i'm stuck on the partition step. I have partitioned the disc correctly but now that I want to format it I can't find the swap partition anymore
lsblk send output here
all you need to do is mount and chroot
I don't need to format them?
why would you?
mount something, reboot, it's no longer mounted
it's pretty much that simple
mount something, make changes to it, reboot, the changes are made, it just isn't mounted anymore
why would it be mounted?
it's like if I open firefox, then reboot, firefox isn't open
if I open firefox, bookmark a page, and reboot, again firefox isn't open, but the bookmark exists
Uh what why would the installation guide tell me to format them then?
yeah...but why would you think you're there?
Did u see this?
last you told me you were chrooted, so, you've gone back in the guide, but you haven't said why?
oh are you starting again on a new VM?
no my old laptop cuz virtualbox is really glitchy
you are confusing me...
it's really simple
you started installing arch on a VM instance,are you still using that instance?
if no, if you are using a new one, then yeah, restart from the top of the guide
No, instead of a VM on my current pc im doing a real install on an old laptop
Which is what im doing, and i'm running into the problem of not being able to find the swap partition
Ahhh I see, what commands did you do to make swap?
I used cfdisk
It looks like this in that environment:
idk if u can see all that much
okay, so I see you do have a swap partition, I'm not really understanding your issue
mkswap /dev/swap_partition ?
Yeah but when I look in the dev folder the swap partition isnt there. The other 2 are but not that one
It aint even there when I try to autocomplete it
no like i am in /dev
im doing mkswap mmcblk0 inside /dev. Idk why it doesn't append a / to it
hmmm, I don't know
I guess go back a step and try it again
just like, delete the partitions you made completely, and then make them all again
Just make sure if you're writing using cfdisk you type 'yes', not 'y' for example:
Same outcome following your instructions :/
lsblk still isn't showing the swap partition?
nope
and if you look at that disk in cfdisk it shows swap?
yeap
don't know what to say about that, I've just done it in a vm and I've got no issues...
I guess you could try with fdisk instead if you wanted, but I don't know what it's happening
and I doubt it's a cfdisk error so that probably won't help
so for fdisk I think you'd do:
g
n
enter
enter
+512M
t
1
n
enter
enter
+4g
t
19
n
enter
enter
enter
w
g = gpt label
n for new partition
t for I don't know, but it sets the partition type
1 == efi
19 == swap
and default I think is just linux filesystem
What are all these other things fdisk sees? Like mmcblk0boot thats just 4MiB.
Think sda is the USB
do you have a phone connected to your laptop?
how big is the usb?
16gb
is the usb /dev/sda?
yeah I think so
lol
pretty sure you've partitioned /sda instead of the hard drive whilst you did all this
no?
But I did cfdisk /dev/mmclk0
why does your usb have efi and swap?
Hm I might have partitioned both
Cuz mmcblk0 is also partitioned that way
Have I messed up the ISO?
yes, but you can just repartition and mkfs the usb and flash it again
Is there a guide somewhere for how I should repartition it?
it's the same process
No like in what way should I partition the USB?
exfat maybe?
depends what computers you're going to use it on
if it's only for the iso, I'd go for ext4
eh im loosing my patience ima use rufus lol
I mean worst comes to the worst you could setup a swap file instead I guess
alright back to step one now lol
making mistakes is how you learn 🙂
For sure, soon ill know how to do it with closed eyes lmao
ah now I can see the swap file! Ty
I wonder if you formatted your usb and that caused issues to stop you seeing it, it's hard to know when you did that 😛
yeah that probably was it
how is it going now?
This about sums it up
can you mount it?
the error never stops printing if I try to mount it even after I do ctrl + c
ah
idk I think I did it to see if mmcblk0p2 was there and then I didn't bother doing cd ..
Is it a problem?
I assume not but I've never done it
you can literally just do an ls command
but lsblk is the thing most people do
if mkfs is causing issues it could be either a dying or dead drive, or maybe so old ext4 is too modern
I mean it's a low-end laptop but I bought it like a year ago ish
How can I solve this?
have you tried googling the errors?
Can't find anything that has the same error code
So I tried to download smartmontools to diagnose my harddrive which didn't work. Even though I installed smartmontools with pacman it says it wont execute and completion _smartmontools exists but I can't use that either
there are some suggestions in #tech-general right now
@blazing glacier can you try using smaller partitions and running mkfs again
Yeah I gave up
oh great heavens man
tbh i forgor what was happening
just add [SOLVED] to the start of the title
well that was a journey and a half