Results 1 to 5 of 5
Hello,
I'm a newbie in x86 architecture. I have some experiences in arm cross compiling and kernel builds. I want to build a bare minimum kernel (vanilla kernel from kernel.org) ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 08-07-2012 #1Just Joined!
- Join Date
- Aug 2012
- Posts
- 2
Vanilla kernel installation in x86 machine ?
Hello,
I'm a newbie in x86 architecture. I have some experiences in arm cross compiling and kernel builds. I want to build a bare minimum kernel (vanilla kernel from kernel.org) that works in x86 architecture. I dont want any GUI or applications, only need the command prompt. Is this setup possible for a vanilla kernel in x86. i'm tried some kernel but it shows boot errors (some driver issues), How we can fix this issues?. Is there any procedure for fresh kernel installation in x86.
thanks in advance
- 08-07-2012 #2
Hi, a kernel will not give you a command prompt, you still need to add a few more applications, a shell, etc. But yes, you can make a very simple and compact linux, this can give you some guidance:
LFS Project Homepage
Good luck
- 08-08-2012 #3Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,657
As far as procedure, just read the README in the root of the linux kernel source directory. you need to be sure to select all drivers for your hardware, but in particular, you need to make sure your motherboard and disk controller drivers are selected. also you need to be sure to include the proper filesystem and CPU support. there are a multitude of options you can select when configuring the kernel, but those are the main ones.
as to the errors you are experiencing, you should include them as they appear on your screen here, so that we can better help you diagnose them.
- 08-12-2012 #4Just Joined!
- Join Date
- Aug 2012
- Posts
- 2
hello,
I'm compiled 2.6.34 kernel with default configuration i386_defconfig and generated a bzImage. Then the image copied to my existing distribution kernels /boot folder and updated the grub.cfg for currently compiled kernel, also copied a simple initramfs structure with a busybox. Then I restarted the computer and selected the new item in grub menu. It displayed some booting logs and then fall in to the initramfs command prompt , my harddisk file system not mounted . Why it happens is there any suggestion to boot a vanilla kernel with any simple initramfs and then load the existing system filesystem. The below log is the init file that i included in my initramfs
Please help meCode:#!/bin/sh #Mount things needed by this script mount -t proc proc /proc mount -t sysfs sysfs /sys #Disable kernel messages from popping onto the screen echo 0 > /proc/sys/kernel/printk #Clear the screen clear #Create all the symlinks to /bin/busybox busybox --install -s #Create device nodes mknod /dev/null c 1 3 mknod /dev/tty c 5 0 mdev -s #Function for parsing command line options with "=" in them # get_opt("init=/sbin/init") will return "/sbin/init" get_opt() { echo "$@" | cut -d "=" -f 2 } #Defaults init="/sbin/init" root="/dev/hda1" #Process command line options for i in $(cat /proc/cmdline); do case $i in root\=*) root=$(get_opt $i) ;; init\=*) init=$(get_opt $i) ;; esac done #Mount the root device mount "${root}" /newroot #Check if $init exists and is executable if [[ -x "/newroot/${init}" ]] ; then #Unmount all other mounts so that the ram used by #the initramfs can be cleared after switch_root umount /sys /proc #Switch to the new root and execute init exec switch_root /newroot "${init}" fi #This will only be run if the exec above failed echo "Failed to switch_root, dropping to a shell" exec sh
Thanks in advance
- 08-12-2012 #5Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,657
what are your kernel command line args? e.g.:
what hard drives are detected? e.g.:Code:cat /proc/cmdline
you can also try this command to show disk drives by model:Code:fdisk -l
does the kernel block device exist? e.g.:Code:grep -H . /sys/block/[sd]a*/device/model
I assume you have a filesystem on the first (parallel) IDE drive. what is the filesystem? ext3, etc.Code:ls -l /dev/hda /dev/hda1


1Likes
Reply With Quote

