OpenSUSE 12.1 trying to mount wrong filesystem type

Hi all,

Around 9 months ago I updated my 11.2 install to 12.1 and my computer no longer booted.
It turns out that it was trying to mount my boot partition as XFS, when in fact it’s an EXT2. It would quit to console, and if I exited straight away it would cause a panic. Using the following:


$ mount -t ext2 -o rw,acl,user_xattr /dev/sda1 /root

…and then exiting made it boot as normal. Seeing as this is meant to be a headless server, though, its a pain in the proverbial.
However, since it’s always-on, I didn’t mind typing that in on boot and leaving it for months.

Now, its a little unstable, keeps rebooting at odd times (perhaps twice a week) and I don’t know why - I haven’t found anything in the logs, so I’m guessing this little Atom D510MO is dying. This is not a mission-critical box and I’m renewing the servers now anyway so I’m not too fussed about solving that problem - but it would be a lot more convenient if, on reboot, it didn’t wait for me to manually mount the drive.

/var/log/messages doesn’t seem to have anything pertinent - grep for “mount” gives recursions like:

Oct 28 19:53:07 dvl-server kernel:     3.280162] XFS (sda1): unknown mount option [acl].
Oct 28 19:53:07 dvl-server kernel:    43.494329] EXT4-fs (sda1): mounting ext2 file system using the ext4 subsystem
Oct 28 19:53:07 dvl-server kernel:    43.779291] EXT4-fs (sda1): warning: mounting unchecked fs, running e2fsck is recomm                      ended
Oct 28 19:53:07 dvl-server kernel:    43.779869] EXT4-fs (sda1): mounted filesystem without journal. Opts: acl,user_xattr
Oct 28 19:53:07 dvl-server kernel:    45.579399] EXT4-fs (sda1): re-mounted. Opts: acl,user_xattr
Oct 28 19:53:07 dvl-server kernel:    54.746026] EXT4-fs (sda1): re-mounted. Opts: acl,user_xattr
Oct 28 19:53:07 dvl-server kernel:    59.250570] XFS (sda2): Ending clean mount
Oct 28 19:53:07 dvl-server kernel:    59.886638] XFS (sda3): Ending clean mount

/dev/disk/by-id/ata-ST9320423AS_5VH3CYYP-part4 swap                 swap       defaults              0 0
/dev/disk/by-id/ata-ST9320423AS_5VH3CYYP-part1 /                    ext2       acl,user_xattr        1 1
/dev/disk/by-id/ata-ST9320423AS_5VH3CYYP-part2 /home                xfs       defaults              1 2
/dev/disk/by-id/ata-ST9320423AS_5VH3CYYP-part3 /boot_storage        xfs       defaults              1 3
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs      noauto                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0

So - where is it getting the idea to try and mount /dev/sda1 (/dev/disk/by-id/ata-ST9320423AS_5VH3CYYP-part1) as XFS into /root - and how can I change this?

Cheers

Let’s have a look at the partition types reported

fdisk -l

Did you try to re-create initrd after successfully booting with root mounted as ext2?

Its the only drive I’ve left on the machine - boot is ext2, there’s a swap and 2x XFS.


Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0007e971


   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    31455269    15726611   83  Linux
/dev/sda2        31455270   241167779   104856255   83  Linux
/dev/sda3       241168384   604170239   181500928   83  Linux
/dev/sda4       604170240   625141759    10485760   82  Linux swap / Solaris



Nope - just left it be. Would the config to mount as XFS be in the initrd image itself? If so, how would I go about modifying it?

On 2012-10-28 11:36, Transient wrote:
>
> Nope - just left it be. Would the config to mount as XFS be in the
> initrd image itself?

Yes.

> If so, how would I go about modifying it?

Part of fstab is copied there when you run mkinitrd. Check that fstab is correct, then run it.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

root is normally mounted from within initrd.

If so, how would I go about modifying it?

Just recreate it using mkinitrd, it should put your actual root device there.

Sweet! After mkinitrd, boots perfectly. I’d always thought initrd was a static part of the distro…

Thanks all

No, it is created on the fly and tailored for each system.