You are not logged in.

#1 2021-08-22 15:10:07

gardenair
Member
Registered: 2021-08-17
Posts: 42

[Solved] /etc/fstab not add boot partition entry

Well for Arch Linux ,In Legacy mode I  have created 4 partitions which are as following.

1-  /boot
2-  /root
3- /swap
4- /home


Following are steps which I have taken.

1- For /boot I create a directory

root@archiso ~ #mkdir -p  /mnt/boot
root@archiso ~# mkfs.ext4 /dev/sda1
root@archiso ~#mount /dev/sda1 /mnt/boot

2- For “/”

root@archiso ~# mkfs.ext4 dev/sda2
root@archiso ~#mount dev/sda2  /mnt

3-For “swap”
root@archiso ~# mkfs.swap dev/sda3
root@archiso ~# swapon dev/sda3


4- for "/home "

root@archiso ~#mkdir -p  /mnt/home
root@archiso ~# mkfs.ext4 /dev/sda4
root@archiso ~#mount /dev/sda4 /mnt/home

During installation I am facing problem that fstab is not adding entry automatically of my “boot” partition i.e /dev/sda1 .

The issue is  when I use genfstab command and then view it by cat command  I can not see /boot  entry inside /mnt/etc/fstab.

Rest all three entries are inside it .

root@archiso ~#genfstab -U /mnt >> /mnt/etc/fstab

root@archiso ~# cat /mnt/etc/fstab


/dev/sda2
UUID=8ecfkb1a-55fd-4432-7w5t-9197ofg8e7f5   /        ext4    rw,relatime       0 1

/dev/sda4
UUID= 8ecfkb5r-ddb12-4480-8dcr-3a97of7837f5   /home        ext4    rw,relatime       0 2

/dev/sda3
UUID=897a08r5t-091e-4477-afb1-9197ofg8e7f5   none        swap    default       0 0

What is the reason behind it ? If I proceed the installation steps then i get an error message.

[root@archiso /]# grub-install  /dev/sda
It generate an error message i.e /dev/sda1 not found .

I again start the installation step and this time I  add entry manually "/dev/sda1"  in /mnt/tc/fstab  then at grub installation  it shows "installation finished.No error reported.

#/dev/sda2
UUID=8ecfkb1a-55fd-4432-7w5t-9197ofg8e7f5   /        ext4    rw,relatime       0 1

#/dev/sda1
/dev/sda1   /boot        ext4    rw,relatime       0 2

#/dev/sda4
UUID=8ecfkb5r-ddb12-4480-8dcr-3a97of7837f5  /home        ext4    rw,relatime       0 2

#/dev/sda3
UUID=97a08r5t-091e-4477-afb1-9197ofg8e7f5   none        swap    default       0 0

kindly guide me why genfstab not add /boot entry inside /mnt/etc/fstab ?

In the GUI interface ( XFCE) I can see both boot folder and home folder are mounted on the desktop .Is it right ?
Thanks,
https://i.ibb.co/tm9HSkp/xfce.png
https://i.ibb.co/YDdQkBQ/terminal.png

Mod note: Replaced oversized images with URLs. Please read the General Guidelines and adhere to the image posting guidelines. -- WorMzy

Last edited by WorMzy (2021-08-24 21:22:48)

Offline

#2 2021-08-22 15:12:08

Ammako
Member
Registered: 2021-07-16
Posts: 267

Re: [Solved] /etc/fstab not add boot partition entry

Try mount root partition first, *then* mkdir /mnt/boot and mount boot partition to it.

Also you might want to install gvfs (something like that) and your partitions won't be showing up like this on desktop anymore.

These are not files so you're not going to see them just by ls'ing on Desktop folder.

Last edited by Ammako (2021-08-22 15:13:53)

Offline

#3 2021-08-22 15:26:03

gardenair
Member
Registered: 2021-08-17
Posts: 42

Re: [Solved] /etc/fstab not add boot partition entry

Thanks "Ammako" for the reply.Does the order counts in Arch Linux ?  So it means that my sequence order  is nor correct for it? Well I shall try according to your instructions ,lets see why it do it.
Well like xfce because it is light and work smooth.

Offline

#4 2021-08-22 15:57:48

Ammako
Member
Registered: 2021-07-16
Posts: 267

Re: [Solved] /etc/fstab not add boot partition entry

It matters not just for Arch. You want your boot partition to be mounted to a folder inside your root partition, to do that the root partition has to be mounted first.

Offline

#5 2021-08-22 16:54:44

gardenair
Member
Registered: 2021-08-17
Posts: 42

Re: [Solved] /etc/fstab not add boot partition entry

Well if I remember in other distro like "Debian" during installation I just use / and root is mouted .For boot partition i doesn't mount it inside /mnt . /boot means boot partition and it mounts.I even check after installation there is no folder inside /mnt .

Yes if we want to mount usb from terminal then we create a folder inside /mnt/usb  then mount it.

In Arch Linux  the installation process is all  in terminal windows so  all things are upto the user how he players with it.Well in terminal windows we have to follow it and mount the partitions inside /mnt I learn a lot from Arch installation but I doesn't found any technique in Arch wiki for how to create a separate /home partition.
even if I want to create separate /var then it will also goes inside /mnt/var ? I think yes.

On my Arch xfce desktop I create an empty file then on the terminal i write ls command but it does 't show any file  which is very strange for me. ~ mean home dir. As my prompt is showing me. If it is home then where is my file ?  Yes If i go inside pc@testpc ~ $ cd Desktop  then inside it I use the ls command which shows  my file .
Need your valuable guidance and suggestions.

Thanks.

Last edited by gardenair (2021-08-22 17:36:37)

Offline

#6 2021-08-22 17:11:35

Ammako
Member
Registered: 2021-07-16
Posts: 267

Re: [Solved] /etc/fstab not add boot partition entry

That's because Debian's installer just handles everything automatically as needed. Also as far as I know Debian uses /target at installation instead of /mnt, it doesn't really matter what you mount your partitions to though. What matters is that the right data gets written to the correct partitions. You could create a /foobar folder instead, and as long as you mount your partitions into /foobar and use /foobar in place of /mnt in your pacstrap, genfstab and arch-chroot, you'd be fine.

For what it's worth, you could install Debian manually via command line in the same way you do Arch, using debootstrap.

Splitting /home into its own partition is done the same way as you do for /boot

Last edited by Ammako (2021-08-22 17:13:25)

Offline

#7 2021-08-23 16:11:54

gardenair
Member
Registered: 2021-08-17
Posts: 42

Re: [Solved] /etc/fstab not add boot partition entry

Thanks "Ammako" for your guideline. I install Ach according to your technique and now fstab shows all entries.

Offline

#8 2021-08-24 17:18:49

gardenair
Member
Registered: 2021-08-17
Posts: 42

Re: [Solved] /etc/fstab not add boot partition entry

Though my problem has been solved. With your due respect, I want to ask one more thing that if I want to install Arch Linux on "EFI Boot" then

My Partition formation will be

1- / root partition
2- /boot partition
3- /swap partition
4- /home partition

then

root@archiso ~ #  mkdir  –p  /mnt/boot/efi
root@archiso ~ # mkfs.fat -F32 /dev/sda1
root@archiso ~ # mount  /dev/sda1 /mnt/boot/efi

Rest steps should be the same as I did on "Legacy mode".Am I correct?

Thanks in advance.

Last edited by gardenair (2021-08-24 17:30:18)

Offline

#9 2021-08-24 17:34:15

Ammako
Member
Registered: 2021-07-16
Posts: 267

Re: [Solved] /etc/fstab not add boot partition entry

Should be fine, but it's possible you might have to call grub-install with --efi-directory=/boot. I usually have efi system partiton mounted at /boot/efi, with a separate partition for regular /boot, and I'm not actually sure if it's necessary to specify the path if you choose to mount ESP at /boot instead. Doesn't hurt to specify it, either way.

Last edited by Ammako (2021-08-24 17:37:11)

Offline

#10 2021-08-24 17:54:44

gardenair
Member
Registered: 2021-08-17
Posts: 42

Re: [Solved] /etc/fstab not add boot partition entry

Thanks, So it should be like what I have understood is

[root@archiso /] # pacman -S grub efibootmgr

Install GRUB
[root@archiso /] # grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi

Offline

#11 2021-08-24 18:09:34

Ammako
Member
Registered: 2021-07-16
Posts: 267

Re: [Solved] /etc/fstab not add boot partition entry

If you're mounting EFI system partition at /boot/efi, yes

(Remember that you have to do this while chrooted into the installed system. Can't do this in the archiso itself.)

Last edited by Ammako (2021-08-24 18:10:19)

Offline

Board footer

Powered by FluxBB