From: "AlessandroPPC" <aleppcrossi@libero.it>
To: <linuxppc-embedded@lists.linuxppc.org>
Subject: ram root filesystem
Date: Wed, 3 Dec 2003 18:48:44 +0100 [thread overview]
Message-ID: <019501c3b9c5$b339a060$0400a8c0@eurostudio.local> (raw)
Hi to all,
I'm developing a custom application on 8260 based board. I have first used
the ELDK package version 2.0.2 with Kernel 2.4.4
and nfs root filesystem. Now I want migrate my application on the system
using ram fs instead of nfs.
To do this I have generated a ramdisk image derived from ELDK fs eliminating
superfluous packages and using a makefile with
this instructions:
@echo "********************************************"
@echo "create root files system"
@echo "********************************************"
rm -rf $(BUILD)/var/log/tegated
mkdir $(BUILD)/var/log/tegated
rm -rf $(RAMFS)/tmp/
mkdir $(RAMFS)/tmp
dd if=/dev/zero of=$(RAMFS)/ramrootfs bs=1k count=36864
mke2fs -F -m0 $(RAMFS)/ramrootfs
mount -o loop -t ext2 $(RAMFS)/ramrootfs $(RAMFS)/tmp
cp -av $(BUILD)/* $(RAMFS)/tmp
umount $(RAMFS)/tmp
cat $(RAMFS)/ramrootfs | gzip -9 > $(IMGTGZ)
/opt/eldk/usr/bin/mkimage -T ramdisk -C gzip -n "DexGate filesystem
image" -d $(IMGTGZ) $(RAMDSK)
rm -rf $(RAMFS)/tmp/
@echo "********************************************"
@echo "Ramdisk image now in /tftpboot/ramdisk"
@echo "********************************************"
In this way I'm able obtain a valid ramdisk image to download on my board
using ppcboot. giving the commands
bootp 0x2500000 /tftpboot/image
BOOTP broadcast 1
ARP broadcast 1
TFTP from server 10.0.0.4; our IP address is 10.0.0.20
Filename '/tftpboot/image'.
Load address: 0x2500000
Loading: #################################################################
#######################################################
done
Bytes transferred = 610742 (951b6 hex)
fec001> bootp 0x2600000 /tftpboot/ramdisk
BOOTP broadcast 1
ARP broadcast 2
TFTP from server 10.0.0.4; our IP address is 10.0.0.20
Filename '/tftpboot/ramdisk'.
Load address: 0x2600000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
done
Bytes transferred = 11645509 (b1b245 hex)
fec001> setenv bootargs root=/dev/ram rw
fec001> bootm 0x2500000 0x2600000
At this point the system boots and the kernel mounts the ram disk but at
time of rc.sysint script I have this error :
VFS: Mounted root (ext2 filesystem).
Freeing unused kernel memory: 60k init
INIT: version 2.78 booting
Mounting proc filesystem : [ OK ]
Configuring kernel parameters : [ OK ]
Setting clock : Wed Dec 31 19:00:15 EST 1969 [ OK ]
Activating swap partitions : [ OK ]
Setting hostname 10.0.0.20 : [ OK ]
Checking root filesystem
/dev/ram:
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
[/sbin/fsck.ext2 (1) -- /] fsck.ext2 -a /dev/ram
fsck.ext2: Bad magic number in super-block while trying to open /dev/ram
[FAILED]
*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
Give root password for maintenance
(or type Control-D for normal startup):
Notice that if I write rc.sysinit script to skip "Checking root
filesystem" I obtain the prompt but the syslogd deamon fails the startup.
>From ELDK distribution I have changed /etc/fstab file in
/dev/ram / ext2 defaults 0 0
none /proc proc defaults 0 0
and /etc/mtab file in
/dev/ram / ext2 rw 0 0
none /proc proc rw 0 0
Someone can say why fsck is not able to check ram fs and if the syslogd
problem is related to ram fs?
thanks to all,
Regards,
Alessandro.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next reply other threads:[~2003-12-03 17:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-03 17:48 AlessandroPPC [this message]
2003-12-03 18:16 ` ram root filesystem Wolfgang Denk
2003-12-04 10:12 ` Use of several CFI flash chips physically mapped in memory Gérard Guével
2003-12-05 8:36 ` R: ram root filesystem AlessandroPPC
2003-12-04 0:08 ` problem using both mpc857dsl fec and scc1 Dennis Khoo
2003-12-05 11:11 ` Jaap-Jan Boor
2003-12-05 18:53 ` Dennis Khoo
-- strict thread matches above, loose matches on Subject: below --
2003-12-03 17:52 ram root filesystem Steven Blakeslee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='019501c3b9c5$b339a060$0400a8c0@eurostudio.local' \
--to=aleppcrossi@libero.it \
--cc=linuxppc-embedded@lists.linuxppc.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).