Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Can't mount /boot. Unknown file system vfat.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
skitches
n00b
n00b


Joined: 16 Dec 2022
Posts: 25

PostPosted: Sat Dec 17, 2022 8:51 pm    Post subject: [SOLVED] Can't mount /boot. Unknown file system vfat. Reply with quote

I'm not sure if it has gotten to the point where I should just wipe the hard drive and restart.

https://imgur.com/a/slDbfi1

I tried to use wgetpaste to copy and paste here but It's not working. I spent the entire day trying to get it to work. I'm not sure where all of these problems stemmed from. I was basically done with the installation and was about to boot into the desktop but then I had an issue with udev and solving that just created problem after problem.

My wifi/ethernet enp30s0 randomly dissapeared. There used to be a light when I plugged in my ethernet cable now theres no light
I tried to attach a screenshot of ifconfig
Ifconfig shows nothing anymore so I did ifconfig -a and it showed eth0 so I tried connecting to eth0 and it doesn't work at all.
My idea was to just compile another kernel and hopefully it will fix all this
I did make menuconfig to do custom kernel. The original kernel is genkernel
I get the settings and did make && make modules_install && make install
And got error after: -bash: modules_install: command not found
So I can't even use the new kernel
I did eselect kernel list and it wasn't there
I tried to switch into the second kernel to see if it would fix anything. Nope
I try to mount into /boot and now I get unknown filesystem vfat and read only system

I'm still trying to get wgetpaste to work. I hope the images show enough for now


Last edited by skitches on Wed Dec 21, 2022 3:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Sat Dec 17, 2022 9:14 pm    Post subject: Reply with quote

Looks like your root partition is read-only, thus you cannot make any changes.
You might try
Code:
mount -o remount,rw /
... and see if it helps anything.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Sat Dec 17, 2022 9:21 pm    Post subject: Reply with quote

skitches,

Welcome to the forums.

Its very rarely that reinstalling Gentoo fixes anything. It won't here.

Your error message
Code:
fat: disagrees about versions of symbol ...
means that the kernel and its modules have gotten out of step.
It looks like you have two kernels installed but the running kernel and its modules are out of step

From the Read-only filesystem message when you tried to use wgetpaste and the (none) prompt, it looks like several other modules failed to lead too.

The fix is to redo your kernel install.

Get back into your chroot. DO not partition your disk, do not make any filesystems.
Boot your live media.
mount your root at /mnt/gentoo.
Mount everything else as per the handbook. Including your boot at /mnt/gentoo/boot
Chroot as per the handbook.

Now redo your kernel build and install. Make sure the modules are installed.
That will fix your module loading issues.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
skitches
n00b
n00b


Joined: 16 Dec 2022
Posts: 25

PostPosted: Sun Dec 18, 2022 1:58 am    Post subject: Reply with quote

NeddySeagoon wrote:

The fix is to redo your kernel install.

Get back into your chroot. DO not partition your disk, do not make any filesystems.
Boot your live media.
mount your root at /mnt/gentoo.
Mount everything else as per the handbook. Including your boot at /mnt/gentoo/boot
Chroot as per the handbook.

Now redo your kernel build and install. Make sure the modules are installed.
That will fix your module loading issues.


I'm sorry I am very confused. I've tried to follow for a couple hours but I'm not sure.
The solution would be to plug the live usb back into the computer and redo the installation normally besides mounting partitions? I tried putting the live usb back into the computer but when I took it out nothing I did saved over.
Back to top
View user's profile Send private message
skitches
n00b
n00b


Joined: 16 Dec 2022
Posts: 25

PostPosted: Sun Dec 18, 2022 2:00 am    Post subject: Reply with quote

Zucca wrote:
Looks like your root partition is read-only, thus you cannot make any changes.
You might try
Code:
mount -o remount,rw /
... and see if it helps anything.


This fixes the read only file system problem. Thank you
Only thing is when I reboot it goes back to read only
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 21639

PostPosted: Sun Dec 18, 2022 4:28 am    Post subject: Reply with quote

Yes, the shown command remounts the filesystem read-write only until shutdown, so that you can make changes to apply whatever other fixes are needed. It is not expected to persist across reboots. For that, you need to make use of the read-write access to fix the problem(s) that caused root to be read-only.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Sun Dec 18, 2022 9:04 am    Post subject: Reply with quote

skitches wrote:
The solution would be to plug the live usb back into the computer and redo the installation normally besides mounting partitions? I tried putting the live usb back into the computer but when I took it out nothing I did saved over.
Do the opposite.
  • boot live usb
  • mount partitions
    • your root partition into /mnt/gentoo
    • other partitions in their places under the mounted root partition
  • chroot into /mnt/gentoo
  • recompile kernel
I'd maybe configure the kernel so that fat filesystem module is built-in and also the filesystem module for your root partition, unless you have some reason to have them as modules.
_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Sun Dec 18, 2022 10:28 am    Post subject: Reply with quote

skitches,

Your problem is your kernel and its modules mismatch. The kernel and its modules are from two different kernel builds.
The kernel detects this and refuses to load the mismatching modules. The VFAT module error is in your image but there are others too.
The rest of the install is good, so there is no need to do it all again, just the kernel build and install.

The trick is to get into a position to do just the kernel rebuild.

You do that by doing the mounting and chroot steps from the handbook and nothing else.
Making partitions, filesystems or unpacking a stage3 will all destroy the good work so far.

Once you are back in the chroot, you are running your Gentoo install on top of the kernel and services provided by the boot media.
Now you can fix just the kernel.

As Zucca says,
Quote:
... fat filesystem module is built-in and also the filesystem module for your root partition ...
is a good idea.

In case your system time has stepped backwards, which confuses make, start the kernel build process with
Code:
make clean

This removes all the build products from previous builds so that make cannot reuse them. That ensures a full clean kernel build.

Make is lazy. It looks at the timestamp on existing output files. If its newer than the input files, make reuses the existing outputfile.
That saves build time when everything works as it should. However, that check will produce the wrong result when system time steps backwards, or even if it stepped forward and is now correct.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
skitches
n00b
n00b


Joined: 16 Dec 2022
Posts: 25

PostPosted: Sun Dec 18, 2022 10:59 am    Post subject: Reply with quote

Alright update

I figure out how to boot back into livecd.
I do everything normally following the handbook, etc, in the live cd till I get to the kernel
I'm trying to do custom kernel so I do make menuconfig and configure it carefully
and the make && make modules_install && make install
everything goes smoothly

kernel starts compiling
think to myself that the headache is over



https://imgur.com/a/wcYverB

30 minutes after It starts compiling It stops and I get this weird

sh ./arch/x86/boot/install.sh 5.15.80-gentoo \ arch/x86/boot/bzimage System.map "/boot"

I do eselect kernel list and the new kernel isn't there.
Back to top
View user's profile Send private message
skitches
n00b
n00b


Joined: 16 Dec 2022
Posts: 25

PostPosted: Sun Dec 18, 2022 11:05 am    Post subject: Reply with quote

NeddySeagoon wrote:
skitches,
or unpacking a stage3 will all destroy the good work so far.


sh#$........... rip
Back to top
View user's profile Send private message
skitches
n00b
n00b


Joined: 16 Dec 2022
Posts: 25

PostPosted: Sun Dec 18, 2022 11:09 am    Post subject: Reply with quote

While i put the usb back in to get on the live cd
it wouldn't let me go into chroot right away
and it wouldn't let me go into usr/src/linux to compile the kernel
So I thought that I should get another tarball and unpack it.

Would unplugging the usb save everything that was on the system or too late?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Sun Dec 18, 2022 11:14 am    Post subject: Reply with quote

skitches,

Unpacking the tarball to your Gentoo install overwrites everything there.
If you have done that, your existing install is gone.

Going back to your most recent image, the kernel built and installed.
You exited the chroot, so your kernel is at /mnt/gentoo/usr/src/linux, not /usr/src/linux.
That's normal.

When the live media is running you have two installs, one inside the other.
The outer one is the live media, which is just a toolkit, the inner one, at /mnt/gentoo, which is your install.
When you do
Code:
chroot /mnt/gentoo /bin/bash
the outer install is hidden ... until you exit the chroot.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Zucca
Moderator
Moderator


Joined: 14 Jun 2007
Posts: 3345
Location: Rasi, Finland

PostPosted: Sun Dec 18, 2022 11:31 am    Post subject: Reply with quote

Like Neddy said:
NeddySeagoon wrote:
Making partitions, filesystems or unpacking a stage3 will all destroy the good work so far.
Unpacking stage3 tar into /mnt/gentoo (assuming you had your filesystem mounted there) will overwrite every file the stage3 tar contains. In this case - most of the files. So back to square.. two (since first square is partitioning and formatting ;) ).
Unplugging the live USB media won't help after that.

You may already know this, but just in case:
    If you mount your internal hard drive partitions to /mnt/gentoo, then files inside /mnt/gentoo is the contents of your hard drive, not the live USB. So if you untarred the stage3 tar there, everything is back to defaults.

    The stage3 contains the very minimum set of files to have a working build environment to be able to:
    • update the packages
    • compile a kernel
    • install a bootloader/bootmanager
    • etc...
    ... so that you can boot without the live USB and continue installing and configuring your system to your liking.

_________________
..: Zucca :..
Gentoo IRC channels reside on Libera.Chat.
--
Quote:
I am NaN! I am a man!
Back to top
View user's profile Send private message
skitches
n00b
n00b


Joined: 16 Dec 2022
Posts: 25

PostPosted: Sun Dec 18, 2022 9:34 pm    Post subject: Reply with quote

I'm now having a problem when I load into system
it's saying
Loading Linux 5.15.00 gentoo.....
it's been stuck on it for 10 minutes with nothing happening
Back to top
View user's profile Send private message
skitches
n00b
n00b


Joined: 16 Dec 2022
Posts: 25

PostPosted: Sun Dec 18, 2022 9:54 pm    Post subject: Reply with quote

Zucca wrote:
Like Neddy said:
NeddySeagoon wrote:
Making partitions, filesystems or unpacking a stage3 will all destroy the good work so far.
Unpacking stage3 tar into /mnt/gentoo (assuming you had your filesystem mounted there) will overwrite every file the stage3 tar contains. In this case - most of the files. So back to square.. two (since first square is partitioning and formatting ;) ).
Unplugging the live USB media won't help after that.

You may already know this, but just in case:
    If you mount your internal hard drive partitions to /mnt/gentoo, then files inside /mnt/gentoo is the contents of your hard drive, not the live USB. So if you untarred the stage3 tar there, everything is back to defaults.

    g.


I'm confused on when going back to the live cd
Switching between the new installation and live cd
When I go back to the livecd nothing that was there before was there
Like when I switch back to live cd and do eselect it says
command not found
And doesnt let me do eselect kernel to change kernel list
When switching back to livecd from new installation does everything have to be installed again?

Another example is I boot to the new installation


edit: I figured out how to get back to where i was by doing

root #mount --rbind /dev /mnt/mychroot/dev
root #mount --make-rslave /mnt/mychroot/dev
root #mount -t proc /proc /mnt/mychroot/proc
root #mount --rbind /sys /mnt/mychroot/sys
root #mount --make-rslave /mnt/mychroot/sys
root #mount --rbind /tmp /mnt/mychroot/tmp
root #mount --bind /run /mnt/mychroot/run
and have the loading linux forever problem
I think it's a problem with the kernel that maybe I'm on the old one
So I reboot into livecd and want to do change kernels
but it says command not found like nothing i did was there
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Sun Dec 18, 2022 10:50 pm    Post subject: Reply with quote

skitches.

Your kernel is missing frambuffer support, or your DRM kernel module is configured as <*> and missing firmware, or both.

When you leave the chroot after completing your install. You have two different Gentoo installs on your system.
The one you have just completed is on the permanent storage in your system.
The other is the live USB. When you shut down and unplug it, you only have the Gentoo install you have just done.

When the boot fails and you plug the liveUSB in to rescue you non booting Gentoo, your install is still there but its not attached to the liveUSB gentoo yet.
That's what mounting your filesystem tree at /mnt/gentoo does.

Mount your root partition at /mnt/gentoo.
Mount your boot partition at /mnt/gentoo/boot ... the order matters.
Mount /proc /dev and /sys under /mnt/gentoo/ just as the handbook describes.
This is attaching your Gentoo install to the liveCD a piece at a time, so you can fix it.

When you have completed the mounts, do the chroot part of the handbook and your Gentoo will be there, just as it was when you left the chroot.

You may find The PC Boot Process of interest.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4160
Location: Bavaria

PostPosted: Sun Dec 18, 2022 10:52 pm    Post subject: Reply with quote

skitches wrote:
I'm now having a problem when I load into system
it's saying
Loading Linux 5.15.00 gentoo.....
it's been stuck on it for 10 minutes with nothing happening

This means probably you dont have configured Framebuffer (FB). Maybe you want read this (nr. 3):
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Basic_Settings_.28Must_have.29
If you want to boot with the live CD and then change something on your harddisk you have to do these steps (sorry, its german, but you need only the list of steps):
https://forums.gentoo.org/viewtopic-t-1112778.html
(it is the first window).



@Neddy: To slow again ... :lol:
Back to top
View user's profile Send private message
skitches
n00b
n00b


Joined: 16 Dec 2022
Posts: 25

PostPosted: Mon Dec 19, 2022 12:50 am    Post subject: Reply with quote

[quote="pietinger"]
skitches wrote:
I'm now having a problem when I load into system

https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Basic_Settings_.28Must_have.29
If you want to boot with the live CD and then change something on your harddisk you have to do these steps (sorry, its german, but you need only the list of steps):
https://forums.gentoo.org/viewtopic-t-1112778.html
(it is the first window).



Thank you. Both links are incredibly useful. I printed out https://forums.gentoo.org/viewtopic-t-1112778.html and put it on my wall
Back to top
View user's profile Send private message
skitches
n00b
n00b


Joined: 16 Dec 2022
Posts: 25

PostPosted: Mon Dec 19, 2022 2:13 am    Post subject: Reply with quote

NeddySeagoon wrote:
skitches,

Going back to your most recent image, the kernel built and installed.
You exited the chroot, so your kernel is at /mnt/gentoo/usr/src/linux, not /usr/src/linux.
That's normal.

When the live media is running you have two installs, one inside the other.
The outer one is the live media, which is just a toolkit, the inner one, at /mnt/gentoo, which is your install.
When you do
Code:
chroot /mnt/gentoo /bin/bash
the outer install is hidden ... until you exit the chroot.


I mount everything carefully
Compile kernel
Made sure to do make install
exit the chroot
then I cd over to
cd /mnt/gentoo/usr/src/linux
but I don't see any new kernel there

https://imgur.com/a/WzExLxY
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54254
Location: 56N 3W

PostPosted: Mon Dec 19, 2022 10:41 am    Post subject: Reply with quote

skitches,

eselect is only a valid command inside the chroot.

Outside of the chroot, use
Code:
ls /mnt/gentoo/usr/src
to see your kernel sources.
linux is a symbolic link there and will appear in cyan (a light blue).
Code:
ls -l /mnt/gentoo/usr/src
will show what the link points to.

Your kernel built and installed. That's fine. the kernel in /usr/src is only used to build.
At boot time, the boot loader loads the installed binary kernel from somewhere in /boot.
After root is mounted, the modules are loaded from /lib/modules
/usr/src in not used at run time.

Outside the chroot, there is only a toolkit that allows Gentoo to be installed.
The basic Gentoo that everyone has is in the stage3 tarball, which is what you chroot into.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 4160
Location: Bavaria

PostPosted: Mon Dec 19, 2022 11:12 am    Post subject: Reply with quote

skitches wrote:
I mount everything carefully
Compile kernel
Made sure to do make install
exit the chroot
then I cd over to
cd /mnt/gentoo/usr/src/linux
but I don't see any new kernel there

Do you use a bootmanager like grub (1) or do you want UEFI boots your stub kernel directly (2) ?
If 1 you MUST do (always) "grub-mkconfig -o /boot/grub/grub.cfg" after every kernel change (inside chroot). See more here:
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Cheat_Sheets
(if not grub will probably start your old kernel; dont forget: "make install" copies "only" your kernel into /boot; grub-mkconfig looks into /boot and assembles its config from all kernels it have found, so you can select which kernel you want boot after next system boot; so, to activate you must do a reboot at last)

If 2 see more here: https://wiki.gentoo.org/wiki/EFI_stub and https://wiki.gentoo.org/wiki/Efibootmgr
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum