LFS installation attempt starting from hard disk-failed!

Source: Internet
Author: User
To save a CD, I want to enable LFS to start and install from the hard disk. Here I want to start the LFS system from the hard disk, this is because the installation in the lfs cd environment is likely to be successful. Here we will record the implementation process.
1. Unsuccessful methods:
When the supervisor calls the LFS kernel, the following error occurs during startup: Searching for the CD named lfslivecd-x86-6.2-5
/Dev/hdc: Drive not ready
I couldn't find an LFS LiveCD in any drive !!
I'm going to wait 10 seconds and try again (Try 0/3)

Automatically shut down after three retries.

2. Find the reason
Search for couldn't find an LFS LiveCD from google and find an init. c file. It is found that this program runs when the LFS disc is started and is responsible for the initialization of the file system of the LFS disc system. It is precisely this program that takes the root of the LFS disc. the ext2 file is mounted to the system. By default, it always looks for the LFS disc from the optical drive device. If it is not found, the above error is prompted. If you change it to read the root. ext3 file from other devices, it can be started from the hard disk.
From lfs (http://wiki.linuxfromscratch.org/livecd/browser/trunk/initramfs? Rev = 1503) The website obtains the init. c, init. h, iso9660.h, and Makefile files without any modification. Compile the files with gcc init. c and the following error is returned: /Tmp/ccXDnpgw. o: In function 'main ':
Init. c :(. text + 0x43b): # ff0000 reference to 'dm _ task_create'
Init. c :(. text + 0x451): undefined reference to 'dm _ task_set_name'
Init. c :(. text + 0x464): undefined reference to 'dm _ task_set_major'
Init. c :(. text + 0x474): undefined reference to 'dm _ task_set_minor'
Init. c :(. text + 0x4b8): undefined reference to 'dm _ task_add_target'
Init. c :(. text + 0x4c6): undefined reference to 'dm _ task_run'
Init. c :(. text + 0x4d4): undefined reference to 'dm _ task_destroy'
Collect2: ld returns 1

Prompt link can not find the above function, did not recruit and ask google, In the http://www.linuxsir.org/bbs/showthread.php? P = 1706682 # post1706682 found that livecd must be used as the compiling environment for normal compilation. As a result, it is started with an LFS disc in the Virtual Machine and compiled in the livecd environment. The problem persists. This article also provides another link http://www.linuxsir.org/bbs/showthread.php? T = 274629, which is described in more detail, but they are all about versions earlier than 6.2-5. Although they are already very detailed, however, for cainiao like me (comparing the compilation commands used by others and the compilation commands used by me, we can see that I have many dishes) is not enough, and my problem is still unsolved. Then finally in http://bbs.znpc.net/viewthread.php? Tid = 3630 indicates the cause of the problem. Version 6.2-5 (which should be version 6.2) is different from the compilation parameters of the previous version. You must add the-ldevmapper parameter. Actually in http://www.linuxsir.org/bbs/showthread.php? T = 274629 has already been quite clear, but I did not understand it.
To sum up, you should carefully study the Makefile file, which is clearly written.

My idea is to modify init. c. Mount root from a partition of the hard disk. ext3 is not mounted from the CD, but the problem I encountered is that running the compiled program without any modification fails. The error is as follows: Kernel panic-not syncing: VFS: Unable to mount root fs on unknown-block (1.0)

Unable to continue -_-

Poor C language!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.