#First time installing Arch

397 messages · Page 1 of 1 (latest)

blazing glacier
#

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// ?

wraith ledge
#

have you formatted the partition with mkfs?

blazing glacier
#

yeah

blazing glacier
sand burrow
#

.aw installation_guide

cyan apexBOT
wraith ledge
#

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)

blazing glacier
sand burrow
#

After you've done this (ext4 may be replaced with another filesystem in this command) you install linux using the iso

wraith ledge
sand burrow
#

So the partition which will be root should be mounted to /mnt

#

and that command installs the OS

blazing glacier
#

If I already have a linux filesystem whats the point of mounting another one to it?

sand burrow
sand burrow
blazing glacier
#

I mean sda3

sand burrow
#

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)

blazing glacier
#

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

sand burrow
sand burrow
blazing glacier
#

When I chose what OS I wanted I thought that was UEFI?

sand burrow
#

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

sand burrow
#

the names are frankly, more than a little confusing

blazing glacier
#

I thought UEFI is an alternative to BIOS?

sand burrow
#

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?

blazing glacier
#

And by mounting sda3 to /mnt I create the real filesystem?

wraith ledge
#

well, you do that after mounting it

blazing glacier
sand burrow
#

you already created the file system, we can see it is ext4

blazing glacier
#

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?

sand burrow
#

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

sand burrow
# sand burrow

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.

lyric junco
#

Something I thought to mention is if you’re using uefi, make sure to mount your boot partition at /mnt/boot/efi

sand burrow
lyric junco
#

Is it really? Maybe I was doing something wrong with my install 😂

#

O well it all worked in the end

blazing glacier
wraith ledge
#

What?

blazing glacier
sand burrow
#

ls just lists what's in a directory

fluid drum
#

ooh

#

i love these kinds of posts

#

what difficulty r u facing bud?

#

ill try my best to resolve it

sand burrow
sand burrow
#

that's why I'm explaining ls to them

#

feels like you're taking the thread off topic

fluid drum
#

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 ?

sand burrow
fluid drum
#

yeah idk what ur trying to articulate

#

@blazing glacier spit it out private

wraith ledge
#

this is a weird thread

blazing glacier
# sand burrow ls just lists what's in a directory

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.

lyric junco
#

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

sand burrow
sullen apex
#

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

fluid drum
#

/mnt is essentially the root directory /mnt=/

sullen apex
#

Yeah.

sand burrow
#

which means if you do mount /dev/sda3 /mnt and then ls -a /mnt you should only see . .. - current and parent directories

sullen apex
#

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

blazing glacier
wraith ledge
#

yes, as your root partition will be mounted there

proper lodge
sullen apex
fluid drum
#

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>

sand burrow
sullen apex
#

Basically, it makes changes to the real disk when you make changes to /mnt

fluid drum
#

@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

wraith ledge
#

I think we may be overwhelming them

fluid drum
#

all the other mount points are subordinate to the root directory

blazing glacier
fluid drum
#

no no i think he's doing okay

blazing glacier
sand burrow
#

your current version is from the iso and is loaded into memory

fluid drum
proper lodge
proper lodge
sand burrow
#

important to note you set up a filesystem, then you install an OS on top of the filesystem

proper lodge
# proper lodge basically there's a partition, known to the system as /dev/sda3, right so to acc...

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...

proper lodge
sullen apex
#

I mean i think its technically in memory, but you can think of it like its on the usb where you have the iso

proper lodge
sand burrow
proper lodge
#

some can handle being at /mnt/boot and some cant

proper lodge
blazing glacier
sullen apex
proper lodge
proper lodge
sullen apex
#

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.

sullen apex
wraith ledge
#

stay ontopic

blazing glacier
proper lodge
proper lodge
#

/dev/sda3?

blazing glacier
#

sda3

sullen apex
wraith ledge
#

your root partition is empty as of now

sullen apex
#

Basically / is empty, but you want to put folders (and files) in there, so you mount it

blazing glacier
#

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?

proper lodge
wraith ledge
#

setting the type doesn't really do anything

wraith ledge
#

it's just so things can tell what it is

proper lodge
#

yeah

sullen apex
wraith ledge
#

and formatting it as ext4 just allows data to be stored in it

proper lodge
#

pacstrap is what makes those directories

sullen apex
proper lodge
#

at least in the case of arch

sand burrow
sullen apex
#

Ah ok

#

I didnt realize it was more complicated.

#

(As i used archinstall dogekek)

sand burrow
#

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

blazing glacier
#

So when I mount sda3 to /mnt im really just giving the ISO access to that part of my harddrive?

proper lodge
#

letting ls (list command) show what's on there

#

letting rm (remove command) delete what's on there

#

etc

sullen apex
blazing glacier
#

Ok but I think of this as the sda3 partition only existing inside /mnt and not being available to everything else?

proper lodge
proper lodge
#

its just an interface

proper lodge
#

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

sullen apex
#

(And an e drive be called an e drive dogekek)

wraith ledge
#

also we don't know if sda3 is your root partition, it may be something else

sullen apex
#

And i have another that is sda1

blazing glacier
#

But so when I save a file inside for example /home/alfons it still stores it in the sda3 partition existing within /dev?

wraith ledge
#

yes

sand burrow
wraith ledge
#

oh

sullen apex
proper lodge
#

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

cyan apexBOT
blazing glacier
# sullen apex Yep!

Ohhh so mounting it to /mnt is really only to know of its existance and therefore to be able to use it?

proper lodge
#

you're probably looking into this too much though; i advise you just move on

blazing glacier
#

lmfao thats so much simpler than I thought

sullen apex
blazing glacier
#

ok cool now I understand lol

sullen apex
#

Nice! If this solved, please prepend [Solved] to the title

sand burrow
sullen apex
#

Oh i thought they were just asking about what mounting is, carry on then :p

blazing glacier
sand burrow
sand burrow
proper lodge
sullen apex
proper lodge
#

probably more convenient anyway

blazing glacier
#

Alright ty all so much for your help! 🙂

sullen apex
#

Np, happy to help :D

sand burrow
#

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

cyan apexBOT
sand burrow
#

fuck you

#

.aw installation_guide

cyan apexBOT
sullen apex
#

.aw installation_guide

cyan apexBOT
proper lodge
#

.aw beginners

cyan apexBOT
proper lodge
#

oh

#

same thing

blazing glacier
#

lol ok sounds good!

proper lodge
#

beginners is faster to type

wraith ledge
#

.aw installation_guide

cyan apexBOT
sand burrow
#

the same page 4 times, so you can't really miss it!

proper lodge
#

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

cyan apexBOT
proper lodge
#

wait

#

.aw help:reading

cyan apexBOT
proper lodge
#

there

blazing glacier
proper lodge
#

good

blazing glacier
#

Is there a reason the colour disappears and the prefix(root@archiso) format changes?

sand burrow
#

to signify that you're chrooted

blazing glacier
wraith ledge
#

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)

blazing glacier
#

And its now grey because im in the ISOs root partition?

sand burrow
wraith ledge
blazing glacier
sand burrow
#

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)

blazing glacier
sand burrow
blazing glacier
#

Ah very well now I understand. Thanks!

wraith ledge
#

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)

blazing glacier
#

one thing that confuses me, why does it still say root@archiso and not just root@arch if I'm now using the system?

wraith ledge
#

chroot just inherits the hostname from the ISO, it will be different once you boot into the system

blazing glacier
#

ah kk

sand burrow
#

@blazing glacier which part of the install guide are you up to?

blazing glacier
#

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

sand burrow
#

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

blazing glacier
sand burrow
#

if it's a VM that's good, as it's just for learning

blazing glacier
#

Does it only have internet connectivity because its a vm?

sand burrow
blazing glacier
#

if by chroot you mean the system installed in sda3 yes I thinks so

sand burrow
#

???

#

no I mean are you loaded live or via the chroot command from the iso

#

arch-chroot /mnt remember that?

blazing glacier
#

wdym by loaded live?

sand burrow
#

not using the iso

blazing glacier
#

I thought it was either using the ISO or using what I installed on sda3. Is there another possibility?

sand burrow
#

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

blazing glacier
sand burrow
#

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

blazing glacier
sand burrow
#

yes

#

that's why I reference the command above

blazing glacier
sand burrow
blazing glacier
#

Yes, is the second part of my chat an apt way to describe it?

sand burrow
#

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?

blazing glacier
#

I used arch-chroot

sand burrow
#

then you have internet through the iso

#

so make sure you install networkmanager or the equivilant

blazing glacier
#

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

sand burrow
#

you're thinking too hard about the grammar, you are chrooted, that's all I mean

blazing glacier
#

so all I need to know is that the ISO has networktools to connect to the internet while the real install doesn't yet?

sand burrow
#

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

blazing glacier
#

oh nvm because then I won't have the ISO so I cant use those network functions?

sand burrow
#

pacman -S networkmanager
will result in a 404 error

lyric junco
blazing glacier
#

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

fluid drum
#

lsblk send output here

blazing glacier
sand burrow
#

all you need to do is mount and chroot

blazing glacier
sand burrow
#

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

blazing glacier
#

Uh what why would the installation guide tell me to format them then?

sand burrow
#

huh?

#

show me

sand burrow
#

yeah...but why would you think you're there?

sand burrow
#

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?

blazing glacier
#

no my old laptop cuz virtualbox is really glitchy

sand burrow
#

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

blazing glacier
blazing glacier
sand burrow
#

Ahhh I see, what commands did you do to make swap?

blazing glacier
#

I used cfdisk

#

It looks like this in that environment:

#

idk if u can see all that much

sand burrow
#

okay, so I see you do have a swap partition, I'm not really understanding your issue

#

mkswap /dev/swap_partition ?

blazing glacier
#

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

sand burrow
#

it'd be /dev/ first

#

mkswap /dev/mmcblk0p2

blazing glacier
#

no like i am in /dev

#

im doing mkswap mmcblk0 inside /dev. Idk why it doesn't append a / to it

sand burrow
#

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:

blazing glacier
sand burrow
#

lsblk still isn't showing the swap partition?

blazing glacier
#

nope

sand burrow
#

and if you look at that disk in cfdisk it shows swap?

blazing glacier
#

yeap

sand burrow
#

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

blazing glacier
#

What are all these other things fdisk sees? Like mmcblk0boot thats just 4MiB.

sand burrow
#

I mean I don't know what mm device is

#

sda tends to be a solid state drive

blazing glacier
#

Think sda is the USB

sand burrow
#

do you have a phone connected to your laptop?

blazing glacier
#

nope

#

just the usb and a powercable

sand burrow
#

how big is the usb?

blazing glacier
#

16gb

sand burrow
#

is the usb /dev/sda?

blazing glacier
#

yeah I think so

sand burrow
#

lol

#

pretty sure you've partitioned /sda instead of the hard drive whilst you did all this

blazing glacier
#

no

#

when I do cfdisk with no arguments it defaults to sda

sand burrow
blazing glacier
#

But I did cfdisk /dev/mmclk0

sand burrow
#

why does your usb have efi and swap?

blazing glacier
#

Cuz mmcblk0 is also partitioned that way

#

Have I messed up the ISO?

sand burrow
#

yes, but you can just repartition and mkfs the usb and flash it again

blazing glacier
#

Is there a guide somewhere for how I should repartition it?

sand burrow
#

it's the same process

blazing glacier
sand burrow
#

depends what computers you're going to use it on

#

if it's only for the iso, I'd go for ext4

blazing glacier
#

eh im loosing my patience ima use rufus lol

sand burrow
#

I mean worst comes to the worst you could setup a swap file instead I guess

blazing glacier
#

alright back to step one now lol

sand burrow
blazing glacier
#

For sure, soon ill know how to do it with closed eyes lmao

#

ah now I can see the swap file! Ty

sand burrow
blazing glacier
#

yeah that probably was it

sand burrow
#

how is it going now?

blazing glacier
wraith ledge
#

can you mount it?

sand burrow
#

should be able to

#

I don't understand though

#

why do you keep cding into /dev

blazing glacier
wraith ledge
#

ah

blazing glacier
sand burrow
#

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

blazing glacier
#

I mean it's a low-end laptop but I bought it like a year ago ish

#

How can I solve this?

sand burrow
#

have you tried googling the errors?

blazing glacier
#

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

sand burrow
#

there are some suggestions in #tech-general right now

proper lodge
#

@blazing glacier can you try using smaller partitions and running mkfs again

blazing glacier
#

Yeah I gave up

tired vigil
#

oh great heavens man

proper lodge
#

just add [SOLVED] to the start of the title

fluid drum
#

well that was a journey and a half