-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version 6.6: Kernel panic - not syncing: Can't create rootfs #31
Comments
Hello fulalas,
fulalas:
I'm not sure if this is related to aufs, but I'm failing to boot on PorteuX 0.7 and Porteus 5.01 with the new kernel 6.6 + aufs 6.6 branch:
`kernel panic - not syncing: Can't create rootfs`
What parameters did you give to kernel cmdline?
J. R. Okajima
|
I just tried to build kernel 6.6 without aufs and the same error occurs. I'm closing this because although I don't know how to fix it, it's clear not aufs's fault. Sorry for bothering you and thanks for the help :) |
@sfjro, I'm re-opening this because it seems the problem is really related to your code, specifically this file If I build kernel 6.6.x with all patches but without I haven't tried to use
Do you mind taking a look at this issue? Thanks once again for the hard work! :) |
Hello,
fulalas:
@sfjro, I'm re-opening this because it seems the problem is really related to your code, specifically this file `tmpfs-idr.patch`.
:::
`BOOT_IMAGE=/boot/syslinux/vmlinuz mitigations=off initrd=/boot/syslinux/initrd.zst`
tmpfs-idr.patch? That is unexpected.
- Are there any logs left? If there is, post please.
- Without tmpfs-idr.patch, what will /proc/mounts look like just after
the boot?
- Does your distribution 'Porteus' make change about tmpfs or something?
Where can I found their source files?
J. R. Okajima
|
Not sure what kind of logs you're expecting.
Without
With
I'm actually using PorteuX. The initrd has this script which is responsible for mounting everything in the boot time:
|
One more file from initrd that I forgot to post:
|
fulalas:
Without `tmpfs-idr.patch` (kernel 6.6.1):
```
tmpfs /mnt/live tmpfs rw,relatime,mode=755,inode64 0 0
:::
inode64 option may be related.
I will dive into tmpfs. It will take some moment. hold on plz.
J. R. Okajima
|
"J. R. Okajima":
fulalas:
> Without `tmpfs-idr.patch` (kernel 6.6.1):
> ```
> tmpfs /mnt/live tmpfs rw,relatime,mode=755,inode64 0 0
:::
inode64 option may be related.
I will dive into tmpfs. It will take some moment. hold on plz.
Unfortunately (or fortunately for me), I got busy.
This tmpfs-idr.patch issue is on my todo list, but the priority is down.
For a while, use aufs without tmpfs-idr.patch please.
J. R. Okajima
|
Hahaha! No rush! :) |
***@***.***
This tmpfs-idr.patch issue is on my todo list, but the priority is down.
For a while, use aufs without tmpfs-idr.patch please.
I'm still continuing the investigation intermittently, and I could not
reproduce the problem on my 6.6 kernel.
If I send you some debug print patch, would try it and send back the
kernel log?
J. R. Okajima
|
Sure! :) |
fulalas:
I can confirm this issue. It seems the system fails to create /union for AUFS.
Thanx for the info.
But I am going slightly confusing.
Currently we have two issues.
Issue #31 from fulalas, Version 6.6: Kernel panic - not syncing: Can't
create rootfs
Issue #32 from peabee, kernel 6.6.4 gives kernel panic
They MAYBE rooted on the same problem, or at least related, or nothing
related at all. I'm not sure.
I'll try one by one.
At first, here is a debug patch for you fulalas. The base version is
linux-v6.6. Please apply, build, boot, and report the kernel log. If
'pr_err' doesn't show the message, then try replacing by pr_crit,
pr_alert, or pr_emerg. It depends on your log level setting.
Note that this is a FIRST debug print patch to find the cause and never
fix the problem. Such debug-print patch MAY continue a few times.
Thanx in advance.
J. R. Okajima
a.patch
diff --git a/fs/fs_context.c b/fs/fs_context.c
index 98589aae5208..e1c7a4da542e 100644
--- a/fs/fs_context.c
+++ b/fs/fs_context.c
@@ -186,6 +186,7 @@ int vfs_parse_fs_string(struct fs_context *fc, const char *key,
}
ret = vfs_parse_fs_param(fc, ¶m);
+ pr_err("vfs_parse_fs_param() %d\n", ret);
kfree(param.string);
return ret;
}
@@ -316,6 +317,7 @@ static struct fs_context *alloc_fs_context(struct file_system_type *fs_type,
init_fs_context = legacy_init_fs_context;
ret = init_fs_context(fc);
+ pr_err("init_fs_context() %d\n", ret);
if (ret < 0)
goto err_fc;
fc->need_free = true;
@@ -716,6 +718,7 @@ int parse_monolithic_mount_data(struct fs_context *fc, void *data)
if (!monolithic_mount_data)
monolithic_mount_data = generic_parse_monolithic;
+ pr_err("monolithic_mount_data -> %pf\n", monolithic_mount_data);
return monolithic_mount_data(fc, data);
}
diff --git a/fs/namespace.c b/fs/namespace.c
index 1f68adec5b74..f106c7974177 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1138,18 +1138,23 @@ struct vfsmount *vfs_kern_mount(struct file_system_type *type,
return ERR_PTR(-EINVAL);
fc = fs_context_for_mount(type, flags);
- if (IS_ERR(fc))
+ if (IS_ERR(fc)) {
+ pr_err("fs_context_for_mount() %lu\n", PTR_ERR(fc));
return ERR_CAST(fc);
-
+ }
if (name)
ret = vfs_parse_fs_string(fc, "source",
name, strlen(name));
if (!ret)
ret = parse_monolithic_mount_data(fc, data);
+ else
+ pr_err("vfs_parse_fs_string() %d\n", ret);
if (!ret)
mnt = fc_mount(fc);
- else
+ else {
+ pr_err("parse_monolithic_mount_data() %d\n", ret);
mnt = ERR_PTR(ret);
+ }
put_fs_context(fc);
return mnt;
@@ -4691,8 +4696,10 @@ static void __init init_mount_tree(void)
struct path root;
mnt = vfs_kern_mount(&rootfs_fs_type, 0, "rootfs", NULL);
- if (IS_ERR(mnt))
+ if (IS_ERR(mnt)) {
+ pr_err("vfs_kern_mount() %lu\n", PTR_ERR(mnt));
panic("Can't create rootfs");
+ }
ns = alloc_mnt_ns(&init_user_ns, false);
if (IS_ERR(ns))
diff --git a/init/do_mounts.c b/init/do_mounts.c
index 5dfd30b13f48..64dec6d01115 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -496,9 +496,11 @@ void __init prepare_namespace(void)
static bool is_tmpfs;
static int rootfs_init_fs_context(struct fs_context *fc)
{
- if (IS_ENABLED(CONFIG_TMPFS) && is_tmpfs)
+ if (IS_ENABLED(CONFIG_TMPFS) && is_tmpfs) {
+pr_err("here\n");
return shmem_init_fs_context(fc);
-
+ }
+pr_err("there\n");
return ramfs_init_fs_context(fc);
}
|
I'm not sure if this is related to aufs, but I'm failing to boot on PorteuX 0.7 and Porteus 5.01 with the new kernel 6.6 + aufs 6.6 branch:
kernel panic - not syncing: Can't create rootfs
The text was updated successfully, but these errors were encountered: