Switched boot partition from ext3 to ext4 and can no longer boot

I did something I knew might be risky but figured there would be a way to make it work. My boot partition was ext3 from an earlier installation of openSUSE. When I upgraded to 12.2, it migrated my /home partition to ext4 but not /boot. So I figured I’d use Knoppix to do the conversion knowing that grub would likely complain, and it does. In looking at the various grub files I cannot find one that calls out the filesystem. When I attempt to boot, it shows it mounting the root partition using a mount -t ext3 command and then it fails back to a shell prompt. Where can I change the fs from ext3 to ext4?

Should be in /etc/fstab file. But there may be other places also.

Root filesystem type is store in initrd; you could try to add “rootfstype=ext4” to kernel command line, but I am not sure whether initrd respects it. You will need to boot in rescue mode and recreate initrd. Similar to:


mkdir /tmp/sysroot
mount /dev/your-soot-partition /tmp/sysroot
vi /tmp/sysroot/etc/fstab => fix filesystem types you changed
mount /dev/your-boot-partitio /tmp/sysroot
mount /dev/your-usr-partition /tmp/sysroot (assuming you have one)
mount --bind /dev /tmp/sysroot/dev
mount --bind /sys /tmp/sysroot/sys
mount --bind /proc /tmp/sysroot/proc
chroot /tmp/sysroot
mkinitrd

When you have a seperate /boot partition (that is what this is about when I understand correctly), I see no need at all to prefer ext4 instead of leaving it at ext3 (or even ext2).

Maybe it is easier to convert back to ext3 (shouldn’t be to difficult, read the man page) then to try to find out where Grub may find the indication stored (like Grub2 configuration files, initrd and what all).

On 2012-11-24 02:46, DiskCrasher wrote:
>
> I did something I knew might be risky but figured there would be a way
> to make it work. My boot partition was ext3 from an earlier installation
> of openSUSE. When I upgraded to 12.2, it migrated my /home partition to
> ext4 but not /boot. So I figured I’d use Knoppix to do the conversion

Why did you do that? If you really mean a separate /boot partition, it
should be small (250 MB) and type ext2 (that’s a two).

> knowing that grub would likely complain, and it does. In looking at the
> various grub files I cannot find one that calls out the filesystem. When
> I attempt to boot, it shows it mounting the root partition using a mount
> -t ext3 command and then it fails back to a shell prompt. Where can I
> change the fs from ext3 to ext4?

Do you mean the /boot partition or the root (/) partition? Please clarify.


Cheers / Saludos,

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

On 2012-11-24 10:56, hcvv wrote:
>
> When you have a seperate /boot partition (that is what this is about
> when I understand correctly), I see no need at all to prefer ext4
> instead of leaving it at ext3 (or even ext2).
>
> Maybe it is easier to convert back to ext3 (shouldn’t be to difficult,
> read the man page) then to try to find out where Grub may find the
> indication stored (like Grub2 configuration files, initrd and what all).

Right. And what is in fstab or initrd would have no influence, but
instead, if the stages of grub were stored in that filesystem they would
be destroyed and then grub needs to be reinstalled.

We have no indication of what is the error message he gets on a failed
boot…


Cheers / Saludos,

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

More info: it’s technically my root partition, and also contains the boot directory. I’ve already tried changing fstab with no success. The error pops up immediately after selecting openSUSE desktop in the GRUB splash screen. It’s rather verbose, but essentially says that it’s attempting to mount the root partition using “-t ext3” in the mount command. Mount then reports that it’s the “wrong fs type” and drops to a “$” prompt (where I can’t even type anything).

If I can just figure out where the mount command line is coming from (file) I can probably change it to ext4 and be good to go (hopefully).

Please do not say boot partition (which is a partition mounted on /boot) when you simply meam the root partotion (which is the partition mounted on /). You put us all on the wrong leg :frowning:

On 2012-11-24 21:46, hcvv wrote:
>
> Please do not say boot partition (which is a partition mounted on /boot)
> when you simply meam the root partotion (which is the partition mounted
> on /). You put us all on the wrong leg :frowning:

Indeed :frowning:


Cheers / Saludos,

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

On 2012-11-24 21:26, DiskCrasher wrote:
>
> More info: it’s technically my root partition, and also contains the
> boot directory.

It is the root partition in all respects.

> I’ve already tried changing fstab with no success. The
> error pops up immediately after selecting openSUSE desktop in the GRUB
> splash screen. It’s rather verbose, but essentially says that it’s
> attempting to mount the root partition using “-t ext3” in the mount
> command. Mount then reports that it’s the “wrong fs type” and drops to a
> “$” prompt (where I can’t even type anything).

Then you have to properly rebuild the initrd as arvidjaar already explained.


Cheers / Saludos,

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

It worked! I was able to specify “rootfstype=ext4” during boot to avoid the error. I then edited the fstab file, ran mkinitrd, and rebooted. All good. It’s too bad the openSUSE installer doesn’t allow this option during an upgrade.

On 2012-11-27 02:46, DiskCrasher wrote:
> It worked! I was able to specify “rootfstype=ext4” during boot to avoid
> the error. I then edited the fstab file, ran mkinitrd, and rebooted. All
> good. It’s too bad the openSUSE installer doesn’t allow this option
> during an upgrade.

The upgrade can not cater for all possibilities. It is you who must
know, as the admin of a complex system, what you must do. >:-)


Cheers / Saludos,

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

Uh huh. That’s one way to look at it. User friendliness is another way. It happily converted my /home partition for me. I had to come here to figure out the other half.

To quote your original post:

So I figured I’d use Knoppix to do the conversion

So how is this problem related to openSUSE installer?

I never said it was a problem with the installer. I said it’d be nice if the installer had handled it for me instead of leaving it as an ext3 partition with no option to upgrade (because, obviously, that option DOES exist).

I know it is all very complex and all that. But upgrading an Operating System to it’s next version (and that is what is offered by that menu entry on the DVD, but imho it is the same for upgrading using the “change repos and do zypper dup” method) is just that: it upgrades the OS to it’s next level. Changing your file systems to another type, completely redesigning your partitioning, and all other system reorganisation is not included in the wording “upgrading the OS to the next level”.

Those are major system management tasks which should be planned and maybe even executed seperately. Using the "reinstall, but keep current data partitions (inclusing /home) and reusing user/group administration (as offered by the installer) makes combining these things much easier. But the consequences of each of the wanted changes should nevertheless be contemplated first.

Again, I know it is complex, language is difficult and not very exact, thus when one guy uses the word “upgrade”, another girl or guy can have a complete different picture (or even movie) in her/his mind then.

On 2012-11-27 03:26, DiskCrasher wrote:
>
> robin_listas;2506813 Wrote:
>> The upgrade can not cater for all possibilities. It is you who must
>> know, as the admin of a complex system, what you must do. >:-)
>
> Uh huh. That’s one way to look at it. User friendliness is another way.
> It happily converted my /home partition for me. I had to come here to
> figure out the other half.

It can not be automatic. Either you type something while booting, as you
found out, or recreate initrd after editing fstab.


Cheers / Saludos,

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

It has been some time since I looked into ‘converting’ ext3 to ext4, and things may have changed, but if I recall correctly the ext4 development required some changes that ext3 was unable to use, therefore not being available to when converted from ext3 to ext4. These changes included some of the major advantages of ext4.

But in any case if there is a good reason to do a fresh install over an upgrade, a change of file system has to be among them, I would not ‘convert’ a file system, there are better ways.

OK, I see. So if I understand you correctly, installer offers option to convert /home filesystem, but not / filesystem. Right? If yes, the correct way to proceed is to create feature request: https://features.opensuse.org/

Yep. If it’s going to support conversion of *any *partitions it should be expanded to support *all *of them (at the user’s request). Not that difficult to do, from an installer standpoint.