* How to change the root filesystem
@ 2001-07-24 5:55 新 月
2001-07-24 7:58 ` Daniel Quinlan
2001-07-25 6:32 ` michael chen
0 siblings, 2 replies; 3+ messages in thread
From: 新 月 @ 2001-07-24 5:55 UTC (permalink / raw)
To: linux-kernel
Hi:
I want change the root filesystem from ext2 to
cramfs,I read the init code about the filesystem.But I
cannot understand how to make a device that is used as
cramfs device.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to change the root filesystem
2001-07-24 5:55 How to change the root filesystem 新 月
@ 2001-07-24 7:58 ` Daniel Quinlan
2001-07-25 6:32 ` michael chen
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Quinlan @ 2001-07-24 7:58 UTC (permalink / raw)
To: linux-kernel; +Cc: xinyuepeng
xinyuepeng@yahoo.com writes:
> I want change the root filesystem from ext2 to cramfs, I read the
> init code about the filesystem. But I cannot understand how to make
> a device that is used as cramfs device.
(I asked: "desktop system?" Reply: "No! embedded system!" So, here's
the answer.)
cramfs should work out of the box as the root filesystem. I'm not
sure what you mean by "make a device". cramfs is meant to be used on
a block device like ext2 such as /dev/hda1.
If you want to include the kernel on the root filesystem, it's a bit
more complicated.
Option 1
- use Midori Linux: http://midori.transmeta.com/
Option 2
You need a few things:
- linux 2.4.7 kernel
- mkcramfs version from linux 2.4.7
- cramfsboot (part of Midori Linux) which is located here:
http://midori.transmeta.com/pub/midori-1.0.0-beta2/apps/
(includes an MBR, the cramfs secondary loader, set_boot, and
make_active)
Run mkcramfs with a command line of something like:
mkcramfs -E -p -i bzImage -z root root.img.cram
where bzImage is the kernel, root is the directory to cram, and
root.img.cram is the output. Actually, it's worse than that because
cramfsboot wants the kernel to start 1024 bytes from the beginning of
the partition.
dd if=/dev/zero of=bzImage.padded bs=436c count=1
cat bzImage >> bzImage.padded
mkcramfs -E -p -i bzImage.padded -z root roott.img.cram
cp cramfsboot.bin root1.img.cram # from cramfsboot
tail +513c roott.img.cram >> root1.img.cram
cramfsck root1.img.cram
set_boot root1.img.cram 1
rm roott.img.cram
Then root1.img.cram can be put on the first partition of say a Compact
Flash or other IDE device. You will need to use the MBR that's
included with cramfsboot and don't forget to set the active flag (the
cramfsboot MBR uses it).
This code is a much-simplified version of what's in the Midori Linux
"mlbuild" package. (I haven't tried the simplified version, so if you
need more help, please refer to the mlbuild package, same location as
the cramfsboot package.)
It sounds like you're just getting started on your embedded system,
though, so I'd strongly recommend looking at what's out there. Midori
Linux makes heavy use of cramfs, but a bunch of the other offerings
also use cramfs.
- Dan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to change the root filesystem
2001-07-24 5:55 How to change the root filesystem 新 月
2001-07-24 7:58 ` Daniel Quinlan
@ 2001-07-25 6:32 ` michael chen
1 sibling, 0 replies; 3+ messages in thread
From: michael chen @ 2001-07-25 6:32 UTC (permalink / raw)
To: ÐÂ ÔÂ; +Cc: linux-kernel
Hello ÐÂ,
Tuesday, July 24, 2001, 1:55:30 PM, you wrote:
ÐÔ> Hi:
ÐÔ> I want change the root filesystem from ext2 to
ÐÔ> cramfs,I read the init code about the filesystem.But I
ÐÔ> cannot understand how to make a device that is used as
ÐÔ> cramfs device.
ÐÔ> -
ÐÔ> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
ÐÔ> the body of a message to majordomo@vger.kernel.org
ÐÔ> More majordomo info at http://vger.kernel.org/majordomo-info.html
ÐÔ> Please read the FAQ at http://www.tux.org/lkml/
Pls download the relative tools for cramfs at
http://cvs.bofh.asn.au/cramfs
--
Best regards,
michael mailto:michaelc@turbolinux.com.cn
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-07-24 7:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-24 5:55 How to change the root filesystem 新 月
2001-07-24 7:58 ` Daniel Quinlan
2001-07-25 6:32 ` michael chen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.