Altera_Forum
Honored Contributor
16 years agoinitramfs problem: can't replace motd
Let me ask a really dumb question...
Why can't I replace the /etc/motd file with my own? I'm using pretty much the default kernel and app config of uClinux which means all the files in uClinux-dist/romfs/ are going to be my file system after compilation. I've had success building simple stand alone executables and throwing them in the /bin directory, but this is the first time I've tried to make a modification to an existing file. I figured motd is appropriate as it has no effect on the system other than being printed at boot time, and the results are easy to see. Before compilation I replace uClinux-dist/romfs/etc/motd with my own. When I run make, somewhere along the line it gets completely replaced. In trying to figure out where the source file is, I changed the permissions of the motd to 000 to force an error on compilation when it attempts to overwrite. This only brought me to /uClinux-dist/linux-2.6.x/usr/initramfs_data.cpio.gz which is an archive I can't open because my OS doesn't know what a cpio file is. I tried removing the line "../romfs/etc/motd \" from /uClinux-dist/linux-2.6.x/usr/.initramfs_data.cpio.d in hopes it would ignore the motd file after that. No Luck, it came back. Can someone shed some light on this mystery? Thanks, Todd