Kernel build, install and boot question on ram disk image
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
I successfully built the debian package using my 2.6.25.9 source tree. But on "dpkg -i" I got an error. The error did show any information so I couldn't tell what it is. So I just manually added the new images to my menu.lst and booted it up. Hence I see the same "root device " error.
I can try "y" to see what happens.
Quote:
Originally Posted by Quakeboy02
Any luck? One option I forgot to mention was to set your driver to "y" instead of "m". This compiles it into the kernel, rather than loading it during boot before the initramfs hands off to the real file system. A doomsday option would be to reconfigure your "root=" parameter to point to the driver, rather than the UUID. But, you'd also have to change /etc/fstab.
I successfully built the debian package using my 2.6.25.9 source tree. But on "dpkg -i" I got an error. The error did show any information so I couldn't tell what it is. So I just manually added the new images to my menu.lst and booted it up. Hence I see the same "root device " error.
I can try "y" to see what happens.
If "dpkg -i" didn't work, then a lot was skipped, and you haven't actually done a complete test. Can you print the complete text of the error, beginning with the dpkg -i command you used?
There were not a lot of errors to see. Essentially it's one liner saying installation of the deb package failed. So I had little clue what's going on.
I followed the exact steps in http://www.howtoforge.com/kernel_compilation_ubuntu. There were not many configurations to decide if you chose the old .config file. So everything was ok up to till "dpkg -i".
One question in my mind: I didn't do my disk partition during the entire process (either the traditional way or the Ubuntu way). How does the new kernel know which partition to use?
Quote:
Originally Posted by Quakeboy02
If "dpkg -i" didn't work, then a lot was skipped, and you haven't actually done a complete test. Can you print the complete text of the error, beginning with the dpkg -i command you used?
There were not a lot of errors to see. Essentially it's one liner saying installation of the deb package failed. So I had little clue what's going on.
I followed the exact steps in http://www.howtoforge.com/kernel_compilation_ubuntu. There were not many configurations to decide if you chose the old .config file. So everything was ok up to till "dpkg -i".
One question in my mind: I didn't do my disk partition during the entire process (either the traditional way or the Ubuntu way). How does the new kernel know which partition to use?
I tried 'dpkg -i' again and insisted on a reinstall of everything. This time was successful here is the output.
Quote:
sudo dpkg -i linux-image-2.6.25.9-custom_2.6.25.9-custom-10.00.Custom_i386.deb
[sudo] password for wdli:
(Reading database ... 117459 files and directories currently installed.)
Preparing to replace linux-image-2.6.25.9-custom 2.6.25.9-custom-10.00.Custom (using linux-image-2.6.25.9-custom_2.6.25.9-custom-10.00.Custom_i386.deb) ...
Done.
Unpacking replacement linux-image-2.6.25.9-custom ...
Running postrm hook script /sbin/update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz
Found kernel: /boot/vmlinuz.old
Found kernel: /boot/vmlinuz-2.6.25.9.old
Found kernel: /boot/vmlinuz-2.6.25.9-custom
Found kernel: /boot/vmlinuz-2.6.25.9
Found kernel: /boot/vmlinuz-2.6.24-16-generic
Found kernel: /boot/vmlinuz-2.6.22-14-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
Setting up linux-image-2.6.25.9-custom (2.6.25.9-custom-10.00.Custom) ...
Running depmod.
Finding valid ramdisk creators.
Using mkinitramfs-kpkg to build the ramdisk.
Other valid candidates: mkinitramfs-kpkg mkinitrd.yaird
47324 blocks
Not updating initrd symbolic links since we are being updated/reinstalled
(2.6.25.9-custom-10.00.Custom was configured last, according to dpkg)
Not updating image symbolic links since we are being updated/reinstalled
(2.6.25.9-custom-10.00.Custom was configured last, according to dpkg)
Running postinst hook script update-grub.
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz
Found kernel: /boot/vmlinuz.old
Found kernel: /boot/vmlinuz-2.6.25.9.old
Found kernel: /boot/vmlinuz-2.6.25.9-custom
Found kernel: /boot/vmlinuz-2.6.25.9
Found kernel: /boot/vmlinuz-2.6.24-16-generic
Found kernel: /boot/vmlinuz-2.6.22-14-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
However the strange thing is my menu.lst wasn't updated at all. Here is the menu.lst after 'dpkg -i'. Should I manually add to the menu.lst?
Can you give me some idea of what you did this time? You keep changing things, and not telling me. I can't help if you keep doing things and not telling me. It looks like you have created another version of the same kernel, and called it "2.6.25.9-custom". I can see that it is not in menu.lst. If it were me, I would remove all vestiges of all 2.6.25.9 installs, starting first with using either synaptic or dpkg (purging it), then removing the one(s) you added in the non-ubuntu way (make uninstall?), then look in /lib/modules and remove any directories remaining that start with 2.6.25.9. The remove it from menu.lst and any files that remain in /boot that are 2.6.25.9. Then run "sudo update-initramfs -u -k all" This will give you a clean slate.
Then, reboot, and use dpkg -i to install that deb again. This time, it should put the menu.lst stuff at the top of the automatic area. If it doesn't, then something is wrong, and you need to figure out what it is, rather than just ignoring the error and moving on. Don't add quiet to it. You want to see everything that happens when it's trying to boot.
But, yes, it would be interesting to see whether it booted or not if you added "-custom" to the menu.lst item elements. I won't even hazard a guess at this point.
sorry for the confusion. The "custom" kernel is the one generated from Ubuntu build process.
I have already done the cleanings as you suggested. The only thing I didn't do is to run sudo update-initramfs -u -k all. I am not sure if I need to do that because all my previous initramfs images related to 2.6.25.9 kernel were gone by this time.
I rebooted to my regular Ubuntu 8.04.
What I 'd like to try next is to add "y" to driver configuration and build it again (the traditional way).
I still have the question about disk partition. I have never been asked to do this during any step in building the custom kernel. How would a custom kernel know which partition to use?
Quote:
Originally Posted by Quakeboy02
Can you give me some idea of what you did this time? You keep changing things, and not telling me. I can't help if you keep doing things and not telling me. It looks like you have created another version of the same kernel, and called it "2.6.25.9-custom". I can see that it is not in menu.lst. If it were me, I would remove all vestiges of all 2.6.25.9 installs, starting first with using either synaptic or dpkg (purging it), then removing the one(s) you added in the non-ubuntu way (make uninstall?), then look in /lib/modules and remove any directories remaining that start with 2.6.25.9. The remove it from menu.lst and any files that remain in /boot that are 2.6.25.9. Then run "sudo update-initramfs -u -k all" This will give you a clean slate.
Then, reboot, and use dpkg -i to install that deb again. This time, it should put the menu.lst stuff at the top of the automatic area. If it doesn't, then something is wrong, and you need to figure out what it is, rather than just ignoring the error and moving on. Don't add quiet to it. You want to see everything that happens when it's trying to boot.
But, yes, it would be interesting to see whether it booted or not if you added "-custom" to the menu.lst item elements. I won't even hazard a guess at this point.
sorry for the confusion. The "custom" kernel is the one generated from Ubuntu build process.
I have already done the cleanings as you suggested. The only thing I didn't do is to run sudo update-initramfs -u -k all. I am not sure if I need to do that because all my previous initramfs images related to 2.6.25.9 kernel were gone by this time.
I rebooted to my regular Ubuntu 8.04.
What I 'd like to try next is to add "y" to driver configuration and build it again (the traditional way).
Well, it's your machine, bit it wouldn't really take that long to run dpkg -i again and see whether it's updating menu.lst. If it is, and if it's like Debian, then it will put the new entries (regular and single-user) at the beginning of the boot list. If it's not then something is more than normally odd.
Quote:
I still have the question about disk partition. I have never been asked to do this during any step in building the custom kernel. How would a custom kernel know which partition to use?
The answer is that the kernel doesn't know nor care. That's up to grub/lilo/whatever your boot loader is and how it's configured. I've never studied bootloaders so all I could say would be conjecture.
But the reboot still complained about the same "root device" problem.
now we at least showed 'dpkg -i' did the same thing to the menu.lst as I did manually before. The problem might be somewhere else.
Maybe it's time for me to try to recompile with "y" to the drivers. Are there any specific drivers that need to be built in? Did you mean SCSI drivers or something else?
Quote:
Originally Posted by Quakeboy02
Well, it's your machine, bit it wouldn't really take that long to run dpkg -i again and see whether it's updating menu.lst. If it is, and if it's like Debian, then it will put the new entries (regular and single-user) at the beginning of the boot list. If it's not then something is more than normally odd.
The answer is that the kernel doesn't know nor care. That's up to grub/lilo/whatever your boot loader is and how it's configured. I've never studied bootloaders so all I could say would be conjecture.
<i>Maybe it's time for me to try to recompile with "y" to the drivers. Are there any specific drivers that need to be built in? Did you mean SCSI drivers or something else?</i>
Just say "y" (or probably hit space till it goes to "*") to whichever SATA controller it is that you have. That should be all that's needed. If that still doesn't work, then I don't know.
However there might be one more small problem: I saw a plain text login prompt. But I could type anything the screen jumped to a low resolution Ubuntu login screen. And I logged in using my existing Ubuntu account. Once in, 'uname -r' showed the right kernel version 2.6.25.9!
I think got it booted up. But the Ubuntu screen is puzzling to me. Maybe this is the Ubuntu way.
Anyways thanks very much for sticking with me so long. You were right about the SATA controller.
I might go back to try the traditional way again using the same .config file for the debian build.
Quote:
Originally Posted by Quakeboy02
<i>Maybe it's time for me to try to recompile with "y" to the drivers. Are there any specific drivers that need to be built in? Did you mean SCSI drivers or something else?</i>
Just say "y" (or probably hit space till it goes to "*") to whichever SATA controller it is that you have. That should be all that's needed. If that still doesn't work, then I don't know.
However there might be one more small problem: I saw a plain text login prompt. But I could type anything the screen jumped to a low resolution Ubuntu login screen.
I'd say anything is possible between the time gdm is started and when you get the GUI login prompt. Sometimes I see the NVIDIA logo, sometimes not. Since I don't use spash, I see all the stuff scrolling by before it switches to graphical mode, but generally the last thing I see is the start gdm command. Meh. No problem.
Quote:
And I logged in using my existing Ubuntu account. Once in, 'uname -r' showed the right kernel version 2.6.25.9!
Glad to see it, but I've missed something along the way. Sorry.
Quote:
I might go back to try the traditional way again using the same .config file for the debian build.
Whatever boats your float. I'm just happy to see you get something working. I wish I knew what the issue was with the initramfs, though.
Just FYI: my traditional build now also booted up with the same .config file I used in the Ubuntu build. Now I am ready to start play with the kernel. I think I might go to get the latest kernel to start with.
Quote:
Originally Posted by Quakeboy02
I'd say anything is possible between the time gdm is started and when you get the GUI login prompt. Sometimes I see the NVIDIA logo, sometimes not. Since I don't use spash, I see all the stuff scrolling by before it switches to graphical mode, but generally the last thing I see is the start gdm command. Meh. No problem.
Glad to see it, but I've missed something along the way. Sorry.
Whatever boats your float. I'm just happy to see you get something working. I wish I knew what the issue was with the initramfs, though.
Just FYI: my traditional build now also booted up with the same .config file I used in the Ubuntu build. Now I am ready to start play with the kernel. I think I might go to get the latest kernel to start with.
Glad to hear something is working right for you, though I'm still bugged that initramfs clearly isn't working. Have fun! 2.6.27.2 seems to be good.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.