Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Im trying to compile a custom 2.6.5 kernel (this is my first attempt at compiling a kernel) but i cant seem to be able to boot into it. It gives me "VFS: Cannot open root, device "hdg2" or unown block (2,0)".
My grub config is :
# Modified by YaST2. Last modification on Sun May 2 10:32:40 2004
color white/blue black/light-gray
default 0
timeout 8
gfxmenu (hd0,1)/boot/message
###Don't change this comment - YaST2 identifier: Original name: WindowsXP###
title WindowsXP
rootnoverify (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1
###Don't change this comment - YaST2 identifier: Original name: linux###
title Linux
kernel (hd0,1)/boot/vmlinuz root=/dev/hdg2 vga=0x318 splash=native desktop hdd=ide-scsi hddlun=0
#showopts
initrd (hd0,1)/boot/initrd
###Don't change this comment - YaST2 identifier: Original name: windows 2###
title windows 2
root (hd2,0)
chainloader +1
###Don't change this comment - YaST2 identifier: Original name: floppy###
title Floppy
root (fd0)
chainloader +1
###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe
kernel (hd0,1)/boot/vmlinuz root=/dev/hdg2 showopts ide=nodma apm=off acpi=off vga=normal nosmp noapic maxcpus=0 3
initrd (hd0,1)/boot/initrd
###Don't change this comment - YaST2 identifier: Original name: Memory Test###
title Memory Test
kernel (hd0,1)/boot/memtest.bin
###Don't change this comment - YaST2 identifier: Original name: Test Kernel (2.6.5)###
title Test Kernel (2.6.5)
kernel (hd0,1)/boot/bzImage-2.6.5-rotem root=/dev/hdg2
initrd (hd0,1)/boot/initrd-2.6.5-rotem
Do you still have your previous kernel running?
If so boot into that. Or use the rescue disk to get into linux. While selecting modules and builtins be carefull to check ext2 and/or ext3. Depends on what kind of filesystem you use on /boot partition. It can't load because the filesystem can't be recognized by the kernel as a module at that early stage of booting. However this is just one of the common mistakes made at compiling the kernel. Try this and tell us what happens.
You should go under Filesystems and then the Partitioning section in the config. I've noticed that it doesn't by default enable multiple partition tables. Select the Windows Logical Volume Manager and/or MSDOS Partition(Anything that looks windows-like). Also make sure that you've got reiserfs enabled, I've done that too, since it's not a default option. I've gotten the same error from that problem under a few different distros. Best of luck!
I did compile with support for ext2 and ext3 and reiserfs. One thing that I might be missing is that im booting off an ide channel that is on a pci card. Would it help iff I attatched my .config?
I was having all kinds of problems getting my custom kernels to boot,but I was editing the menu list by hand and then I ran grub-update and it fixed everything,but I don"t have suse and mayby yast does that anyway,david
I am a chinese, maybe you didn't understand what's i say
first change the directory the kernel source, for example:
#cd linux-2.6.6
#make menuconfig
select "Dvice Drivers->ATA/ATAPI/MFM/RLL support->"
you hat to select this "ATA/ATAPI/MFM/RLL support"
#make
#make modules
#make modules_instal
#make install
configure the boot manager
#reboot
Good lucky!
If not succes! please mail to youxia_2008@yahoo.com.cn
Remember send me the .config file to me!
make menuconfig
make
su -c "make modules_install"
make install (with root)
I have noticed the lack of initrd.img (kernel 2.6.6) file of my system. I surely have initrd.img-2.4.25-1-386 file but no initrd.img-2.6.6 or something like that. Do I need initrd.img with the new kernel and if it's so how can I do that? When I boot using grub and the new kernel I get:
VFS: Cannot open root device "hde2" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on unknown-block(0,0)
My /boot/grub/menu.lst looks like this:
# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.
## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
default 0
## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 5
# Pretty colours
color cyan/blue white/blue
## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret
#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#
#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default optons below
## DO NOT UNCOMMENT THEM, Just edit them to your needs
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specifiv kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
# kopt=root=/dev/hde2 ro
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)
## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true
## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false
## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery mode) single
# altoptions=(recovery mode) single
## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all
Consider DrOzz "Newbie guide to kernel compiling" on LQ forums.
Just search for this thread.
Otherwise run this command as root:
/sbin/mkinitrd /boot/initrd-2.6.6.img 2.6.6
This wil create the initrd file for your kernel. But as I said consider DrOzz guide as it will tell you all of this in a few easy steps. You will need only a couple of minutes.
Options:
-d confdir Specify an alternative configuration directory.
-k Keep temporary directory used to make the image.
-m command Set the command to make an initrd image.
-o outfile Write to outfile.
-r root Override ROOT setting in mkinitrd.conf.
See mkinitrd(8) for further details.
If I do "mkinitrd -o /boot/initrd-2.6.6.img 2.6.6" (because the help says <-o outfile>) I get:
debianmasiina:/boot/grub# mkinitrd -o /boot/initrd-2.6.6.img 2.6.6
/usr/sbin/mkinitrd: /boot/grub/2.6.6: Not a directory
/usr/sbin/mkinitrd: MODULES needs to be set to none?
Well you got me confused then. I don't know what the messages mean, as I never got them at my recompiling. However the compiling of your kernel is somehow different from mine.
You did:
make menuconfig
make
make modules install
make
You should have done:
make bzImage
make modules
make modules_install
Try recompiling your kernel. And do use DrOzz's guide. For it works out of the box You know what I mean.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.