You are not logged in.
Hi all,
I just migrated from initscripts to systemd (in fact, I did a general update after some time). So far so good. The problems start here: I cannot mount /boot.
$ mount /boot
mount: unknown filesystem type 'ext2'Obviously I would like to move the new kernel and initramfs to the boot partition before rebooting.
The relevant fstab line reads (as you can see, /boot is not automatically mounted which is why it was not mounted during the update in the first place.)
/dev/sda1 /boot ext2 noauto,defaults 0 1Now I have no idea why mount (or the kernel) would not mount that partition. It is a wild guess that it probably has something to do with the migration to systemd, because
1. ext2 support should be included in the kernel; the kernel has not even changed since I did not yet reboot. (And as there is no ext2 kernel module for either my old 3.3.7-1 or my new 3.6.10-1 kernel, ext2 support should be included in the kernel itself...)
2. strace of "mount /boot" reveals "ENODEV (No such device)" as the original error
$ strace mount /boot
execve("/bin/mount", ["mount", "/boot"], [/* 24 vars */]) = 0
brk(0) = 0x81ae000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7751000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=166132, ...}) = 0
mmap2(NULL, 166132, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7728000
close(3) = 0
open("/usr/lib/libmount.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`k\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=228268, ...}) = 0
mmap2(NULL, 231020, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb76ef000
mmap2(0xb7725000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x36) = 0xb7725000
mmap2(0xb7727000, 1644, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7727000
close(3) = 0
open("/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\3\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0`\227\1\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1988871, ...}) = 0
mmap2(NULL, 1743556, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7545000
mmap2(0xb76e9000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1a4) = 0xb76e9000
mmap2(0xb76ec000, 10948, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb76ec000
close(3) = 0
open("/usr/lib/libblkid.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240K\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=215808, ...}) = 0
mmap2(NULL, 218608, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb750f000
mmap2(0xb7541000, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x32) = 0xb7541000
mmap2(0xb7544000, 1520, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7544000
close(3) = 0
open("/usr/lib/libuuid.so.1", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\17\0\0004\0\0\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=18004, ...}) = 0
mmap2(NULL, 20684, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7509000
mmap2(0xb750d000, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x3) = 0xb750d000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7508000
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7507000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7507740, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb76e9000, 8192, PROT_READ) = 0
mprotect(0xb750d000, 4096, PROT_READ) = 0
mprotect(0xb7541000, 8192, PROT_READ) = 0
mprotect(0xb7725000, 4096, PROT_READ) = 0
mprotect(0x8051000, 4096, PROT_READ) = 0
mprotect(0xb7773000, 4096, PROT_READ) = 0
munmap(0xb7728000, 166132) = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=8342944, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7307000
mmap2(NULL, 249856, PROT_READ, MAP_PRIVATE, 3, 0x3b1) = 0xb72ca000
brk(0) = 0x81ae000
brk(0x81cf000) = 0x81cf000
close(3) = 0
getuid32() = 0
geteuid32() = 0
getuid32() = 0
geteuid32() = 0
getgid32() = 0
getegid32() = 0
prctl(PR_GET_DUMPABLE) = 1
lstat64("/etc/mtab", {st_mode=S_IFLNK|0777, st_size=17, ...}) = 0
getuid32() = 0
geteuid32() = 0
getgid32() = 0
getegid32() = 0
prctl(PR_GET_DUMPABLE) = 1
stat64("/run", {st_mode=S_IFDIR|0755, st_size=520, ...}) = 0
lstat64("/run/mount/utab", {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
open("/run/mount/utab", O_RDWR|O_CREAT|O_LARGEFILE, 0644) = 3
close(3) = 0
getuid32() = 0
geteuid32() = 0
getgid32() = 0
getegid32() = 0
prctl(PR_GET_DUMPABLE) = 1
stat64("/etc/fstab", {st_mode=S_IFREG|0644, st_size=1008, ...}) = 0
open("/etc/fstab", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1008, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7750000
read(3, "# \n# /etc/fstab: static file sys"..., 4096) = 1008
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb7750000, 4096) = 0
readlink("/dev", 0xbfb5b4c9, 4096) = -1 EINVAL (Invalid argument)
readlink("/dev/sda1", 0xbfb5b4c9, 4096) = -1 EINVAL (Invalid argument)
stat64("/dev/sda1", {st_mode=S_IFBLK|0660, st_rdev=makedev(8, 1), ...}) = 0
readlink("/boot", 0xbfb5b4d9, 4096) = -1 EINVAL (Invalid argument)
stat64("/sbin/mount.ext2", 0xbfb5c4dc) = -1 ENOENT (No such file or directory)
stat64("/sbin/fs.d/mount.ext2", 0xbfb5c4dc) = -1 ENOENT (No such file or directory)
stat64("/sbin/fs/mount.ext2", 0xbfb5c4dc) = -1 ENOENT (No such file or directory)
stat64("/usr/bin/mount.ext2", 0xbfb5c4dc) = -1 ENOENT (No such file or directory)
stat64("/usr/sbin/mount.ext2", 0xbfb5c4dc) = -1 ENOENT (No such file or directory)
mount("/dev/sda1", "/boot", "ext2", MS_MGC_VAL, NULL) = -1 ENODEV (No such device)
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=2502, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7750000
read(3, "# Locale name alias data base.\n#"..., 4096) = 2502
read(3, "", 4096) = 0
close(3) = 0
munmap(0xb7750000, 4096) = 0
open("/usr/share/locale/en_US/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/util-linux.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "mount: ", 7mount: ) = 7
write(2, "unknown filesystem type 'ext2'", 30unknown filesystem type 'ext2') = 30
write(2, "\n", 1
) = 1
close(1) = 0
close(2) = 0
exit_group(32) = ?
+++ exited with 32 +++
$... also when I plug in a usb device, it is not recognized (it does not see the partitions on the usb key or the usb key itself, there is no device /dev/sdb created)
... fsck.ext2 on the other hand seems to be able to access /dev/sda1
$ fsck.ext2 /dev/sda1
e2fsck 1.42.6 (21-Sep-2012)
/dev/sda1: clean, 44/33200 files, 17807/132536 blocks
$... so I'm not entirely sure what to make of it.
3. e2fsprogs is installed and up to date (1.42.6-1) so the problem cannot lie with the mount program
Obviously, I could access the /boot partition from a live system. However, before trying to do that I would like to ask 3 questions:
1. What causes this problem? Is it systemd? Is it the incompatibility of the running (old) kernel with the (updated) rest of the system? Is it something else? How can I find out?
2. Is this normal and will it work again (will the system be able to mount filesystems again) once the system is rebooted into the new kernel? Or is this a more general problem (in which case it might not be of much helb to reboot)
3. Is there a way to force mounting /boot in the system as it currently runs (as fsck.ext2 is able to access /dev/sda1, other programs theoretically should also be able to do so) ... since this would probably be less likely to cause further damage.
Thank you; any help is appreciated...
Edit: marked as solved and removed the reference to systemd from the subject as the problem was unrelated to systemd
Last edited by gay (2012-12-16 17:47:35)
We are exactly the people our parents always warned us about.
Offline
It is a wild guess that it probably has something to do with the migration to systemd, because...
^^This is complete crap. There has been waaayyy too much of this ignorant blaming of systemd for all kinds of stupid problems of late.
You are probably having issues with the module because you updated the kernel and have not rebooted. I totally fail to see how you can state that "ext2 support should be included in the kernel" and still somehow come to the conclusion that it must be a systemd problem.
Offline
From your own strace:
mount("/dev/sda1", "/boot", "ext2", MS_MGC_VAL, NULL) = -1 ENODEV (No such device)And from the ERRORS section of mount(2):
ENODEV filesystemtype not configured in the kernel....which supports WonderWoofy's guess that you upgraded the kernel and haven't rebooted. Sounds like you've shot yourself in the foot.
Last edited by falconindy (2012-12-16 17:13:59)
Offline
Check your pacman logs, there should have been a warning from the 'linux' package.
The probelm is (probably) that the ext2 module was not loaded when you updated your kernel. When you now try to mount /boot, the kernel tries to load the ext2 module, but cannot find it (as the old modules were removed when you installed the new kernel).
I can see a few ways to possibly fix it:
1) if you still have your old kernel in the pacman cache, roll back to that (pacman -U /var/cache/pacman/pkg/linux-XXX), then mount /boot, then reinstall the new kernel.
2) failing that you might be able to modprobe/insmod the correct module from the new kernel directory directly (insmod /lib/modules/3.6.X/...). You might need to 'force' this, but it might not work. For a couple of reasons: the old kernel might be too old for the new module, the new kernel provides ext2 as port of the ext4 module, but you might already have an ext4 module loaded (and be unable to rmmod it).
For the future you can avoid this problem in a few ways:
1) as ext2 is now part of the ext4 module, it will probably be loaded anyway, so it should not be a problem in the future.
2) you could add the option 'x-systemd.automount' to the entry for /boot in your fstab and it will be automounted on access, meaning your new kernel will automatically be installed on the correct partition.
Offline
Thank you all, especially tomegun.
The crucial hint was that ext2 is now part of the ext4 module. I did not know that. I did not have to roll back the kernel ... simply extracted the relevant modules from the linux-3.3.7-1 package that was still in /var/cache/pacman/pkg (crc16, jbd2, mbcache, and ext4). I am now able to mount /boot
@WonderWoofy: I do apologize. The problem had nothing to do with systemd ^^ (and yes, I also keep hearing complaints about systemd migration issues, which is why I postponed the system update for so long)
We are exactly the people our parents always warned us about.
Offline