You are not logged in.

#1 2012-09-19 05:42:41

cubisttriangle
Member
Registered: 2012-01-22
Posts: 11

[Solved] Boot error: unknown filesystem type

Ok. I seem to have incapacitated my system by rm -rf /lib after The /lib directory became a symlink. I got the system to boot successfully (don't remember specifics, but I know I did this at some point), however, I now receive an error when the system boots that a filesystem could not be mounted because it is of unknown type, ext3.  Looking at /etc/fstab, I saw that /dev/sda5, my bootable /boot partition, is ext3.  All my other partitions use the btrfs filesystem.  The main problem with this error is that I don't seem to be able to load any modules, create network interfaces, etc.  What is the best way to remedy this situation?

Here are a few ideas I've come up with, but I'm not positive all of them are possible, nor do I have the technical prowess to implement them confidently hmm ...
   a.) Recompile the kernel, wherever it may currently reside, to include ext3 support. No clue how to do this.
   b.) Convert the partition from ext3 to btrfs using btrfs-convert. As straight-forward as this utility appears, I'd need some guidance.
   c.) Verify the contents of /dev/sda5 are indeed only kernel components, clear the partition, fsck.btrfs it, and reload the kernel components. Need help here, too. [hangs head]

Like I said, I'll need quite a bit of help getting any of these options implemented correctly. I'm open to other options as well, but I have no network access on the computer and I cannot lose my data.
Thank you for your help!

Last edited by cubisttriangle (2012-09-21 03:33:17)

Offline

#2 2012-09-19 22:59:15

johni
Member
Registered: 2012-02-03
Posts: 102

Re: [Solved] Boot error: unknown filesystem type

I bet that after you removed the /lib, it took your kernel modules with it, and a mkinitcpio was run before reinstalling the kernel to move the modules to /usr/lib.

Probably what you can do it download the latest bootable install media for arch, and then mount your root filesystem in it, and then chroot over to it and install the kernel and rerun mkinitcpio.

To recap, this is what I would try:

- Boot from arch install cd/dvd/usb an mount and chroot into your root fs:

mkdir /tmp/root
mount /dev/sdXX /tmp/root    #(replace sdXX with your root partition)
mount /dev/sda5 /tmp/root/boot
mount --bind /proc /tmp/root/proc
mount --bind /sys /tmp/root/sys
mount --bind /dev /tmp/root/dev
mount --bind /dev/pts /tmp/root/dev/pts
chroot /tmp/root /bin/bash --login

Now, you should be at the command prompt in your chrooted system.

Now, use pacman to reinstall the kernel, and then run mkinitcpio to rebuild to init ram fs:

pacman -S linux
mkinitcpio -p /etc/mkinitcpio.d/linux.preset

Now, exit the chroot, and undo the mounts:

exit
umount /tmp/root/proc
umount /tmp/root/sys
umount /tmp/root/dev/pts
umount /tmp/root/dev
umount /tmp/root/boot
umount /tmp/root

Now, cross your fingers and reboot with the install media removed.

Hope this helps!

Offline

#3 2012-09-20 04:10:40

cubisttriangle
Member
Registered: 2012-01-22
Posts: 11

Re: [Solved] Boot error: unknown filesystem type

Everything was going well until trying to run

[root@archiso /]# pacman -S linux
error: failed to initialize alpm library (could not find or read directory)

Exiting chroot, pacman fired up fine. Do I need to do anything like this? Another post mentions something about permissions, and I was never prompted for any of my system credentials, so I don't know if that has anything to do with it.
Chrooting back in, I ended up running

[root@archiso /]# mkdir -p /var/lib/pacman
[root@archiso /]# pacman
warning: database file for 'core' does not exist
warning: database file for 'extra' does not exist
warning: database file for 'community' does not exist
warning: database file for 'multilib' does not exist
error: no operation specified (use -h for help)

So I grabbed the database files

[root@archiso /]# wget mirror.pointysoftware.net/archlinux/core/os/x86_64/core.db
[root@archiso /]# wget mirror.pointysoftware.net/archlinux/extra/os/x86_64/extra.db
[root@archiso /]# wget mirror.pointysoftware.net/archlinux/multilib/os/x86_64/multilib.db
[root@archiso /]# wget mirror.pointysoftware.net/archlinux/community/os/x86_64/community.db
[root@archiso /]# mkdir /var/lib/pacman/sync
[root@archiso /]# mv *.db /var/lib/pacman/sync

THEN!

[root@archiso /]# pacman -S linux

Woo! That sort of worked, but apparently every package "exists on the filesystem", so "no packages were upgraded".
Should I procede on to ...

[root@archiso /]# mkinitcpio -p /etc/mkinitcpio.d/linux.preset

...or wait?

Offline

#4 2012-09-20 04:36:18

cubisttriangle
Member
Registered: 2012-01-22
Posts: 11

Re: [Solved] Boot error: unknown filesystem type

Guess I'm a little impatient. I ran it and into errors...

[root@archiso /]# mkinitcpio -p /etc/mkinitcpio.d/linux.preset
==> Building image from preset: 'default'
    -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img
ERROR: unable to locate module directory for kernel '3.4.4-2-ARCH'
==> Building image from preset: 'fallback'
    -> -k /boot/vmlinuz-linux -c /etc/mkinitcpio.conf -g /boot/initramfs-linux-fallback.img -S autodetect
ERROR: unable to locate module directory for kernel '3.4.4-2-ARCH' 

Stuck again...

Offline

#5 2012-09-20 11:14:46

kvanberendonck
Member
Registered: 2012-08-17
Posts: 45

Re: [Solved] Boot error: unknown filesystem type

Try in the live CD:

mount /dev/sdaX /mnt <-- replace sdaX with your root device
mount /dev/sda5 /mnt/boot
pacstrap /mnt base base-devel
chroot /mnt
mkinitcpio -p linux
exit

Careful! Reinstalling base and base-devel could knock out some of your config files! Only use if you're absolutely sure you don't mind re-configuring some parts of your system. It might also bring back initscripts so you may have to reinstall systemd, if you use it.

Offline

#6 2012-09-20 17:10:10

johni
Member
Registered: 2012-02-03
Posts: 102

Re: [Solved] Boot error: unknown filesystem type

cubisttriangle wrote:

Woo! That sort of worked, but apparently every package "exists on the filesystem", so "no packages were upgraded".


It sounds like the pacman database that contains the list of installed packages is gone, or maybe you had /var on a different partition?
If you has /var on a different partition, then you will need to mount the /var in the chroot, too.

If not, then, try the suggestion by kvanberendonck which feels more like a complete reinstall. Though I think you will still have the problem of files already existing on filesystem.

Offline

#7 2012-09-20 18:02:07

cubisttriangle
Member
Registered: 2012-01-22
Posts: 11

Re: [Solved] Boot error: unknown filesystem type

@Johni: You are correct, /var is mounted on a different partition. I'll try mounting that that in chroot, tonight.
@kvanberendonck: As johni guessed, when I ran your solution, it did say that all the files already existed on the filesystem. Additionally, mkinitcpio requires /proc to be mounted in chroot.

I'll give an update again, tonight. Thanks for both of your help!

Offline

#8 2012-09-20 18:18:39

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [Solved] Boot error: unknown filesystem type

Mount it before chrooting, not from inside the chroot.

"Unknown filesystem type" sounds to me like you forgot to update the fstab.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#9 2012-09-20 19:50:03

johni
Member
Registered: 2012-02-03
Posts: 102

Re: [Solved] Boot error: unknown filesystem type

DSpider wrote:

Mount it before chrooting, not from inside the chroot.

"Unknown filesystem type" sounds to me like you forgot to update the fstab.

yes, of course I meant to mount it before chrooting.

Add this to the proceedure with the other mounts

mount /dev/sdXX /tmp/root/var         # replace sdXX with the partition contianing var

Offline

#10 2012-09-20 19:54:21

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [Solved] Boot error: unknown filesystem type

I think you mean something like:

# mount /dev/sdxY /mnt          #Root partition.
# mount /dev/sdxZ /mnt/var      #/var partition.
# arch-chroot /mnt
# ...

Also mount any other partition after root.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#11 2012-09-21 03:32:58

cubisttriangle
Member
Registered: 2012-01-22
Posts: 11

Re: [Solved] Boot error: unknown filesystem type

Holy crapshit we did it!  Thank you johni, DSpider, and kvanberendonck!!!  My system is still a little crippled, but at least it's walking. Go Arch community!
Ok, now I need to do some studying to understand what we actually did - mainly with regard to mkinitcpio.  Again, muchas gracias, amigos.

Offline

#12 2012-09-21 05:29:04

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: [Solved] Boot error: unknown filesystem type

The initramfs image (from the boot folder) was "tailored", with the autodetect hook from /etc/mkinitcpio.conf for the old ext3 filesystem. So you needed to re-generate the initramfs with:

# mkinitcpio -p linux    #For the stock "linux" kernel from the official repos.

You need to do this if the hardware changes or some other aspect of the boot process changes. A faster way of fixing it was to use the Fallback image (which contains all modules). You didn't necessarily have to chroot into your install, but meh... It's one way of fixing it.


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#13 2012-09-21 14:37:12

cubisttriangle
Member
Registered: 2012-01-22
Posts: 11

Re: [Solved] Boot error: unknown filesystem type

Thanks for the info - I'll keep it in mind since I'm going to be upgrading things soon.  The fallback kernel listed on the boot menu (if that's what you mean) didn't work for me.  I'd certainly be interested in hearing any other information you're willing to divulge!

Offline

Board footer

Powered by FluxBB