Cant boot a compiled kernel
Hi,
I want to use Arch to mess with the source of linux 3.2.7. Unfortunately, I cannot even get the regular 3.2.7 kernel to boot.
I basically followed the guide at:
https://wiki.archlinux.org/index.php/Ke … raditional
I downloaded the source, did make mrproper, make menuconfig, make all and make modules_install. I copied arch/x86/bzImage to /boot as well as System.map and created a cpio ramdisk using mkinitcpio using
mkinitcpio -g /boot/initramfs-test.img -k 3.2.7-test
In the end my /boot contained:
initramfs-test.img
vmlinuz-test
System.map-test
I tried booting with Syslinux, GRUB and GRUB2 modifying the options for all of them appropriately.
For Syslinux and GRUB if use a UUID in the root field for their respective config files I get the error that the root device cannot be found during boot. If I use root=/dev/sda4 (which is my root partition, checked it using stat /dev/sda4) I successfully mount the root partition but get an error that /sbin/init does not exist. That's weird since /sbin/init is there. I believe both of these errors have something to do with ramdisk but not sure what.
With GRUB2 booting just freezes at "Loading init ramdisk".
I read a ton on these errors online and tried all kinds of stuff and could not get it to work. Any help will be greatly appreciated!
Thanks
Thanks tomk and sorry for the ambiguous post.
I actually managed to get it finally running, I basically screwed up my .config file. This was not obvious to me at all (total noob at compiling kernels). I just used my current arch config file instead of messing with menuconfig myself and it worked. I still don't know why it works, so if you could point me to a source of enlightenment I would appreciate that. Right now compilation time is atrocious even with the -j option for make.
Regarding your question, I want to screw around with the latest pax patch and add some hooks of my own to security.h which is why I need 3.2.7.
Thanks again
Similar Messages
-
How to edit GRUB for boot new compile kernel?
I compile the newest Linux kernel.
I read Archlinux wiki about how to edit GRUB for boot new compile kernel,
but Archlinux wiki do not reference to it.
Who can help me, baby?bangkok_manouel wrote:
how did you build your kernel? traditional way or arch way?
if it's the arch way (TM), here's an example of a custom kernel with -mm patch.
what I have in /boot:
-rw-r--r-- 1 root root 4.3M 2008-12-23 09:52 kernel26mm-fallback.img
-rw-r--r-- 1 root root 668K 2008-12-23 09:52 kernel26mm.img
-rw-r--r-- 1 root root 764K 2008-12-22 18:44 System.map26mm
-rw-r--r-- 1 root root 1.7M 2008-12-22 18:44 vmlinuz26mm
now here's the /boot/grub/menu.lst related entry (you may add the fallback one):
# (2) Arch Linux
title kernel26mm
root (hd0,0)
kernel /vmlinuz26mm root=/dev/sda5 ro vga=773
initrd /kernel26mm.img
Should be traditional way. -
Cant boot into 64bit Kernel on a Unibody 13" Macbook (late 2008)
Hi
I've just upgraded to Snow Leopard (which went flawlessly) but I wanted to try out the 64-bit.
Using terminal the following command ioreg -l -p IODeviceTree | grep firmware-abi I receive "firmware-abi" = <" and System Profiler, both say 64bit isn't supported.
This is a Unibody late 2008 Macbook (13"). I've tried every which way apart from messing with the EFI (which I have no idea about).
Also I upgraded the OS so it wasn't a fresh install, I don't know if this affects anything?
Thank you in advice to anyone that can shed some light on this
CheersThere's an update over at netkas.org which provides instructions on how to enable the 64-bit kernel in Snow Leopard for the Unibody MacBooks, which seem to be inhibited in booting up with this capability due to an artificial restriction in the Boot.efi:
http://netkas.org/?p=189#comments
The procedure involves downloading a modified Boot.efi file and entering some commands in Terminal.
However, I haven't been able to get it to work on my Unibody MacBook because after entering the final command in Terminal:
"sudo bless −−folder /System/Library/CoreServices/ \
−−file /System/Library/CoreServices/boot64.efi"
I receive a "No Volume specified" error message.
If anyone can get this to work on their systems I would be grateful for some help. It seems you can't simply copy and paste the commands given in the blog but need to manually enter "--" within the last command. I'm not sure if the proper entry consists of two dashes, one after the other, or the "¨" key which is located directly below the "!" on my (Swiss German) keyboard. -
Kernel Panic during restart and cant boot from DVD/CD
ah.. I have a pickle here guys. PowerBook G4 15 inch 1.67 1gbDDR2 ram. I just got this sucker like 2 months or less ago. I am not getting Kernel Panic during restarts every time and cant boot from a DVD or CD. they are not burned. here is the panic.log.
Darwin Kernel Version 8.4.0: Tue Jan 3 18:22:10 PST 2006; root:xnu-792.6.56.obj~1/RELEASE_PPC
Tue Jan 24 21:56:32 2006
panic(cpu 0 caller 0x00294084): sbflush sb->sb_so already null sb=239766c
Latest stack backtrace for cpu 0:
Backtrace:
0x00095718 0x00095C30 0x0002683C 0x00294084 0x00293678 0x002935A0 0x00292EE0 0x00159A90
0x0014F7D0 0x001504C0 0x0013B0B4 0x0013B1C8 0x0011D308 0x000A9894
Proceeding back via exception chain:
Exception state (sv=0x2D203280)
PC=0x00000000; MSR=0x0000D030; DAR=0x00000000; DSISR=0x00000000; LR=0x00000000; R1=0x00000000; XCP=0x00000000 (Unknown)
Kernel version:
Darwin Kernel Version 8.4.0: Tue Jan 3 18:22:10 PST 2006; root:xnu-792.6.56.obj~1/RELEASE_PPC
can any one help me out here, tomorrow I am going to boot it into target disk mode and install from a G5 onto the powerbooks HD doing a CLEAN install and then I am going to try booting it from a DVD and doing another CLEAN intstall just cause I dont trust a firewire install for some reason. I would like to avoid all this mess if possible. ANY HELP PLEASE, either respond or email me tend0 at mac dot com. thankshaha oh man thanks for startin slow with me, but we are passed that tested RAM, start up items, prefs, tried makin a new user account, as I stated before I can not boot from a DVD/CD.. that was one of the problems so I cant run anything that involves tageting the main HDD while its mounted. I have also repaired perms, ran fsck, tried booting up DiskWarrior(didnt boot from the CD), etc. if any one knows this perticular kernel panic string and can point out what the conflict is I can resolve it but other than that I have ran the run of the mill check to see if everything is in order procedure again and again.
-
Update modules with compiling kernel from soure issue.
Compiling kernel from abs or aur take me much time, so i decide compile kernel from source, compilation and installation successfully but make initial RAM disk doesn't update full modules (crypto,lvm...). I specified -c option to /etc/mkinitcpio.conf but the result is the sam, non-autodectec doesn't help too. When i look into /lib/modules directory, 3.6.6-1-ARCH folder contain "kernel" folder which has a lot of things (arch, crypto, net..) and i think this is my extra modules were declared in HOOK array's mkinitcpio.conf. The another one only contain net folder so i can't boot into this kernel without having loaded others.
any suggestion for this problem? tks for reply.am sorry, i re-tried with HOOK array without autodectect and it can load modules but there are two error:
==> ERROR: module not found: `dm-crypt`
==> ERROR: modules not found: `dm-snapshot`
ok i will try to load these modules by manually.
EDIT: i tried to load dm-mod, dm-crypt, dm-snapshot but it isn't helpful. Errors still remain. any suggestion?
Last edited by angelfalls (2012-11-12 23:33:53) -
I have compiled a few kernels in an environment in which it's designed to run on - but cross compiling is completely new to me. However - I will persevere because I have wanted to learn this for a while now.
The target system is an arm based board for a NAS. I am using QEMU to install and configure a Debian system but it requires a working kernel in order to boot.
I have installed the arm-elf-gcc-base package (which I assume is the toolchain - am I wrong on this?) but I don't know where to go from there.
How do I invoke this particular toolchain to compile a kernel for the target arch?
Any other pointers or 'gotchas' would be greatly appreciated.
Thank you.Which board is it?
Even if you manage to cross compile, kernel will need some extra configuration or patching to boot in qemu.
I have Raspberry Pi and qemu needs custom kernel to boot RPi images, but it's almost useless since there is
no support for network adapter. I have never cross compiled anything for it, but you might want to read on RPi
kernel cross compilation since there is a lot of documentation and you probably need just a different toolchain.
What I'm doing is distributed cross compiling via distcc. That way most of work gets done on my laptop, but it's
still quite slow because makepkg doesn't support distcc pump for distributing pre-processing.
I'm using toolchain provided by Arch Linux ARM project because I run Arch on RPi. If you can find crosstool config for
your board, making toolchain shouldn't be too difficult. This should get you started. -
Re-compile kernel(2.4.22) with Con Kolivas & gcc 3.3.1
Help!
Has anyone figured-out how to compile 2.4.22 with gcc 3.3.1?
I've successfully applied Con Kolivas -ck2 patches+fixes from http://kernel.kolivas.org but I have multiple 'unresolved symbols' after re-boot on new kernel.
If not, what would you recommend to do to get it compiled properly?
Thanx.OK -- it worked better with gcc-3.2.1-1. I used the exact same kernel and config. The only unresolved symbols are:
.../drivers/atm/he.o
.../drivers/net/sk98lin/sk98lin.o
I read around on Google that while the kernel will compile under gcc3, not all the drivers will(!?).
I suppose I don't need those two drivers for my SONY PCG-F490 laptop, anyway, so I may just take them out and try again.
Curious, though, does anyone else have ideas/suggestions about this? Should I upgrade to gcc-3.3.1, again, and re-compile to get a second/third result for cross-comparison?
Hmmm......ponderous.
Thanx for your thoughts. -
A PKGBUILD that helps you compile kernel from local source tree
I don't know if someone did this beofore. Hours ago I wrote a PKGBUILD file for compiling kernel,
it is different than the one from abs. It allows you
compile a kernel from a exiting kernel source tree and leave it clean.
honor the Archway, this means you have a clean filesystem
It is acutally because I'm currently playing with The Eudyptula Challenge.
and I'm tied our compress/decompress a kernel tree all the time. If you are kernel developer, you
may also find it useful.
The PKGBUILD file worked on my machine, I will add headers and docs later.
Oh, almost forgot: here is my PKGBUILD:
#So we will have a clean src tree
pkgbase=linux-test
_kernel_bin=kernel_build
#the variable you have to provide
_builddir=kernel_build
kernel_src_dir='/home/developer/Courses/kernel-base'
_srcname=kernel_tree
#end the variable you have to provide
pkgver=3.8.1
pkgrel=1
pkgdesc="The Linux kernel and modules"
depends=('coreutils' 'linux-firmware' 'kmod' 'mkinitcpio>=0.7')
makedepends=('xmlto' 'docbook-xsl' 'kmod' 'inetutils' 'bc')
optdepends=('crda: to set the correct wireless channels of your country')
provides=("kernel26${_kernelname}=${pkgver}")
conflicts=("kernel26${_kernelname}")
replaces=("kernel26${_kernelname}")
arch=('i686' 'x86_64')
url="http://www.kernel.org/"
license=('GPL2')
source=(#if we provide this, means kernel compile progress is already done
"${_kernel_bin}.tar.xz"
'linux.preset'
sha256sums=('65847bc847344434657db729d2dde4a408e303ea29ae1409520cecee8da6fc3d'
'2c2e8428e2281babcaf542e246c2b63dea599abb7ae086fa482081580f108a98')
#this one strip the linux off
_kernelname=${pkgbase#linux}
prepare() {
#XXX:checked
#build dir has to be the same as kernel_bin files, then builddir is created
#automatically by tar
if [ "${kernel_src_dir}" == "" ];then
return 1
fi
#provide kernel source tree for compile and move modules
ln -s ${kernel_src_dir} ${srcdir}/${_srcname}
mkdir -p "${srcdir}/${_srcname}"
#we need to check here if there exist kernel bin files
if [ "${_kernel_bin}" == "" ]; then
make O="${srcdir}/${_builddir}" menuconfig
fi
build() {
#XXX:checked
cd "${srcdir}/${_srcname}"
#we need to check here if there exist kernel bin files
if [ "${_kernel_bin}" == "" ]; then
#return 1
make O="${srcdir}/${_builddir}" bzImage modules
fi
#otherwise this step is done already done
_package() {
#we dont need to worry about mkinitcpio, depmod thing, They are done by
#install script, we need to provide a preset and install file instead.
#we build kernel objs on _builddir, and install them in pkgdir
#install binary files, this means we have a compiled binary tree
cd "${srcdir}/${_srcname}"
#echo "$(pwd)"
KARCH=x86
install=linux.install
# get kernel version
_kernver="$(make O="${srcdir}/${_builddir}" kernelrelease)"
_kernver=$(echo "${_kernver}" | sed -n 2p -)
#strip the -dirty away
_kernver=${_kernver%-*}
_basekernel=${_kernver%%-*}
_basekernel=${_basekernel%.*}
mkdir -p "${pkgdir}"/{lib/modules,lib/firmware,boot}
make O="${srcdir}/${_builddir}" INSTALL_MOD_PATH="${pkgdir}" modules_install
cp "${srcdir}/${_builddir}"/arch/$KARCH/boot/bzImage "${pkgdir}/boot/vmlinuz-${pkgbase}"
# set correct depmod command for install
cp -f "${startdir}/${install}" "${startdir}/${install}.pkg"
true && install=${install}.pkg
sed -e "s/KERNEL_NAME=.*/KERNEL_NAME=${_kernelname}/" -i "${startdir}/${install}"
sed "s/KERNEL_VERSION=.*/KERNEL_VERSION=${_kernver}/" -i "${startdir}/${install}"
# install mkinitcpio preset file for kernel
install -D -m644 "${srcdir}/linux.preset" "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
sed \
-e "1s|'linux.*'|'${pkgbase}'|" \
-e "s|ALL_kver=.*|ALL_kver=\"/boot/vmlinuz-${pkgbase}\"|" \
-e "s|default_image=.*|default_image=\"/boot/initramfs-${pkgbase}.img\"|" \
-i "${pkgdir}/etc/mkinitcpio.d/${pkgbase}.preset"
# remove build and source links
rm -f "${pkgdir}"/lib/modules/${_kernver}/{source,build}
# remove the firmware
rm -rf "${pkgdir}/lib/firmware"
# gzip -9 all modules to save 100MB of space
find "${pkgdir}" -name '*.ko' -exec gzip -9 {} \;
# make room for external modules
ln -s "../extramodules-${_basekernel}${_kernelname:--ARCH}" "${pkgdir}/lib/modules/${_kernver}/extramodules"
# add real version for building modules and running depmod from post_install/upgrade
mkdir -p "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}"
echo "${_kernver}" > "${pkgdir}/lib/modules/extramodules-${_basekernel}${_kernelname:--ARCH}/version"
# Now we call depmod...
#echo "Call Depmod"
cp "${srcdir}/${_builddir}/System.map" System.map
depmod -b "${pkgdir}" -F System.map "${_kernver}"
#echo "Called Depmod"
# move module tree /lib -> /usr/lib
mkdir -p "${pkgdir}/usr"
mv "${pkgdir}/lib" "${pkgdir}/usr/"
# add vmlinux
install -D -m644 "${srcdir}/${_builddir}/"vmlinux "${pkgdir}/usr/lib/modules/${_kernver}/build/vmlinux"
pkgname=("${pkgbase}")
for _p in ${pkgname[@]}; do
eval "package_${_p}() {
_package${_p#${pkgbase}}
done
and here is the address of it on github
Last edited by xedchou (2014-12-23 12:41:55)Based on the title alone I almost reflexively binned this thread. Please rename this thread to *something* relating to what you're actually posting.
-
Problem with JDK 6 update 5 - Error Message says cant find java compiler
Hi i am a complete beginner to programming and i am having trouble with the latest java development kit. jdk 6 update 5.
The problem is i have set the path and the program cant find my compiler.
I have installed the latest java development kit 6 update 5 on my windows xp machine.
I have created a simple program as shown below:
class Hello
public static void main(String[] args)
System.out.println("Hello from java");
saved the file to my desktop as Hello.java
I have set the path variable like so:
Go to control panel then click system icon then click advanced tab then click environmental variables.
Now in system variables the path is shown as this - %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jdk1.6.0_05\bin;C:\Program Files\QuickTime\QTSystem\;c:\Program Files\Microsoft SQL Server\90\Tools\binn\
I then add this to the end;C:\Program Files\Java\jdk1.6.0_05\bin
This is the location to the things like compiler, applet viewer etc.
No in the command prompt i type javac Hello.java and i get this error message:
C:\> javac Hello.java
javac: file not found: Hello.java
Usage: javac <options> <source files>
use -help for a list of possible options
The jdk is installed properly im sure but it can find my compiler.
What mistake have i made in setting the path because im guessing that is related to the problem?
Could someone out there please help me?
Thank You
Rafeeqsaved the file to my desktop as Hello.java
C:\> javac Hello.javaC:\ is not the desktop!
The jdk is installed properly im sure but it can find my compiler.Of course it can! It just can't find the file you are trying to compile, because that's not in the root directory.
I suggest you make a directory C:\java and save your source file there rather than on the desktop. In the command prompt, enter cd \java to make it the current working directory and then enter javac Hello.java.
@Pravin: The question is about compiling, not running. CLASSPATH has nothing to do with this problem.
db -
Macbook pro cant boot from external dvd device please help !!!!
hello everyone please help me i have macbook pro 2011 core i5 version
i just installed 2.5 ssd as second hdd
i cant boot from external dvd device to install any os the external dvd keeps on spining and mac is just thinking it doesnt show press any key to install
it shows the device when a boot into mac parition
i am trying to install windows on origianl 500 gb hdd and linux on ssd
but not luck
the external dvd drive works i pluged into my pc and it works
please help thansk in advance
200 gb mac
300 gb windows
120 ssd linuxI do not know about Disk Warrior but if you have a compatible OSX on an external HDD you certainly can boot the MBP. Use startup manager:
https://support.apple.com/en-us/ht1310
Ciao. -
[Solved] Cant boot after editing fstab ( virtualbox )
what information do i need to post here to help, and how do i get it since i cant boot in ?
Last edited by Shockwave0 (2013-11-07 00:48:14)im using openbox i opened up /etc/fstab with leafpad heres what it looks like
# /etc/fstab: static file system information
# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda1
UUID=aff5b1d2-0452-467f-81e7-dc3b2298101e / ext4 rw,relatime,data=ordered 0 1
# /dev/sda3
# UUID=1519cef9-0d8d-4ea4-b9d5-cc94b09cd59a none swap defaults 0 0
Last edited by Shockwave0 (2013-11-07 00:05:54) -
"boot: cannot open /kernel/unix" error
Installing solaris 2.6 on Sparc Ultra 5. I currently have 2.8 installed and I want to install 2.6 over top. Using "OK boot cdrom" I get an error on startup stating "boot: cannot open /kernel/unix". I have found the troubling shooting tip but I don't know how to implement it. It says to "Reset the boot file in the PROM to " " (blank)." I do not know how to do this. Any help would be good.
Hi ,
On OK prompt, use printenv command to check current setting. Use command setenv boot-file "" to change the settings on OK prompt.
This should help you.
Thanks,
sdD -
I have installed windows on the new NTFS partician and cant boot it back to mac
I have installed windows on the new NTFS partician and cant boot it back to mac. I dont think I loaded the bootcamp for windows properly now it is stuck in Windows with no bootcamp icon
Restart Windows, hold down the option key.
If you have a valid OSX install, the drive should appear. Choose the OSX partition and continue. -
hi
ive been running a G4 tower 800mhz at work from an external lacie firewire drive with the latest tiger without any trouble so far.
however, since i took that drive home and connected it to my cube there to transfer some files, i cant boot from it any more.
the drive is completely fine and all my files are ok. just since i reconnected it at work, it doesnt boot anymore
it gets stuck at a standard blue apple desktop background.
ive done most of the things i could think of, including:
- removing any startup items
- single-user mode with some codes to reset vram etc
- verbose mode doesnt give suspicious messages
- verifying the disk using disk utility doesnt give errors
- no third-party ram
any help? what can i do to make my disk bootable again?
any ideas why it became unbootable just by connecting it to another mac for like an hour or so?
thanks a lot for suggestions
maartenno i didnt boot the cube from the external firewire drive. just connected it. went into my home folder on there, copied the files over, and disconnected it again
didnt do anything more with it
archive and install. sure a solution, but quite a pain. id prefer to find out whats wrong. i thought it might have to do something with permissions, but i repaired those and it didnt change anything. still stuck on startup....
maarten -
Cant boot winxp installed to hdc3.
I cant boot WinXP. I have just installed it to hdc3 (equivalent to (hd2.2) for grub), and this is what I put in menu.lst:
(1) WindowsXP
title WindowsXP
map (hd0) (hd2)
map (hd2) (hd0)
rootnoverify (hd0,2)
makeactive
chainloader +1
but this only results in message:
Selected device does not exist.
I have tried all sorts of combinations, such as putting rootnoverify (hd2,2) before the map lines, etc. Searched other forums, google... But nothing.
The other message I get from some other combinations is:
Invalid or unsupported executable format.
any help?
edit: the hdc3 partition is also set to be bootablethats what i originally used, but of course its:
selected device does not exist
what's goofy?
http://www.google.com/search?client=ope … q=grub+map
Maybe you are looking for
-
Hi I copied our entire music folder from our old pc on to the new imac, and all the apps, music etc is there, but no individual libarys, we had 5 very different ones, when pressing and holding the alt key on opeing itunes, nothing happens it just ope
-
Trying to start developing but can't get the compiter set up correctly
Hey guys, I'm following the starling tutorial step by step (http://tv.adobe.com/watch/starting-with-starling/starting-with-starling-introduction-and-s etup/" but I always keep getting errors no matter what, seems like I just can't get the sources/new
-
Complete code for loading swf file in actionscript 3
i have a swf file which i want to load into a fla file and export as a new swf file. I understand this part but my actionscript 3.0 code that i put on frame one of the timeline does not work. I have tried every version i have seen online including in
-
My photo in aperture show aperture is 11,But when I upload photo to mobile gallery ,aperture change to 7
-
Photo stream - Photos not showing
Can anybody help with this problem please? In iphotos when i select photos on the left hand menu it shows 1489 photos which i presume is the content of photo stream. if I select photo stream on my iphone its only shows 219 photos so i obviously cant