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

From: Paul M Foster (paulf@quillandmouse.com)
Date: Sun Mar 30 2008 - 21:54:32 EST


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.

I really think it's that simple. If someone else knows more than I do
about this, please speak up.

Paul

-- 
Paul M. Foster
-----------------------------------------------------------------------
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:30:48 EDT