LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 01-02-2013, 02:19 AM   #1
micflunu
Member
 
Registered: Oct 2012
Posts: 73

Rep: Reputation: Disabled
installing two kernels in a single machine booting with lilo


I am trying to add a kernel to my ubuntu 12.04.I have a kernel version of 3.2.x.x and now I want to add kernel 3.0.x.x with out affecting the one working perfectly. But the thing is in am getting this different ideas from different sites and I don know which one to use.Is there any one who could guide me or point me to a correct reading material?
Best Regards!!!
 
Old 01-02-2013, 03:14 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,009

Rep: Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799
Simple enough - I do it all the time. Make sure CONFIG_LOCAL_VERSION is set to a different setting.
Then you end up with 2 module trees, 2 kernels, and one root drive. The module trees will be in
/lib/modules/<kernel version><local_version> e.g. 3.2.29-mine

Then rename each to the <kernel version><local_version> e.g. vmlinuz-3.2.29-mine & System.map-3.2.29-mine.
 
Old 01-03-2013, 12:12 AM   #3
micflunu
Member
 
Registered: Oct 2012
Posts: 73

Original Poster
Rep: Reputation: Disabled
thank for the replay i kind of did install the kernel but i don know how to create the initial ram disk image(initrd)
i tried
Code:
mkinitr
It said
Code:
command not found
Code:
mkinitramfs
and said
Code:
Kernel too old for mkinitramfs
What should i do?
 
Old 01-03-2013, 08:39 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,009

Rep: Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799
mkinitrd
 
Old 01-04-2013, 02:16 AM   #5
micflunu
Member
 
Registered: Oct 2012
Posts: 73

Original Poster
Rep: Reputation: Disabled
Ok that is solved thanks.Now the problem is my system boots properly with my old kernel but when i try to boot from the new kernel i get
Code:
mount:mounting /dev on /root/dev failed:no such file or directory
mount:mounting /sys on /root/sys failed:no such file or directory
mount:mounting /proc on /root/proc failed:no such file or directory
target filesystem doesn't have requested /sbin/init
No init found.try passing init=bootarg
(initramfs)_
i can not do any thing .how do i lose this (initramfs) prompt?

Last edited by micflunu; 01-04-2013 at 02:27 AM.
 
Old 01-04-2013, 06:17 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,009

Rep: Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799
It strikes me you have left out some fundamental piece of the jigsaw.

You need tmpfs, fuse filesystem, & your own hard disk filesystem compiled into the kernel.

Without tmpfs & a /dev/ directory, the system cannot mount the device tree on /dev so no devices get made. This is the setup from my 3.7.1 kernel, which works with no initrd.
Code:
bash-4.2$ grep -ne 'FUSE' -e 'TMPFS' -e 'EXT4' .config
1200:CONFIG_DEVTMPFS=y
1201:CONFIG_DEVTMPFS_MOUNT=y
3399:CONFIG_EXT4_FS=m
3400:CONFIG_EXT4_USE_FOR_EXT23=y
3401:CONFIG_EXT4_FS_XATTR=y
3402:CONFIG_EXT4_FS_POSIX_ACL=y
3403:CONFIG_EXT4_FS_SECURITY=y
3404:# CONFIG_EXT4_DEBUG is not set
3427:CONFIG_FUSE_FS=m
3469:CONFIG_TMPFS=y
3470:# CONFIG_TMPFS_POSIX_ACL is not set
3471:CONFIG_TMPFS_XATTR=y
 
Old 01-04-2013, 06:21 AM   #7
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 3,157

Rep: Reputation: 941Reputation: 941Reputation: 941Reputation: 941Reputation: 941Reputation: 941Reputation: 941Reputation: 941
Are your sure you need initial (or otherwise) ramdisk?
 
Old 01-04-2013, 07:25 AM   #8
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,696

Rep: Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261
No, you need to make sure the mkinitrd includes the drivers for the disk controller you are using.

Something like:
Code:
mkinitrd -c -k 3.2.29 \
	-f ext4 \
	-r /dev/vda3 \
	-m ext4:virtio:virtio_balloon:virtio_blk:virtio_pci:virtio_ring
In my case, I was installing in a VM using virtual disks for speed (the vda driver). I had to tell the mkinitrd the root device (/dev/vda3) and include the driver modules (ext4 for root, virtio* for the disk).

No need to have them compiled into the kernel, though that would work too.
Modules are all that are needed - and this makes it easier to update the drivers without having to rebuild the kernel.
 
Old 01-08-2013, 12:49 AM   #9
micflunu
Member
 
Registered: Oct 2012
Posts: 73

Original Poster
Rep: Reputation: Disabled
Thank you all for your replays.Could any one please explain to me what you are saying.As i am new to this thing i am kind of confused to what you are trying to tell me.I have installed the other kernel,at list i think i do,using this site "file:///media/6824BB7F24BB4F36/pdf/fork/kernel/kernel-compile.html".I can boot my system using the original kernel but not able with the newly installed one.So how do i make the things that you are suggesting by booting from the other kernel.And could you please be a little clear about what you are telling me because i am new.
 
Old 01-08-2013, 01:00 AM   #10
wigry
Member
 
Registered: Jul 2004
Distribution: slackware
Posts: 222

Rep: Reputation: 52
First it is interesting that you are using Ubuntu which in turn uses Lilo? I thought that Ubuntu uses Grub or something else? But if there is indeed Lilo, then you need to configure lilo to have an entry for the second kernel, then rerun lilo, so that all the things are set up for you, reboot and if the kernel is good, then you are good to go.

First step is to configure Lilo. You need to find the lilo config file, so go and see, if there is a file called /etc/lilo.conf and if so, please post the contents of that file into this thread. Then we can guide you further.
 
Old 01-08-2013, 01:31 AM   #11
micflunu
Member
 
Registered: Oct 2012
Posts: 73

Original Poster
Rep: Reputation: Disabled
I did all that it works just fine for the originally installed kernel.But i had to install and configure additional kernel and boot with any of the kernels.I tried to install and configure the additional kernel.Yes i did update the lilo.conf file.Lilo lets me choose from the two kernels.But the problem is with the last installed kernel it doesn't finish booting it stacks giving mi the above error messages.
 
Old 01-09-2013, 03:43 AM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 8,009

Rep: Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799Reputation: 799
You need to recompile with a better choice of options. Read post #6.
 
Old 01-15-2013, 04:49 AM   #13
vinay.bhandwalkar
LQ Newbie
 
Registered: Jan 2013
Posts: 6

Rep: Reputation: Disabled
minitrd command not found

hello seniors,
I am new to the forum
As I am installing new kernel 3.7.1. on my Ubuntu 12.04
in /boot folder when I run mkinitrd -o initrd.img-3.7.1 3.7.1 it says command not found
but I can see initrd.img-3.7.1 file in /boot folder
 
Old 01-15-2013, 05:15 AM   #14
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,696

Rep: Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261Reputation: 1261
You need to show the command and the errors (put them in a code block for formatting). We can't tell what your error may be associated with. mkinitrd is actually a shell script, so there may be something missing for it to work.
 
Old 01-15-2013, 11:53 PM   #15
vinay.bhandwalkar
LQ Newbie
 
Registered: Jan 2013
Posts: 6

Rep: Reputation: Disabled
upate-grub

as there was error in running mkinitrd -o initrd.img-3.7.1. 3.7.1 I just updated grub without running mkinitrd command
and the kernel 3.7.1 is running efficeintly.
As I am new could plz tell me what is the basic need for running mkinitrd command and what if I didnt use it
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problem installing LILO and booting [Solved] Kubuntu Slackware - Installation 3 04-25-2011 07:19 PM
Installing to one drive and booting from another - lilo? fogpipe Linux - Newbie 4 03-12-2011 03:58 PM
Single RHEL5 installation support booting both 32/64-bit kernels? bkimura66 Linux - Software 3 08-11-2009 02:42 PM
RedHat support booting 32-bit & 64-bit kernels from single installation? bkimura66 Linux - Server 1 08-11-2009 07:45 AM
Installing Lilo to external harddrive from different computer that's not booting it? zefer Linux - General 10 10-03-2007 12:30 PM


All times are GMT -5. The time now is 08:42 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration