Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Partition can't be mounted at boot but can be mounted by....
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Bluey_the_dog
n00b
n00b


Joined: 13 Oct 2002
Posts: 60
Location: Perth, Australia

PostPosted: Tue Oct 08, 2024 3:01 pm    Post subject: Partition can't be mounted at boot but can be mounted by.... Reply with quote

Dear all,
I'm in the process of building a new machine. The partitions are formatted jfs. I initially installed the latest gentoo-kernel-bin, I set up fstab and a whole lot of other stuff, rebooted the machine and all was good. All the partitions mounted etc.

I personally don't like initramfs so installed the latest source kernel, dropped the .config from the -bin kernel into the source kernel dir and went through converting from modules to builtin. After the drudgery of doing this, I recompiled, took the bzImage, dropped it into my /efi dir and rebooted. Refind sees the kernel and I can select it and it boots. Now though, during the boot, /home is no longer mounted, an error is thrown. The boot completes but the contents of /home are not there. The error is, and it's the same as to whether it be via booting or as root and issuing a mount command:

Code:
bluey_new /mnt # mount -tjfs /dev/nvme1n1p4 /home
mount: /home: wrong fs type, bad option, bad superblock on /dev/nvme1n1p4, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.


It does not matter if I include -tjfs or -t jfs or not at all, the error is the same.

Now the really frustrating thing is that the root partition is ALSO jfs and it boots fine. I'm sitting here ssh'd into the new machine from my old, pulling example code/errors etc off the new for this post.

To the best of my knowledge, the partition isn't broken. I have also booted the new machine with two live sticks, sysrescuecd & the gentoo live stick I originally built the machine from and I can manually mount the /home partition to something under /mnt. As the partition is empty, I have also deleted the partition and recreated via the sysrescuecd stick, still the problem persists.

It took a few shutdowns/reboots before I noticed this problem and during this time, I deleted the -bin kernel. In frustration, after going through the kernel config thingy many times looking for error's, I've reinstalled the -bin kernel, rebooted and /home is now there. I know it is the /home partition and not the /home from the root partition as I touched a file, fred.txt, into the root of /home when I had it mounted via sysrescuecd and I can see it. I have not changed fstab, I can reboot, boot the source kernel - no /home. Reboot, select -bin and /home is there. Rinse and repeat.

The error says to look in dmesg for possible causes - I've looked and there is nothing. On the other hand, looking back through dmesg, I did see that ntfs3 has tried to mount the root partition:

Code:
[    4.323070] md: Autodetecting RAID arrays.
[    4.323355] md: autorun ...
[    4.323623] md: ... autorun DONE.
[    4.332969] ntfs3: nvme1n1p3: Primary boot signature is not NTFS.
[    4.333252] ntfs3: nvme1n1p3: try to read out of volume at offset 0x617ffffe00
[    4.334359] VFS: Mounted root (jfs filesystem) readonly on device 259:4.
[    4.334861] devtmpfs: mounted


ntfs3 is there because this machine will become dual boot, Win10 on one stick, Gentoo on another and I want to be able to access stuff on the Win10 drive from Gentoo but at the moment, the Win10 stick does not get a mention at all in fstab so as to why ntfs3 is trying to mount stuff I have no idea. I've just noticed the RAID stuff - I don't have any RAID stuff set up.

If any one has any thoughts as to why the kernel would mount one instance of jfs and then not the second, those ideas would be greatly appreciated. I think my next steps will be getting rid of the RAID stuff, trying to work out why ntfs3 is trying to mount stuff and then finally might reformat the /home partition as ext4 and see if the problem persists.

Thanks for any thoughts,
Andrew


Code:
PARTUUID=aaaa   /efi          vfat        umask=0077      0 2
PARTUUID=bbbb   /             jfs         noatime         0 1
PARTUUID=cccc   none          swap        sw              0 0
PARTUUID=dddd   /home         jfs         noatime         0 2
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1159
Location: Richmond Hill, Canada

PostPosted: Tue Oct 08, 2024 3:46 pm    Post subject: Reply with quote

Bluey_the_dog,

Can you share output of
Code:
lsblk -f -o+partuuid
So we can better understand your system's storage condition.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1860

PostPosted: Tue Oct 08, 2024 3:59 pm    Post subject: Reply with quote

Bluey_the_dog wrote:
trying to work out why ntfs3 is trying to mount stuff

Unless rootfstype= (in this case jfs) is specified on the kernel command-line, the kernel will guess at the type and try, possibly all, different types of known filesystems until it succeeds or gives up.
Back to top
View user's profile Send private message
Bluey_the_dog
n00b
n00b


Joined: 13 Oct 2002
Posts: 60
Location: Perth, Australia

PostPosted: Tue Oct 08, 2024 4:21 pm    Post subject: Reply with quote

pingtoo,
Please see the following:
Code:

bluey_new / # lsblk -f -o+partuuid
NAME        FSTYPE  FSVER            LABEL                 UUID                                 FSAVAIL FSUSE% MOUNTPOINTS PARTUUID
sda                                                                                                                       
└─sda1      vfat    FAT32            RESCUE1001            6AF3-C562                                                       000ed0e8-01
sdb                                                                                                                       
└─sdb1      iso9660 Joliet Extension Gentoo-amd64-20240929 2024-09-29-18-06-10-00                                         
nvme1n1                                                                                                                   
├─nvme1n1p1 vfat    FAT32                                  7691-7F8C                             908.1M    11% /efi        6e441ee8-0a94-bf4d-b0cb-1a46da42b8cf
├─nvme1n1p2 swap    1                                      d4c79af4-b3fb-434d-afcb-857fd3cbbd72                [SWAP]      2049128f-235c-7e43-bf88-06053bc84391
├─nvme1n1p3 jfs                                            2231353c-3e31-4f5d-a581-a6a67869f3c8  346.6G    11% /           cd935bd1-b2a6-46cf-b41b-e2c09eb1e3f0
└─nvme1n1p4 jfs                                            499e792d-1849-496e-bca7-97f11e424998                            c3854b72-8b7a-4981-acd8-ad0fd7bbb500
nvme0n1                                                                                                                   
├─nvme0n1p1 vfat    FAT32                                  8C91-93D1                                                       f4803482-31f0-4e3e-83f6-359e2d62c768
├─nvme0n1p2                                                                                                                81644e2b-6c39-47c7-b624-fc525894f54f
├─nvme0n1p3                                                                                                                9ea5c7aa-0145-4920-98c3-db9ea5b8a22b
├─nvme0n1p4 ntfs                                           20B4AB7BB4AB51D8                                                65b2ef03-c30f-4f64-b734-ae5ec0b1a0f2
└─nvme0n1p5 ntfs                                           6C324175324144F4                                                51657c0d-b98e-4171-90b2-89e4ad7e788b


It's pretty bog standard. Probably the only "whacky" thing is the use of jfs. You can see the Win10 stick there as well, but as I mentioned above, this does not appear in fstab.
Back to top
View user's profile Send private message
Bluey_the_dog
n00b
n00b


Joined: 13 Oct 2002
Posts: 60
Location: Perth, Australia

PostPosted: Tue Oct 08, 2024 4:46 pm    Post subject: Reply with quote

grknight
I've placed rootfstype=jfs in the kernel command line, via refind, and hey presto, that error has now disappeared. This tip probably also explains why my older machine, also both partitions jfs, would have:

Older machine dmesg
Code:

[    3.546403] exFAT-fs (nvme0n1p3): invalid boot record signature
[    3.546743] exFAT-fs (nvme0n1p3): failed to read boot sector
[    3.547017] exFAT-fs (nvme0n1p3): failed to recognize exfat type


in basically the same posi within dmesg. I will have to add the same line to it when I'm finished later tonight and see how it goes.

Unfortunately the main problem persists.

Thanks,
Andrew
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1159
Location: Richmond Hill, Canada

PostPosted: Tue Oct 08, 2024 6:03 pm    Post subject: Reply with quote

Bluey_the_dog,

Have you try with just mount without type? i.e.
Code:
mount /dev/nvme1n1p4 /home


And if failed again, what error message you got? And if anything related to /dev/nvme1n1p4 show in dmesg?

Also have you try with fsck?
Code:
fsck -p /dev/nvme1n1p4
(please check dmesg also if fsck also failed)
Back to top
View user's profile Send private message
Bluey_the_dog
n00b
n00b


Joined: 13 Oct 2002
Posts: 60
Location: Perth, Australia

PostPosted: Tue Oct 08, 2024 6:41 pm    Post subject: Reply with quote

Pingtoo,
With respect to the mount command, as I mentioned in the original post, I've tried all three and they give the same result - refer above for the error message.

For fsck:
Code:

bluey_new / # fsck -p /dev/nvme1n1p4
fsck from util-linux 2.40.2
fsck.jfs version 1.1.15, 04-Mar-2011
processing started: 10/9/2024 2:21:29
The current device is:  /dev/nvme1n1p4
Block size in bytes:  4096
Filesystem size in blocks:  133827584
**Phase 0 - Replay Journal Log
Filesystem is clean.
bluey_new / #


fsck was the first thing I though of when I spotted the error. As the partition had not mounted, I ran it from the install. I then ran it from the above mentioned live sticks. I then ran it again after I had deleted and recreated the partition. Every time I would get the same result, a clean filesystem.
Back to top
View user's profile Send private message
Goverp
Advocate
Advocate


Joined: 07 Mar 2007
Posts: 2134

PostPosted: Tue Oct 08, 2024 6:53 pm    Post subject: Reply with quote

Bluey_the_dog wrote:
Dear all,
I'm in the process of building a new machine. The partitions are formatted jfs. ...

Interesting choice. Sadly, AFAIK, JFS is virtually unmaintained these days. There were discussions last year of starting to deprecate it in the Linux kernel. Nothing actually wrong with it as a filesystem, and with the benefit of being decidedly leaner and healthier than some full-fat filesystems, but it never gained much usage outside of its original IBM AIX and OS/2 birthplace.

My mainstream choice would be ext4, or if using SSD/NVMe consider f2fs (niche within pure Linux, but AFAIK heavily used in Android's version of Linux). You'll also see recommendations for XFS and other more sophisticated (a.k.a. more complicated) filesystems.
_________________
Greybeard
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1159
Location: Richmond Hill, Canada

PostPosted: Tue Oct 08, 2024 6:56 pm    Post subject: Reply with quote

So can you test mount right after fsck?

please test mount with strace and share the output.

if you don't have strace installed, please try emerge -1a dev-debug/strace

Code:
strace -f -o /tmp/mount-jfs
Back to top
View user's profile Send private message
jburns
Veteran
Veteran


Joined: 18 Jan 2007
Posts: 1217
Location: Massachusetts USA

PostPosted: Tue Oct 08, 2024 7:11 pm    Post subject: Reply with quote

The kernel can mount the root partition because it has the code for mounting it. But it only mounts the root partition.
The gentoo-kernel-bin has an initramfs that contains mount that supports mounting with jfs by the initramfs.
A kernel without an initramfs only mounts the root partition, the other partitions must be mounted by the OS's init process. This needs sys-fs/jfsutils to be installed.
Back to top
View user's profile Send private message
Bluey_the_dog
n00b
n00b


Joined: 13 Oct 2002
Posts: 60
Location: Perth, Australia

PostPosted: Tue Oct 08, 2024 7:43 pm    Post subject: Reply with quote

jburns
jsfutils has been installed on the machine for 6 months ie this machine has not been a top priority...

Code:

bluey_new / # eix jfsutils
[I] sys-fs/jfsutils
     Available versions:  1.1.15-r2 {static}
     Installed versions:  1.1.15-r2(18:50:49 04/26/24)(-static)
     Homepage:            http://jfs.sourceforge.net/
     Description:         IBM's Journaling Filesystem (JFS) Utilities
bluey_new / #
bluey_new / # whereis jfs_mkfs
jfs_mkfs: /usr/bin/jfs_mkfs /usr/share/man/man8/jfs_mkfs.8.bz2
bluey_new / # cd /usr/bin
bluey_new /usr/bin # ls jfs*
jfs_debugfs  jfs_fsck  jfs_fscklog  jfs_logdump  jfs_mkfs  jfs_tune
bluey_new /usr/bin #


I just checked something on my older machine, one that has been running jfs for years and the utils are in /sbin. I know there was a change a while ago with respects to different bins. Could this be the cause?
Back to top
View user's profile Send private message
Bluey_the_dog
n00b
n00b


Joined: 13 Oct 2002
Posts: 60
Location: Perth, Australia

PostPosted: Tue Oct 08, 2024 8:02 pm    Post subject: Reply with quote

People,
Thank you for your help and suggestions, especially grknight with the tip to kill off the error in dmesg, but in my googling to try and find a solution, I've come across a few things[1] that make me thing it's time to move on. I've been using jfs for probably at least 17 years, I was doing an Engineering Masters/PhD at the time and it had benefits for the amount of data I had, but the last comment in the linked bug makes me a bit wary.

So once again, thanks

Andrew

p.s. If someone does know what the problem, please let me know, it would add "closure" :)


[1] https://bugs.gentoo.org/863905
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum