You are not logged in.
I was running a self-compiled linux 4.14, and trying to test some filesystem. But right now I can't even mount a ext2 system by following lines:
# dd if=/dev/zero of=myfs bs=1M count=1
# /sbin/mkfs.ext2 myfs
# mount -t ext2 -o loop ./myfs /mnt
the system says mount: Operation not permitted.
I also notice that in this post [SOLVED] Cannot mount squashed filesystem after upgrade, a similar error occurs due to some boot partition problem.
And my result are 4.14 and 4.19. for
# uname -a
# pacman -Q linux
I wonder if I was compiling kernel the wrong way that leads to this error.
Last edited by tabokie (2018-12-04 15:34:59)
Offline
Welcome to the arch linux forums tabokie. You have not supplied any details about the .config used for the custom kernel, how it was built or how it was installed.
You also have not supplied the output from any command except mount.
Offline
And my result are 4.14 and 4.19. for
# uname # pacman -S linux
I wonder if I was compiling kernel the wrong way that leads to this error.
Yep. Edit: Well, no. it has nothing to do with how the kernel is compiled. But that disparity is your problem </edit>
The kernel you are running is not the kernel that is installed; as such it cannot find its modules.
This can happen if you have updated the kernel and have not rebooted (you are still running the old kernel)
-or-
Your boot partition was not mounted when you updated the kernel, so the old kernel remains on the boot partition and the boot loader is still finding it.
BTW, your commands as shown work just fine here..
Last edited by ewaller (2018-12-02 17:03:01)
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
$ uname
linux
# pacman -S linux
resolving dependencies...
looking for conflicting packages...
Packages (1) linux-4.19.4.arch1-1
Total Download Size: 66.89 MiB
Total Installed Size: 71.31 MiB
:: Proceed with installation? [Y/n]
Offline
Your boot partition was not mounted when you updated the kernel, so the old kernel remains on the boot partition and the boot loader is still finding it.
BTW, your commands as shown work just fine here..
So how could I fix this without updating and dumping my compiled kernel? I'm positive that I am running the compiled kernel, only something wrong with boot partition.
Here is my script to compile and load new kernel:
make CROSS_COMPILE="ccache " -j4
make modules_install
cp -v ~/linux/arch/x86_64/boot/bzImage /boot/vmlinuz-linux
mkinitcpio -p linux
grub-mkconfig -o /boot/grub/grub.cfg
reboot
Last edited by tabokie (2018-12-03 10:47:25)
Offline
$ uname linux # pacman -S linux resolving dependencies... looking for conflicting packages... Packages (1) linux-4.19.4.arch1-1 Total Download Size: 66.89 MiB Total Installed Size: 71.31 MiB :: Proceed with installation? [Y/n]
I made a typo, should be pacman -Q linux
Offline
can you check your dmesg output after trying to mount your loop device?
Last edited by sincomil (2018-12-03 07:32:29)
Offline
can you check your dmesg output after trying to mount your loop device?
there is no new kernel message after the mount.
Offline
About "mount: Operation not permitted" on the extfs2 image: did you try that as regular user or as root?
Offline
About "mount: Operation not permitted" on the extfs2 image: did you try that as regular user or as root?
as root.
Offline
Please post complete dmesg and lsmod outputs and "stat /lib/modules/`uname -r`"
Offline
Please post the output of zcat /proc/config.gz and lsmod. If you have not included support for CONFIG_IKCONFIG please post the .config used.
Offline
I am using vmware and can't copy the whole config right now.
I re-install the system, all I have done till now are
a.install the system
b.compile a kernel
c.load it as an additional boot choice
btw, all config are as default.
After crosschecking, only difference between me and the guide is I use these lines to configure the EFI grub booting, instead of UEFI-GPT mode:
pacman -S grub efibootmgr
grub-install --recheck /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg
And currently both systems are running ok, only that new kernel doesn't have the permission to mount.
Can anyone elaborate something on problems about boot partition?
Offline
new kernel doesn't have the permission to mount
That's nonsense, you more likely lack the loop module
I am using vmware and can't copy the whole config right now.
I assume you're looking for https://wiki.archlinux.org/index.php/Pastebin ?
Otherwise please elaborate how vmware relates to your ability to "copy the whole config".
The "boot partition problem" is the thing where the installed kernel is not the running kernel, thus no modules outside the initramfs (eg. the loop one) are available.
This happens when people forget to mount their boot partition when isntalling the kernel and initramfs.
Offline
btw, all config are as default.
Which default defconfig, alldefconfig or olddefconfig? Please stop providing only the outputs you believe are relevant.
Please provide all the outstanding information requests.
Offline
I assume you're looking for https://wiki.archlinux.org/index.php/Pastebin ?
Please provide all the outstanding information requests.
Thanks for the tool and advice, and indeed it's the loop module's fault.
Then how exactly do I have to do to mount the partition when installing my kernel? I didn't see it down here:
https://wiki.archlinux.org/index.php/Ke … ompilation
log and config as you want:
lsmod: https://ptpb.pw/-Bcn
dmesg: https://ptpb.pw/NH4x
zcat /proc/config.gz: https://ptpb.pw/_6RC
Last edited by tabokie (2018-12-04 15:17:03)
Offline
Does the dmesg output cover a failed mount attempt?
Also
stat /lib/modules/`uname -r`/kernel/drivers/block/loop.ko.xz
and (as root)
modprobe loop; lsmod | grep loop
Offline
Does the dmesg output cover a failed mount attempt?
Alsostat /lib/modules/`uname -r`/kernel/drivers/block/loop.ko.xz
and (as root)
modprobe loop; lsmod | grep loop
Problem solved, I didn't set the CONFIG_BLK_DEV_LOOP when compiling kernel.
Thanks for help!
Offline
Your paste said:
CONFIG_BLK_DEV_LOOP=m
so it was compiled as a model.
Now you're compilig it it, SIDESTEPPING the module loading issues…
Offline
Your paste said:
CONFIG_BLK_DEV_LOOP=m
so it was compiled as a model.
Now you're compilig it it, SIDESTEPPING the module loading issues…
the "modprobe loop" says Can't find module in /lib/modules/`uname -r` before, was it really compiled as module?
Offline
We don't know and especially we don't know whether you properly installed modules…
ls /lib/modules/
ls /lib/modules/`uname -r`
ls /lib/modules/`uname -r`/kernel/drivers
ls /lib/modules/`uname -r`/kernel/drivers/block
Offline
We don't know and especially we don't know whether you properly installed modules…
I rebuild again with "CONFIG_BLK_DEV_LOOP=m", the loop.ko shows up.
donno what went wrong before, I will settle for now.
Offline