Re: [SLUG] Copying and booting linux with a partition with a different filesystem type

From: Eben King (
Date: Sun Mar 30 2008 - 22:25:24 EST

On Sun, 30 Mar 2008, Paul M Foster wrote:

> On Sun, Mar 30, 2008 at 10:33:43PM -0400, Donald E Haselwood wrote:
>> Can linux, e.g. Suse 10.3, copied and booted up on a partition with a
>> different filesystem from the one it was installed on? My experiments
>> suggest that this cannot be done, but maybe there is something I'm
>> overlooking.
>> For example, I have Suse 10.3 installed on a partition with ext3. I copy the
>> whole system to a partition formatted with ext2. I fix fstab and grub. Boot
>> fails early, ending with "Loading ext3"; "Mount: unknown filesystem type
>> ext2"; then," kernel panic...". If I do the same copy/fix-up process to a
>> partition with ext3 it works fine.
>> I also tried it on a machine with Suse 10.2 installed on an ext2 partition
>> and
>> copied to an ext3 partition. Boot fails with "unknown filesystem type ext3"
>> when the filesystem type on the copy is ext3; of course in this case the
>> filesystem types are reversed, i.e. "Loading ext2"; "Mount: unknown
>> filesystem type ext3." And again, it works fine if the partition filesystem
>> type for the copy is the same as the installed type, ext2.
>> This suggests that something in the kernel/initrd images has the filesystem
>> type expected and fails when a different one is encountered. So far, I
>> haven't been able to turn up anything to confirm/refute this on the web.
> Linux shouldn't care what filesystem it boots/runs on (within limits).
> As long as the driver for the file system it boots/runs from is loaded
> into the kernel.
> When you say you "copied" a SuSE installation from one filesystem to
> another, I'm not sure how you mean "copied". Using cp? Using dd? Using
> rsync? Could make a difference.
> An ext3 filesystem is essentially an ext2 filesystem with hidden
> journaling for fault-tolerance. However, there is something somewhere
> which tells the kernel what filesystem you're using. And it appears that
> whatever that is (grub? something in /etc?) is being copied over and
> telling your kernel the wrong filesystem type. I believe the bootloader
> has to know what type of filesystem to load (I don't believe it
> autodetects it), and it loads or tells the kernel to load the proper
> driver for it.

There's either a kernel flag for it supplied by the bootloader, or the
kernel expects / to be mounted when it's invoked, I can't figure out which.
/etc/fstab has an entry for / , but it must be dummy, since by that time /
is already mounted. The kernel needs support for /'s filesystem, either
modular (and in the initrd) or in the kernel. If the module to access / is
on /, you have a nice catch-22.

-eben   QebWenE01R@vTerYizUonI.nOetP

Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats. -- H.L. Mencken ----------------------------------------------------------------------- This list is provided as an unmoderated internet service by Networked Knowledge Systems (NKS). Views and opinions expressed in messages posted are those of the author and do not necessarily reflect the official policy or position of NKS or any of its employees.

This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 15:31:27 EDT