Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am working with cblfs and stuck at ramdisk. I have built a monster kernel with 'make allyesconfig' for 2.6.37 and when I boot the kernel it hangs. I guess this has to do with no ramdisk. I've another kernel 2.6.35 that boots fine but I am unable to find 'block device' under device driver section in it (the menuconig has a very bad resolution and I cant really read it all too well).
This is what I get when I try to patch /etc/rc.d/init.d/modules -
Code:
root:/etc/rc.d/init.d$ patch -Np1 -i ~/mountfs-0.1-RAMDISKTMP-2.patch
patching file etc/rc.d/init.d/mountfs
Hunk #1 FAILED at 24.
1 out of 1 hunk FAILED -- saving rejects to file etc/rc.d/init.d/mountfs.rej
How do I resolve this as per the cblfs wiki or by other means.
Last edited by grumpy.biatch; 01-26-2011 at 11:22 AM.
Could you please post the content of your mountfs.rej file. I think it contains useful info to understand the problem.
Kind regards,
Oliv'
Oliv´, here is my mountfs under clfs /etc/rc.d/init.d
Quote:
#!/bin/bash
########################################################################
# Begin $rc_base/init.d/mountfs
#
# Description : File System Mount Script
#
# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
#
# Version : 00.00
#
# Notes :
#
########################################################################
. /etc/sysconfig/rc
. ${rc_functions}
case "${1}" in
start)
boot_mesg "Remounting root file system in read-write mode..."
mount -n -o remount,rw / >/dev/null
evaluate_retval
# Remove fsck-related file system watermarks.
rm -f /fastboot /forcefsck
boot_mesg "Recording existing mounts in /etc/mtab..."
> /etc/mtab
mount -f / || failed=1
mount -f /proc || failed=1
mount -f /sys || failed=1
(exit ${failed})
evaluate_retval
# This will mount all filesystems that do not have _netdev in
# their option list. _netdev denotes a network filesystem.
boot_mesg "Mounting remaining file systems..."
mount -a -O no_netdev >/dev/null
evaluate_retval
;;
stop)
boot_mesg "Unmounting all other currently mounted file systems..."
umount -a -d -r >/dev/null
evaluate_retval
;;
But what I really need to understand the problem is the .rej file when you try to apply the patch. With that I hope I will be able to tell you wether that's a critical error or not.
But what I really need to understand the problem is the .rej file when you try to apply the patch. With that I hope I will be able to tell you wether that's a critical error or not.
Kind regards,
Oliv'
Duh, there is no /etc/rc.d/init.d/mountfs.rej
Not sure what happened to it, I followed everything off book as yet but I guess it didnt make any. I guess I need to try patching it again in order to generate .rej file, will report back later.
Last edited by grumpy.biatch; 02-01-2011 at 08:48 AM.
Not sure what happened to it, I followed everything off book as yet but I guess it didnt make any. I guess I need to try patching it again in order to generate .rej file, will report back later.
Sorry for the delay, but I have also have a work
So about ext2 or ext3, that's not a problem. Indeed your rootfs is in ext3 format, but ramdisk is just a temporary RAM storage, so a kind of temporary partition. So ext2 for your ramdisk and ext3 for your rootfs is fine.
About the patch itself, I think that either the format is not OK or the command line is not OK. Here is below what I would modify:
Code:
--- etc/rc.d/init.d/mountfs.old 2009-09-28 07:11:13.855801600 +0000
+++ etc/rc.d/init.d/mountfs 2009-09-28 07:58:08.446464339 +0000
@@ -24,12 +24,18 @@
# Remove fsck-related file system watermarks.
rm -f /fastboot /forcefsck
+ boot_mesg "Creating, Formating Ramdisk tmp..."
+ mkfs.ext2 -q -m 0 /dev/ram0
+ evaluate_retval
+
boot_mesg "Recording existing mounts in /etc/mtab..."
> /etc/mtab
mount -f / || failed=1
mount -f /proc || failed=1
mount -f /sys || failed=1
(exit ${failed})
+ boot_mesg -n "Correct /tmp /var/tmp permtions"
+ chmod 1777 /tmp /var/tmp
evaluate_retval
# This will mount all filesystems that do not have _netdev in
About the command:
Code:
cd /etc/
patch -Np1 -i ~/mountfs-0.1-RAMDISKTMP-2.patch
And I think/hope it should apply correctly... If you are not in /etc directory you have to modify patch command to specify another strip level.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.