You are not logged in.

#1 2016-02-11 09:20:22

timfayz
Member
From: Kazan, Russia
Registered: 2016-01-14
Posts: 59
Website

[SOLVED] /etc/fstab is empty after installation. What's the point?

I'm trying to understand the installation process. When I do installation from livecd I do something like:

...
#create partitions like /boot, /, /home
#makefs and mount them all
#and then generate fstab
genfstab -U /mnt > /mnt/etc/fstab
#chroot etc
...

What I really expect after chroot and "pacstraping" that when I boot my fresh system there will be the same acting fstab file. But actually it's not. After checking mount points by `lsblk` the only partition mounted is root / (no swap, not boot, no home are mounted). However, thank to god there is fstab.pacorig file which is like "backup" of the original one. So what did I wrong?

I mean when should I do something like `mv /etc/fstab.pacorig /etc/fstab` in order to set my partitioning properly? And what does it cause?

Last edited by timfayz (2016-02-11 10:00:33)

Offline

#2 2016-02-11 09:36:38

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [SOLVED] /etc/fstab is empty after installation. What's the point?

Are you sure /mnt where mounted during the install process? Have you created the partitions before calling genfstab?. We couldn't really tell you what you were doing wrong, you can verify that /mnt/etc/fstab where created during the install process (just do cat /mnt/etc/fstab). What's the output of

genfstab -U /mnt 

during the install process?

If the problem is only the fstab file and you can boot your system, you can call genfstab after the system is installed. Just install arch-install-scripts and call it with

genfstab / -U > /etc/fstab

Last edited by olive (2016-02-11 09:36:46)

Offline

#3 2016-02-11 09:38:41

elkoraco
Member
Registered: 2013-02-18
Posts: 140

Re: [SOLVED] /etc/fstab is empty after installation. What's the point?

If you had properly mounted the partitions before running the command, they would be there.

Offline

#4 2016-02-11 09:52:28

timfayz
Member
From: Kazan, Russia
Registered: 2016-01-14
Posts: 59
Website

Re: [SOLVED] /etc/fstab is empty after installation. What's the point?

Of course I've checked and mount them all. Everything was generated ok by genfstab. I mean after installation process the `fstab` file (with properly generated entries) was renamed to fstab.pacorig and I was left with empty fstab file after reboot.

Offline

#5 2016-02-11 09:55:15

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: [SOLVED] /etc/fstab is empty after installation. What's the point?

You are supposed to generate fstab after running pacstrap. Otherwise the installation of the `filesystem` package will override it (respectively, save it as .pacorig).

Last edited by ayekat (2016-02-11 09:55:40)


pkgshackscfgblag

Offline

#6 2016-02-11 09:57:10

timfayz
Member
From: Kazan, Russia
Registered: 2016-01-14
Posts: 59
Website

Re: [SOLVED] /etc/fstab is empty after installation. What's the point?

ayekat wrote:

You are supposed to generate fstab after running pacstrap. Otherwise the installation of the `filesystem` package will override it (respectively, save it as .pacorig).

Great! Now it makes sense! So what should I do now? Just rename fstab.pacorig into fstab?

Offline

#7 2016-02-11 09:59:12

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: [SOLVED] /etc/fstab is empty after installation. What's the point?

timfayz wrote:

So what should I do now? Just rename fstab.pacorig into fstab?

If it contains the correct entries, yes. In any case there is no point in keeping an empty fstab.


pkgshackscfgblag

Offline

#8 2016-02-11 10:00:19

timfayz
Member
From: Kazan, Russia
Registered: 2016-01-14
Posts: 59
Website

Re: [SOLVED] /etc/fstab is empty after installation. What's the point?

Thank you all! I will try.

Offline

#9 2016-02-11 10:11:21

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,788
Website

Re: [SOLVED] /etc/fstab is empty after installation. What's the point?

Sounds like you did things in the wrong order.

https://wiki.archlinux.org/index.php/Pa … e#.pacorig

I'm guessing you ran genfstab, then ran pacstrap. I'm not sure why you would do this though, as the beginners' guide clearly tells you which order to do these things. Did you follow some unsupported installation guide?

EDIT: Wow, I'm slow at replying today.

Last edited by WorMzy (2016-02-11 10:12:18)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#10 2016-02-11 10:24:12

timfayz
Member
From: Kazan, Russia
Registered: 2016-01-14
Posts: 59
Website

Re: [SOLVED] /etc/fstab is empty after installation. What's the point?

WorMzy wrote:

Sounds like you did things in the wrong order.

https://wiki.archlinux.org/index.php/Pa … e#.pacorig

I'm guessing you ran genfstab, then ran pacstrap. I'm not sure why you would do this though, as the beginners' guide clearly tells you which order to do these things. Did you follow some unsupported installation guide?

EDIT: Wow, I'm slow at replying today.

Yeah, I think I did. Now I can't remember exactly (but it seems to be true) due to it was ~2 weeks ago, but today I just realized there is no swap, home and boot mounted partitions! Oh my god!:)

No, I followed Beginners Guide.

Offline

#11 2022-07-20 06:42:18

paleolas
Member
Registered: 2022-07-20
Posts: 1

Re: [SOLVED] /etc/fstab is empty after installation. What's the point?

Hello all,

I had the same problem even if i followed the order mentionned.
The two only thing i've made differently, is that :
# mount /dev/ddx2 /mnt/boot
here a message appears to indicates that the /boot folder is not created. So i created it with mkdir instead of "mount --mkdir ***"
# mkdir /mnt/boot
# mount /dev/ddx2 /mnt/boot
the result passed (normal)
# genfstab -L /mnt >> /mnt
here, i did the genfstab using the -L option instead of -U.

To resolve the problem, i did :
- umount the partition.
- delete the folder i made with mkdir using rmdir
- mount again the partition using (this time) the --mkdir option.
- lanch once the genfstab using (this time) the -U option but without writing into a file.
- launch again the genfstab using the -U option but (this time) with writing into the file.

my hypothesis is :
- maybe the genfstab must be generated using -U option instead of -L option.
- maybe each dir must be created using the --mkdir option of mount command instead of the mkdir command.
- maybe writing directly to a file (using the output redirection "command >> file") is not correctly managed when using genfstab.

hope it can help even if i don't know the source of the problem.
@++

Offline

#12 2022-07-20 08:13:36

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,431

Re: [SOLVED] /etc/fstab is empty after installation. What's the point?

1) If you do not create explicit labels for your partitions you probably want to do that yes
2) No that's irrelevant
3) >> appends to the file so if you have an existing broken config then >> will just append new information creating more brokennesss, if you want to overwrite use >

Note that you are replying to a six year old solved thread.  Closing.

Offline

Board footer

Powered by FluxBB