LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 05-07-2010, 06:21 PM   #16
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15

Hi all,

Now I am trying to configure linux kernel-2.6.30.2 as it is used in lfs-6.5. But I am using linux-2.6.28 on my host system. These newer one has a number of new options most of which are unknown to me.. Can someone help me in configuring this kernel with relevant options....

Thanks in advance

Regards
_Linux_Learner
 
Old 05-08-2010, 04:05 AM   #17
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

I would suggest importing your old kernel config (from 2.6.28), using make oldconfig. This way the basic settings will be correct. After that you can run make menuconfig and check the entries that are of interest to you. Most, if not all, of the defaults are probably good enough to start with.

First thing you should try to accomplish is to get a basic kernel that boots your LFS system. It doesn't matter if this kernel does not have all the correct/tuned options (although it should be bootable...). Once you have done that you can set up your bootloader in such a way that you can boot 2 kernels: A fall-back kernel (the basic one) and a kernel you can tinker with. If anything goes wrong with your "tinker kernel" you can always boot the system with the fall-back kernel and try again.

If something goes wrong with your basic kernel (it doesn't boot the system) you can always use your host (or the liveCD) to start, enter the chrooted environment and re-configure your LFS kernel.

You might have noticed that I haven't said much about the specific kernel entries that can be set, this because they depend on the system/hardware you are using. You should be familiar with your hardware and set the options accordingly. Have a look at the bootmessages that are created when starting your host (found in /var/log), a lot of system specific information can be found there.

BTW: Depending on what you install from BLFS, you are probably going to re-compile the kernel again at a later stage to add/remove some options.

Hope this helps.
 
Old 06-10-2010, 09:49 PM   #18
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
grub

Hi all,

Now I am installing grub and new problems are there....

running the command
Code:
root (hd0,4)
gives the error
Code:
Filesystem type unknown, partition type 0x7
My lfs is on hda5.. I have set up fstab file properly...

Also
Code:
find /boot/grub/stage1
gives the error
Code:
Error 15: File not found
Please help... Thanks in advance

Regards
_Linux_Learner
 
Old 06-11-2010, 01:51 AM   #19
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

I'm assuming you are still working on LFS 6.5 and installed grub 0.97.

Did you forget to copy the stage files (last command from chapter 8.4.1)? Part of this chapter.

Also have a look to see if the grub package you downloaded is 0.97 and not a newer version (LFS 6.6 uses version 1.97.2 and uses a different way of installing. Stick with the LFS 6.5 version).

Hope this gets you going agagin.
 
Old 06-11-2010, 07:00 AM   #20
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Hi,
I'm assuming you are still working on LFS 6.5 and installed grub 0.97.
Your assumptions are correct...
Quote:
Did you forget to copy the stage files (last command from chapter 8.4.1)? Part of this chapter.
Yes I copied those files...
Quote:
Also have a look to see if the grub package you downloaded is 0.97 and not a newer version (LFS 6.6 uses version 1.97.2 and uses a different way of installing. Stick with the LFS 6.5 version).
I have downloaded the correct version... Its 0.97 only...

Quote:
Hope this gets you going agagin.
You were always helpful... I am greatful to you...
 
Old 06-11-2010, 07:03 AM   #21
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

I'm not entirely sure if this solved the problem, hope it did.

If not: If you copied the stage[12] files as stated in the LFS book then they should be found in /boot/grub.

Anyway, hope I'm wrong and you solved it.
 
Old 06-11-2010, 07:27 AM   #22
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Hi,

I'm not entirely sure if this solved the problem, hope it did.

If not: If you copied the stage[12] files as stated in the LFS book then they should be found in /boot/grub.

Anyway, hope I'm wrong and you solved it.
well my problem is still not solved.... I want more help...

Thanks in advance

Regards
_Linux_Learner
 
Old 06-11-2010, 07:36 AM   #23
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Ok, clear.

What does ls -l /boot/grub show? Are the stage[12] files present?

If not: Try the command in the book again (cp -v /usr/lib/grub/i386-pc/stage{1,2} /boot/grub).

If that doesn't work check /usr/lib/grub/i386-pc/. Are these files present here?

If that isn't the case I would suggest to redo the whole chapter (8.4. GRUB-0.97).

Hope this helps.
 
Old 06-11-2010, 09:26 AM   #24
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Unhappy

Quote:
Originally Posted by druuna View Post
Hi,What does ls -l /boot/grub show? Are the stage[12] files present?
The above command gives the output:
Code:
-rw-r--r-- 1 root root   7608 2010-06-11 07:26 e2fs_stage1_5
-rw-r--r-- 1 root root   7452 2010-06-11 07:26 fat_stage1_5
-rw-r--r-- 1 root root   6704 2010-06-11 07:26 ffs_stage1_5
-rw-r--r-- 1 root root   8272 2010-06-11 07:26 iso9660_stage1_5
-rw-r--r-- 1 root root   8208 2010-06-11 07:26 jfs_stage1_5
-rw-r--r-- 1 root root   6856 2010-06-11 07:26 minix_stage1_5
-rw-r--r-- 1 root root   9244 2010-06-11 07:26 reiserfs_stage1_5
-rw-r--r-- 1 root root    512 2010-06-11 07:26 stage1
-rw-r--r-- 1 root root 101598 2010-06-11 07:26 stage2
-rw-r--r-- 1 root root 103134 2010-06-11 07:26 stage2_eltorito
-rw-r--r-- 1 root root   6976 2010-06-11 07:26 ufs2_stage1_5
-rw-r--r-- 1 root root   6304 2010-06-11 07:26 vstafs_stage1_5
-rw-r--r-- 1 root root   9112 2010-06-11 07:26 xfs_stage1_5
Which is correct...

Now what to do ?? I hope this last chapter will not ruin my effort of building and learning lfs... :-(

Regards
_Linux_Learner
 
Old 06-11-2010, 11:26 AM   #25
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi again,

The output shown is indeed correct.

This: Filesystem type unknown, partition type 0x7 is strange, could you post the output of the following command: fdisk -l (that is a lowercase L)
 
Old 06-12-2010, 10:25 AM   #26
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Hi again,

The output shown is indeed correct.

This: Filesystem type unknown, partition type 0x7 is strange, could you post the output of the following command: fdisk -l (that is a lowercase L)
Hi dunna,

I am a big fool....

The output is:
Code:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00ff00ff

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       10443    83883366    7  HPFS/NTFS
/dev/sda2           14335       19456    41142465    f  W95 Ext'd (LBA)
/dev/sda3           10444       13849    27358695   83  Linux
/dev/sda4           13850       14334     3895762+  82  Linux swap / Solaris
/dev/sda5           14335       18251    31463271    7  HPFS/NTFS
/dev/sda6   *       18252       19456     9679131   83  Linux

Partition table entries are not in disk order
Now my lfs is on sda5 and the problem is clearly visible...

Can u tell me whether its possible to change the file system while keeping data on it.. If not what is the other way to get this stupid problem solved...

Thanks in advance
Regards
_Linux_Learner
 
Old 06-12-2010, 11:14 AM   #27
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Quote:
Now my lfs is on sda5 and the problem is clearly visible...
sda5? I don't hope so..... That looks like a windows FS, not a linux one

Your swap is on /dev/sda4
You have 2 linux partitions: /dev/sda3 and /dev/sda6. I'm guessing that /dev/sda6 is the one LFS is on.

Or do I misunderstand and did you actually build LFS on /dev/sda5 (The next quote makes me doubt myself.)?

Quote:
Can u tell me whether its possible to change the file system while keeping data on it.. If not what is the other way to get this stupid problem solved...
I don't know of any tools that can change the FS and leaves the data as-is.

I'm not sure if it is possible what you ask, I don't have any practical experience with a problem like this. So the next part is theoretical and untested. Worst case: You loose some time before starting over again. Best case: You safe the work you've done.

To my knowledge the dd command cannot be used, it also copies the undelying structure, not only the data.

Maybe you can copy all the data to /dev/sda6 (assuming that that one is free and formatted with a linux capable FS like ext2/ext3/...).

After copying you need to change some files. All that have /dev/sda5 in them to /dev/sda6 (fstab comes to mind, grub config file maybe others too).

Actions to take:

1) boot into your (linux) host system and become the root user,
2) mount /dev/sda5 to /mnt/lfs
3) create a mount point for /dev/sda6 (mkdir /mnt/sda6)
4) mount /dev/sda6 to /mnt/sda6
5) copy everything to /mnt/sda6 (cp -dpr /mnt/lfs/* /mnt/sda6/)

Do use the -dpr options. It tells cp to:
d - preserve links,
p - preserve mode,ownership,timestamps,
r - copy directories recursively

This makes sure you make a 1 to 1 copy, very important.

After the copy command is done I would unmount both partitions (/dev/sda5 and /dev/sda6) and remount sda6 on /mnt/lfs, You probably have the LFS variable automatically set to /mnt/lfs and this will make sure that all is done on the correct partition.

At this point all data is copied to /dev/sda6 and /dev/sda6 is mounted on /mnt/lfs.

Now you need to enter your LFS system (you have probably done this before).

Fix the files that contain /dev/sda5 (only fstab and grub come to mind). First edit your fstab file.

You are now back to were you started with grub.

I would suggest reinstalling grub (start at the beginning of that chapter), do remove the source directory if you haven't already. Also remove the /boot/grub directory (rm -rf /boot/grub). Why start over? I'm not sure if grub hardcodes any info, to make sure you should reinstall.

Hopefully you are able to continue from here. But don't be too happy yet! Problems could arise when you try to boot into your LFS system. This copy idea I had might not work...... Then again, maybe it does work

Anyway, hope this gets you going again.

Last edited by druuna; 06-12-2010 at 11:19 AM.
 
Old 06-24-2010, 07:47 AM   #28
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Hi druuna,

Well now the grub command starts working and I have setup the bootloader.... But now I have two menu.lst files one of my host system and another of this lfs... On booting menu.lst file of host system turns up... So now how to get the other menu.lst file turn up...

Please help.. Thanks in advance

Regards
_Linux_Learner
 
Old 06-24-2010, 07:57 AM   #29
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

You are at a point where you need to make a decision:

Are you going to use both in a dual boot setup, or are you going to delete one of them?

If the first is true (dual boot Ubuntu/LFS) then you can use one of the grub setups. If Ubuntu will be your main linux distro I would advise to use the grub that came with Ubuntu and add a LFS entry.

If you want to delete Ubuntu (eventually) and want to use LFS full time: Add a ubuntu entry to the LFS grub setup.

It is up to you, but in the end you only need one grub setup!

Hope this helps.
 
Old 06-24-2010, 09:36 AM   #30
_Linux_Learner
Member
 
Registered: Feb 2010
Distribution: Ubuntu
Posts: 87

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by druuna View Post
Hi,

You are at a point where you need to make a decision:

Are you going to use both in a dual boot setup, or are you going to delete one of them?

If the first is true (dual boot Ubuntu/LFS) then you can use one of the grub setups. If Ubuntu will be your main linux distro I would advise to use the grub that came with Ubuntu and add a LFS entry.

If you want to delete Ubuntu (eventually) and want to use LFS full time: Add a ubuntu entry to the LFS grub setup.

It is up to you, but in the end you only need one grub setup!

Hope this helps.
Hi Druuna,
I think I have landed into a problem and all work done is ruined.... I added the lfs entry to the menu.lst file of my host system.. When I booted my LFS first it fires a huge list of error like eth0 not present, etc.. Than it ask for a username and password.. What are the values of these username and password... Do I need to setup one user before rebooting lfs or something else.....

Please help... Thanks in advance.....

Regards
_Linux_Learner
 
  


Reply



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
LFS live-cd: /dev/mapper/lfs-cd ran out of space bucovaina78 Linux From Scratch 0 10-12-2009 11:00 AM
LFS newbie stuck in Linux API headers step 5.5 LFS book 6.3 Vxplus Linux From Scratch 2 11-10-2008 08:13 PM
error using lfs while compiling lfs book's 6.12 (gcc-4.1.2) section aditya_gpch Linux From Scratch 3 04-24-2008 04:23 PM
LFS Book Chapter 6 - 1st step (chroot to /mnt/lfs) doens't work bauld Linux From Scratch 11 03-15-2006 12:31 AM

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

All times are GMT -5. The time now is 07:23 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