LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This 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


Reply
  Search this Thread
Old 01-26-2011, 11:21 AM   #1
grumpy.biatch
Member
 
Registered: Jun 2010
Posts: 48

Rep: Reputation: 0
Exclamation Cant create ramdisk in cblfs


Hi,

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.
 
Old 01-31-2011, 11:43 AM   #2
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Hi,

Could you please post the content of your mountfs.rej file. I think it contains useful info to understand the problem.

Kind regards,

Oliv'
 
Old 02-01-2011, 04:17 AM   #3
grumpy.biatch
Member
 
Registered: Jun 2010
Posts: 48

Original Poster
Rep: Reputation: 0
Exclamation

Quote:
Originally Posted by Oliv' View Post
Hi,

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', I am at work atm. Will write back in 3-4 hrs. Best, dave
 
Old 02-01-2011, 04:47 AM   #4
grumpy.biatch
Member
 
Registered: Jun 2010
Posts: 48

Original Poster
Rep: Reputation: 0
Exclamation

Quote:
Originally Posted by Oliv' View Post
Hi,

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
;;

*)
echo "Usage: ${0} {start|stop}"
exit 1
;;
esac

# End $rc_base/init.d/mountfs
 
Old 02-01-2011, 05:44 AM   #5
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
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'
 
Old 02-01-2011, 07:14 AM   #6
grumpy.biatch
Member
 
Registered: Jun 2010
Posts: 48

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Oliv' View Post
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.
 
Old 02-01-2011, 09:19 AM   #7
grumpy.biatch
Member
 
Registered: Jun 2010
Posts: 48

Original Poster
Rep: Reputation: 0
Exclamation

Quote:
Originally Posted by grumpy.biatch View Post
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.

Here is the file

Quote:
--- 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
The file is located in /etc/rc.d/init.d/etc/rc.d/init.d and it got me confused. The working directory is /etc/rc.d/init.d
 
Old 02-02-2011, 01:05 AM   #8
grumpy.biatch
Member
 
Registered: Jun 2010
Posts: 48

Original Poster
Rep: Reputation: 0
Exclamation

I wonder why the patch is creating ext2 fs. I have clfs on ext3, should i change ext2 to ext3 and give it a try.
 
Old 02-02-2011, 04:38 AM   #9
Oliv'
Senior Member
 
Registered: Jan 2004
Location: Montpellier (France)
Distribution: Gentoo
Posts: 1,014

Rep: Reputation: 36
Hello,

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.

Kind regards,

Oliv'
 
Old 02-02-2011, 08:39 AM   #10
grumpy.biatch
Member
 
Registered: Jun 2010
Posts: 48

Original Poster
Rep: Reputation: 0
Oliv', thanks a bunch. I will try this in morning and report back. have a great evening.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
RAMDISK: couldn't find valid ramdisk image starting at 0. iotc247 Slackware 10 12-10-2010 04:08 PM
CBLFS multilib: error in configure script for xterm (Xorg7) fdt93 Linux From Scratch 1 02-18-2010 01:43 PM
CLFS/CBLFS on same partion as CentOS5 shivkiyer Linux From Scratch 2 10-10-2007 01:16 AM
howto create linux to boot from ramdisk only?? pingvina Linux - Software 2 02-09-2006 02:17 PM
kernel build create initial ramdisk htamayo Linux - Software 1 01-07-2005 02:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 09:29 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration