How to mount a fat32 partition from the arch bootable usb ?

loaExMachina@sh.itjust.works to Linux@lemmy.ml – 18 points –

So, I've been having some bugs when I turn on my PC since I installed my GPU, and I figured a possible reason might be that it uses bios instead of uefi, although my motherboard supports uefi.

So I've been trying to change that, following the instructions from this reddit comment, cross-referenced with relevant arch wiki articles, all from the archiso key I used to install the OS in the first place. But I'm having trouble with the second-to last step: Mounting the newly created partition at /efi. I added the line

PARTLABEL=esp /efi fat32 defaults 0 2 In /etc/fstab Then I created the /efi directory and tried doing mount /dev/nvme0n1p4 /efi I get an error message telling me it can't find an ext4 filesystem I don't know why it's expecting an ext4, several tutorials agreed it had to be a fat32. Then I try mount -t fat32 /dev/nvme0n1p4 /efi And get mount: /efi: unknown filesystem type 'fat32'

So... Is it impossible to mount a fat32 system from the arch installation device ? If so, what's the workaround? If not, is it something else I'm doing wrong?

This had taken me my whole afternoon, and in hindsight I would've saved more time reinstalling the whole system. This is not off the table, but the fact that I might be really close to success kinda dissuades me from doing that...

OS: Arch Linux x86_64 Kernel: 6.6.8-arch1-1

9

mount -t fat32 /dev/nvme0n1p4 /efi

Try : mount -t vfat /dev/nvme0n1p4 /efi

Thank you ! However, now I'm getting a "bogus number of reserved sectors" error. A problem with the partition I made I guess...

Thank you again. I got this when I try to run it. screen picture

I tried once with only the esp partition and once with the who'e device, but same result. It's also the same without the -r option. I tried using e2fsk as suggested by the output, but it also doesn't work (without option or with -b it just displays the help page, with the -c option and either number it says "no such file or directory" and it won't accept a non-numeric argument).

If at this point you are tired of helping me, I completely understand; and I still have the option of reinstalling (the home is on its own partition and I've got a backup anyway, so I wouldn't lose too much). Regardless, I am grateful for the help you've provided so far!

Sorry I'm late to the party: your disk is still using DOS/MBR layout, but you're trying to use UEFI

Unfortunately MBR disks don't work with UEFI. This tracks with the partition type, since fsck is treating it like ext2 (the suggested filesystem for /boot sector) instead of vfat/FAT32 (the suggested filesystem for the Efi System Partition).

First thing I would try is forcing fsck to treat /efi as vfat, since it kept defaulting to ext2. That will tell us if you've got the filesystem as vfat and fsck is wrong or if it's actually corrupted. If it's not corrupted, you should roll back the changes and follow a different guide that mentions changing from MBR (Master Boot Record) to GPT (GUID Partition Table). If it is corrupted, I'm gonna guess you tried to change the filesystems without removing the original fs first, thinking you could outsmart the computer and avoid temporarily relocating your files (speaking from experience). In that case your only hope would be disk forensics software. Best bet would be to salvage what you can, then change the disk type.

Unfortunately changing the disk type is not as easy as changing filesystems, the part of the disk that tells the PC where the files are located is the thing that's being rewritten, so that operation does "erase" the disk (all the bits are still physically there, but the PC doesn't know where they're located). You'll want to do a full backup of all your /usr /bin /root /lib /home /etc and anything else necessary to get your system back to how you like with all your important files, then change the partioning scheme to GPT and, hey, since it's now a blank disk anyway, might as well treat it as a fresh install of Arch to avoid further headaches.

Guilty as charged! Thank you, I already did the reinstall. Funny thing is, I followed a shady tutorial for the conversion to gpt. One so suspicious that I probably should 've seen trouble coming- and I did to some extent, enough to make me backup important file before but not enough to fully dissuade me since I hadn't found anything else nearly as simple. Here is the sustorial . Why so sus ? It's made by a company that sells a recovery software, which they promote at the end of the article "in case things go wrong". Such blatant crooks, I feel so dumb for falling for it ! I've learnt my lesson now. No more corpo website, only arch wiki and well moderated user communities and forums.

Oh! That's also an experience I've had. Lessons learned and whatnot. Sorry I wasn't here earlier to chime in and save you some time. Glad you've got it working again and learned something along the way, though!

From the errors it seems like the partition is damaged, maybe beyond repair. Good that you are able to restore from backup.