Ext3 as root filesystem?
Andy Green
fedora at warmcat.com
Sat Dec 6 15:18:25 UTC 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday 06 December 2003 14:57, Leonard den Ottolander wrote:
> These kind of actions are (usually) unnecessary and should be avoided
> unless you have a specific reason to do so. Ext3 is the file system of
> choice on Red Hat and Fedora, so things are set up to "just work".
Its clear you're right.
> Are you using a standard Red Hat kernel? Then both the initrd and the
> module layout should work as is. If you compiled your own all you should
> have to do is a mkinitrd. Path layout should be usable as well.
Yes, it is 2.4.22-1.2129.nptl. The kernel is taken straight from the binary
kernel RPM... I install it into the root filesystem and then copy it and some
modules over into the initrd filesystem.
This is my linuxrc modified from the Fedora one:
#!/bin/nash
echo
echo Mounting /proc filesystem
mount -t proc /proc /proc
echo Loading nbd.$KERNMODULESUFFIX module
insmod
/lib/modules/$KERNELVERSION/unsupported/drivers/block/nbd.$KERNMODULESUFFIX
echo Loading mii networking module" >> $RHINITMOUNT/linuxrc
insmod /lib/modules/$KERNELVERSION/kernel/drivers/net/mii.$KERNMODULESUFFIX
echo Loading via-rhine networking module
insmod
/lib/modules/$KERNELVERSION/kernel/drivers/net/via-rhine.$KERNMODULESUFFIX
echo Loading ext3 modules
insmod /lib/modules/$KERNELVERSION/kernel/fs/jbd.$KERNMODULESUFFIX
insmod /lib/modules/$KERNELVERSION/kernel/fs/ext3.$KERNMODULESUFFIX
echo getting network settings from DHCP
/bin/dhcpcd -t 5 -h tinycat eth0
echo Looking for nbd server on $4:$5
/bin/nbd-client $4 $5 /dev/nd0
echo 0x2b00 > /proc/sys/kernel/real-root-dev
echo End of linuxrc
> > EXT2-fs warning (device nbd(43,0)): ext2_read_super: mounting ext3
> > filesystem as ext2
>
> Are you sure you actually transformed the file system from ext2 to ext3
> (tune2fs -j -c 0 -i 0 /dev/<partition>)? What does tune2fs -l
> /dev/<partition> show you?
I used mkfs.ext3 to creat the filesystem, so I did not perform this
transformation action. I am able to mount the resulting filesystem as ext3
via loopback on my laptop, for example.
tune2fs 1.34 (25-Jul-2003)
Filesystem volume name: <none>
Last mounted on: <not available>
Filesystem UUID: 1c6a4d57-c00d-4635-bb41-d7f0b0a2bfbd
Filesystem magic number: 0xEF53
Filesystem revision #: 1 (dynamic)
Filesystem features: has_journal filetype sparse_super
Default mount options: (none)
Filesystem state: clean
Errors behavior: Continue
Filesystem OS type: Linux
Inode count: 87720
Block count: 350000
Reserved block count: 0
Free blocks: 123263
Free inodes: 57972
First block: 1
Block size: 1024
Fragment size: 1024
Blocks per group: 8192
Fragments per group: 8192
Inodes per group: 2040
Inode blocks per group: 255
Filesystem created: Sat Dec 6 14:35:44 2003
Last mount time: Sat Dec 6 15:02:32 2003
Last write time: Sat Dec 6 15:02:35 2003
Mount count: 1
Maximum mount count: 31
Last checked: Sat Dec 6 15:02:32 2003
Check interval: 15552000 (6 months)
Next check after: Thu Jun 3 16:02:32 2004
Reserved blocks uid: 0 (user root)
Reserved blocks gid: 0 (group root)
First inode: 11
Inode size: 128
Journal inode: 8
Default directory hash: tea
Directory Hash Seed: 11b6998a-a3d6-46f9-8da3-e54fc35c7438
> The mount command itself, so the fact that the file system is described as
> ext3 in /etc/fstab.
Having the following generated into /etc/fstab (on both the initrd and root
filesystems, just in case):
/dev/nd0 / ext3 defaults
none /dev/pts devpts gid=5,mode=620 0 0
gets me the following from the /etc/rc.sysinit
Setting hostname localhost: [OK}
Checking root filesystem
/dev/nd0 is mounted. e2fsck: Cannot continue, aborting.
[FAILED]
then it drops to a repair shell.
> I am sorry I have to agree with you on this ;-) . Ext3 should "just work".
No doubt there is some stupid thing I am doing... as usual I am operating at
or beyond what I know how to do :-) its the only way to learn new things...
but even so this is being quite painful...
- -Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/0fNCjKeDCxMJCTIRAo4GAJ0bgjgcXzgHn7jK1wKFx37hjvsi9ACeJ7iP
QCTP5BN7a0FV+WXLC5iVP1A=
=dGik
-----END PGP SIGNATURE-----
More information about the users
mailing list