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.
With Phenom and C2D CPUs I would go for 64 bit, but you can also go for 32 bit. I would choose i686 as common base. Don't forget to compile in the drivers you need for the second machine.
There are also possibilities to compile for a specific CPU with other software than the kernel if you use the -mcpu and -march options of the compiler.
With Phenom and C2D CPUs I would go for 64 bit, but you can also go for 32 bit. I would choose i686 as common base.
There is no "i686" entry, there is only a "586/K5/5x86/6x86/6x86MX", but I think that is not the same.
(I am looking at the 2.6.39.1 kernel configurator.)
A few possible attention points that come to mind:
- make sure your partition layout is the same on both boxes or adjust your fstab (if you use uuid's, see next comment),
- if you used uuid's in your grub config you need to change these, or switch back to device names,
- if you have created/fixed any udev rules, make sure they are still correct/relevant.
The above depends on when you are going to switch from one box to the other, but you might want to keep them in mind.
Regarding the partition layout: I have thought about this and come to the following conclusion:
On the host PC I don't necessarily need to boot into lfs, I can do everything from the chroot environment. Therefore I can create fstab as if I were already on the other machine.
I intend to get lfs to the new machine by making a disk image (using an acronis true image live cd) and restoring it to the new hard disk.
One thing I am not yet sure about is, how I can install grub to work on the new machine without breaking the existing grub on the host.
Maybe I can just install grub to MBR on the new machine using a live CD like http://www.supergrubdisk.org/rescatux/ and not do anything about it on the host?
But now I have a network probem. At boot I get:
"interface eth0 does not exist"
three times in a row.
My guess was the driver was missing, so I recompiled the kernel (on the new machine), installing all the network drivers as modules, just to be on the safe side. Then I redid the dhcpcd-4.0.11 and DHCP-3.0.6 chapters from BLFS (svn-20110620) and also deleted the ipv4 file.
However, this did not solve the problem, I still get the same error (twice now).
The network controller is a standard gigabit onboard one working in every recent Linux distro, so the driver is certainly contained in the kernel.
Updating /etc/modules.conf should do the trick. Though I was under the impression recompiling the kernel should a least install the driver for the network card in the computer from which it is rebuilt. On the old computer I did not install any extra drivers and it worked??
Last edited by lich000king; 06-24-2011 at 09:17 AM.
Personally I like my kernel's as small and as static (= no/minimal modules) as possible. And too be honest I only have a basic understanding of automated device handling using modules during installalation. I do believe that activating all, in this case, network interfaces as module isn't enough to activate the correct one automatically at boot. Maybe someone else also reads this and can explain in more detail.
I'm not sure if using a module was a conscious choice made by you. I would rather not use the module, but build it statically, no extra stuff is needed. If the specific card is present in your system it will be picked up (enabling all network devices as static is an option, the correct one is still automatically used, but there is a possibility of warning messages thrown by the cards that are not found).
I would advise you to disable the modules/static entries you don't need once you know which card is used.
Personally I like my kernel's as small and as static (= no/minimal modules) as possible.
So do I.
Installing all the drivers as modules was more like an experiment, to see if it will work.
Now I have gone though LFS again, this time the SVN version (20110620).
I identified the correct driver in the kernel config and installed it (not as a module).
When I reboot, I get one (correct-looking) grub entry. But when I hit enter, I get:
Code:
error: File not found
But what file?
I have seen GRUB was updated to 1.99 in SVN 20110626, but as far as I can tell, this should not make a difference, I haven't tried yet.
I'm guessing that it is looking for /boot/vmlinux-2.6.39.2-lfs-SVN-20110626
Is your /boot/grub/grub.cfg correct? If you used /dev/sda1 and did not use a separate /boot partition, it should look something like this:
Code:
# Begin /boot/grub/grub.cfg
set default=0
set timeout=5
insmod ext2
set root=(hd0,1)
menuentry "GNU/Linux, Linux 2.6.39.2-lfs-SVN-20110626" {
linux /boot/vmlinux-2.6.39.2-lfs-SVN-20110626 root=/dev/sda1 ro
}
That's exactly it. The file in /boot/ is called vmlinux-2.6.39.2-lfs-SVN-20110620, which is a bit strange. SVN-20110620 contained kernel 39.1, SVN-20110626 contains kernel 39.2.
Now I used the correct filename in grub.cfg.
Et voilą, it boots and the network is also working!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.