LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-08-2005, 12:15 PM   #1
Basel
Member
 
Registered: Feb 2004
Location: United States
Distribution: Ubuntu 10.10
Posts: 319

Rep: Reputation: 30
Unhappy Cross compiled kernel-2.6.13 for x86-64 arch stops booting under Slackware-10.1


Hi everyone,

Why does the kernel stop booting after freeing 200k of memory? I am trying to compile a 64-bit kernel for my AMD64.
I tried to use the same .config file to compile a kernel for the i686 architecture and it worked just fine. In fact, I am currently running the i686 kernel.


I forgot to mention one important point: After the kernel stops booting I can write whatever I want but nothing is executed. I can even use Ctrl+Alt+Delete to reboot the machine.


Code:
ReiserFS sda3: found reiserfs format "3.5" with standard journal
ReiserFS sda3: using ordered data model
ReiserFS sda3: journal params: device sda3, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
ReiserFS sda3: checking transaction log (sda3)
ReiserFS sda3: using r5 hash to sort names
VFS: mounted root (reiserfs filesystem) readonly.
Freeing unused kernel memory: 200k freed
I used the following commands to configure and compile the kernel:
Code:
basel@slackware:~/tmp/linux-2.6.13$ make CROSS_COMPILE=/cross-tools/bin/x86_64-pc-linux-gnu- ARCH=x86_64 menuconfig
basel@slackware:~/tmp/linux-2.6.13$ make CROSS_COMPILE=/cross-tools/bin/x86_64-pc-linux-gnu- ARCH=x86_64 && echo done_make
root@slackware:~/tmp/linux-2.6.13-x86_64$ cp arch/x86_64/boot/bzImage /boot/vmlinuz-x86_64
root@slackware:~/tmp/linux-2.6.13-x86_64$ cp .config /boot/config-x86_64
root@slackware:~/tmp/linux-2.6.13-x86_64$ cp System.map /boot/System.map-x86_64
root@slackware:/home/basel/tmp/linux-2.6.13# rm -f /boot/System.map /boot/config /boot/vmlinuz
root@slackware:/home/basel/tmp/linux-2.6.13# cd /boot/
root@slackware:/boot# ln -s vmlinuz-x86_64 vmlinuz
root@slackware:/boot# ln -s config-x86_64 config
root@slackware:/boot# ln -s System.map-x86_64 System.map
I have added the following section to /etc/lilo.conf
Code:
# Linux bootable partition config begins
image="/boot/vmlinuz-x86_64"
        root="/dev/sda3"
        label="Kernel-x86_64"
  read-only
# Linux bootable partition config ends
And then I run lilo:
Code:
root@slackware:/boot# lilo -v
LILO version 22.5.9, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2004 John Coffman
Released 08-Apr-2004 and compiled at 00:18:50 on May 21 2004.

Warning: LBA32 addressing assumed
Reading boot sector from /dev/sda
Using MENU secondary loader
Calling map_insert_data
Mapping message file /boot/boot_message.txt
Calling map_insert_file

Boot image: vmlinuz-ide-2.4.29
Added Slackware-10.1

Boot image: /boot/vmlinuz-2.6.13
Added Kernel-2.6.13 *

Boot image: /boot/vmlinuz-x86_64
Added Kernel-x86_64

Writing boot sector.
/boot/boot.0800 exists - no boot sector backup copy made.
root@slackware:/boot#
 
Old 09-08-2005, 03:30 PM   #2
cb951303
Member
 
Registered: Jan 2004
Distribution: Slackware 11 + Dropline Gnome 2.16
Posts: 194

Rep: Reputation: 30
can you try to compile 64bit alone, so you can see if cross-compile is the problem....
 
Old 09-09-2005, 05:33 AM   #3
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
I have two thoughts on this topic:

1. You've forgotton to deal with the modules?

Code:
~# CROSS_COMPILE=/cross-tools/bin/x86_64-pc-linux-gnu- ARCH=x86_64 make
~# CROSS_COMPILE=/cross-tools/bin/x86_64-pc-linux-gnu- ARCH=x86_64 make modules_install
~# CROSS_COMPILE=/cross-tools/bin/x86_64-pc-linux-gnu- ARCH=x86_64 make install
make install runs the install.sh script found in: $YOURLINUXSRCDIR/arch/$ARCH/boot/install.sh

It basically copies System.map and bzImage into /boot and runs lilo for you. I usually tweak mine, or at least check it's doing what I want it to. I'm so lazy =D

2. You've forgotton to enable ia32 binary support in your kernel - this'll mean it can't use 32-bit programs, which will be a problem when trying to boot your 32-bit system.

- Piete.
 
Old 09-09-2005, 11:46 AM   #4
Basel
Member
 
Registered: Feb 2004
Location: United States
Distribution: Ubuntu 10.10
Posts: 319

Original Poster
Rep: Reputation: 30
Quote:
1. You've forgotton to deal with the modules?
My current kernel configurations does not have any option set as a module. That is why I did not run 'make install_modules'

Quote:
2. You've forgotton to enable ia32 binary support in your kernel - this'll mean it can't use 32-bit programs, which will be a problem when trying to boot your 32-bit system.
That is a possibility since the kernel stops booting at the point when it should execute the init scripts for Slackware.
How do I enable the 32 binary support? Is it the followingl line under the .config file?
Code:
basel@slackware:~/tmp/linux-2.6.13-x86_64$ grep IA32 .config
# CONFIG_IA32_EMULATION is not set
 
Old 09-09-2005, 12:57 PM   #5
Basel
Member
 
Registered: Feb 2004
Location: United States
Distribution: Ubuntu 10.10
Posts: 319

Original Poster
Rep: Reputation: 30
Thanks Piete. I am currently running the x86_64 kernel under Slackware 10.1
Code:
basel@slackware:~$ uname -a
Linux slackware 2.6.13 #2 Fri Sep 9 17:20:06 UTC 2005 x86_64 unknown unknown GNU/Linux
What I did was to change
Code:
# CONFIG_IA32_EMULATION is not set
into
Code:
CONFIG_IA32_EMULATION=y
 
  


Reply



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
problems booting compiled 2.6.11 kernel monkeyman2000 Debian 7 05-28-2005 07:16 PM
has anyone successfully compiled a kernel for a diff arch. other than i386? veritas Slackware 4 06-16-2004 05:19 PM
Slackware stops booting... Linux~Powered Linux - Games 2 01-27-2004 05:05 AM
loaded slackware, won't finish booting. stops at cs: IO Port probe Whitehat Slackware 5 10-15-2003 03:18 PM
Stops booting after unpressing kernel RH 8.0 Nevyn2 Linux - General 9 04-11-2003 12:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 10:46 PM.

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
Open Source Consulting | Domain Registration