[SOLVED] Re: problem running kernel compiled on different machine

2010-05-31 Thread H.S.
Cameron Hutchison wrote:
> "H.S."  writes:
> 
>> Here are the grub.cfg stanzas for the current running kernel and for my
>> compiled kernel respectively:
>> #the default debian kernel
>>initrd  /initrd.img-2.6.32-trunk-686
> 
>> #kernel compiled by me the Debian way
>>initrd  /initrd.img-2.6.32-100528-firewire
> 
> Two things I can think to do next:
> 
> 1) Change the initrd of your kernel to point to the original initrd. I
> dont know much about initrds (because I build all I need to boot into my
> kernels), but their purpose it to set up the kernel to get the right
> modules loaded to bootstrap the root filesystem. Since it looks like
> your problems _may_ be there, I'd try the original initrd (I say _may_
> because it looks to me like the rootfs is mounted, but it is failing to
> mount your other filesystems listed in /etc/fstab)
> 
> 2) Boot your new kernel and get to the emergency shell. diff the two
> kernel configs (the working one and your new one) and see if they differ
> (run diff -u). If they do differ, you can start to look into why.
> 
> 




The kernel is still compiled the same way as last: config from target,
compiled on host, using initrd option.

But what is different now is that in the target machine I have changed
all the partitions from /dev/hdann (where nn is a number) to their
respective UUIDs. The same kernel is now working without problems.

Still, I would like to know what determines this behavior in the kernel.
If somebody can explain it, it would be great.

Cameron, you mentioned the possible problem in fstab and legacy drivers.
That is what led me to try this and that is what seems to have done the
trick (I don't think the source of config should matter in my case). Thanks.


-- 

Please reply to this list only. I read this list on its corresponding
newsgroup on gmane.org. Replies sent to my email address are just
filtered to a folder in my mailbox and get periodically deleted without
ever having been read.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/hu0j9e$to...@dough.gmane.org



Re: problem running kernel compiled on different machine

2010-05-30 Thread Sven Joachim
On 2010-05-31 08:14 +0200, Cameron Hutchison wrote:

> "H.S."  writes:
>
>>Here are the grub.cfg stanzas for the current running kernel and for my
>>compiled kernel respectively:
>>#the default debian kernel
>>initrd  /initrd.img-2.6.32-trunk-686
>
>>#kernel compiled by me the Debian way
>>initrd  /initrd.img-2.6.32-100528-firewire
>
> Two things I can think to do next:
>
> 1) Change the initrd of your kernel to point to the original initrd.

This will not work because the new kernel expects its modules under
/lib/modules/2.6.32-100528-firewire, but they are under
/lib/modules/2.6.32-trunk-686 in the old initrd.

Sven


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87iq64zj4b@turtle.gmx.de



Re: problem running kernel compiled on different machine

2010-05-30 Thread Cameron Hutchison
"H.S."  writes:

>Here are the grub.cfg stanzas for the current running kernel and for my
>compiled kernel respectively:
>#the default debian kernel
>initrd  /initrd.img-2.6.32-trunk-686

>#kernel compiled by me the Debian way
>initrd  /initrd.img-2.6.32-100528-firewire

Two things I can think to do next:

1) Change the initrd of your kernel to point to the original initrd. I
dont know much about initrds (because I build all I need to boot into my
kernels), but their purpose it to set up the kernel to get the right
modules loaded to bootstrap the root filesystem. Since it looks like
your problems _may_ be there, I'd try the original initrd (I say _may_
because it looks to me like the rootfs is mounted, but it is failing to
mount your other filesystems listed in /etc/fstab)

2) Boot your new kernel and get to the emergency shell. diff the two
kernel configs (the working one and your new one) and see if they differ
(run diff -u). If they do differ, you can start to look into why.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/113d.4c0353c8.2c...@getafix.xdna.net



Re: problem running kernel compiled on different machine

2010-05-30 Thread H.S.
Cameron Hutchison wrote:
> "H.S."  writes:

> You can ignore these two errors. You are installing the kernel on a
> different machine to the one you built on, so those links do not work.
> That is why it deletes the links.

Okay.


>> Anybody know why I am getting this error? Also AFAIK, a 32 bit kernel
>> can be compiled on a 64 bit machine as long as it is running a 32 bit
>> OS. Correct?
> 
> Correct.
> 
>> Use menuconfig to load the current config from /boot and save and exit
>> $> cp /boot/config-`uname -r` ./.config
> 
> This looks like you are copying the config from the build machine, not
> your target. Can you confirm you actually copied the config from the
> target machine?

Initially, I was using the config from the host (build) machine. I have
since repeated the kernel compilation by using target machine's config
as well. No change in the results.


>> Then apply the patch
>> $> patch --verbose -p1 < patches-hs/firewire_trv25_bug.patch
> 
> I assume there's a typo there? Should be ../patches-hs/... and you
> should be in the linux directory if you are using patch -p1

Yes, perhaps it is a typo, but the patch actually was applied successfully.


> Otherwise it looks you've done it right.
> 
> In your later post, you show errors trying to mount /dev/hda4. The
> /dev/hd* driver is the legacy PATA driver (CONFIG_IDE). The newer driver
> based on libata (CONFIG_ATA - both SATA and PATA) uses /dev/sd* .
> 
> It looks like your fstab is set up to mount partitions based on the
> legacy driver, but you are probably using the new driver. I'd say you
> are not using the same config from the target when building the new
> kernel. Is your old target kernel also 2.6.32?

I have used the config from the target machine as well. Same results.

Host (build) machine:
Debian Unstable, AMD64 CPU, running 2.6.32-5-686-bigmem
Target machine:
Debain Testing, Intel 32 bit, currently running 2.6.32-trunk-686

Here are the grub.cfg stanzas for the current running kernel and for my
compiled kernel respectively:
#the default debian kernel
menuentry "Debian GNU/Linux, with Linux 2.6.32-trunk-686" --class debian
--class gnu-linux --class gnu --class os {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set
9db23921-b7bc-4f1f-8b31-306f2126af0e
echoLoading Linux 2.6.32-trunk-686 ...
linux   /vmlinuz-2.6.32-trunk-686
root=UUID=0300e89b-ae92-43f5-b1f0-0d53c2b589ca ro vga=792 quiet
echoLoading initial ramdisk ...
initrd  /initrd.img-2.6.32-trunk-686
}
#kernel compiled by me the Debian way
menuentry "Debian GNU/Linux, with Linux 2.6.32-100528-firewire" --class
debian --class gnu-linux --class gnu --class os {
insmod ext2
set root='(hd0,5)'
search --no-floppy --fs-uuid --set
9db23921-b7bc-4f1f-8b31-306f2126af0e
echoLoading Linux 2.6.32-100528-firewire ...
linux   /vmlinuz-2.6.32-100528-firewire
root=UUID=0300e89b-ae92-43f5-b1f0-0d53c2b589ca ro vga=792 quiet
echoLoading initial ramdisk ...
initrd  /initrd.img-2.6.32-100528-firewire
}


Thanks.


-- 

Please reply to this list only. I read this list on its corresponding
newsgroup on gmane.org. Replies sent to my email address are just
filtered to a folder in my mailbox and get periodically deleted without
ever having been read.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/htvj6q$c6...@dough.gmane.org



Re: problem running kernel compiled on different machine

2010-05-30 Thread Cameron Hutchison
"H.S."  writes:

>I am testing a patch for the Debian kernel (regarding the firewire bug I
>reported earlier in this list). I have been sent the patch and I
>followed the Debian way of compiling the kernel after patching the source.

>(  Here's is the installation error -->> )
> Hmm. There is a symbolic link /lib/modules/2.6.32.100528-firewire/build
> However, I can not read it: No such file or directory
> Therefore, I am deleting /lib/modules/2.6.32.100528-firewire/build

>(  Here's is the installation error -->> )
> Hmm. The package shipped with a symbolic link
>/lib/modules/2.6.32.100528-firewire/source
> However, I can not read the target: No such file or directory
> Therefore, I am deleting /lib/modules/2.6.32.100528-firewire/source

You can ignore these two errors. You are installing the kernel on a
different machine to the one you built on, so those links do not work.
That is why it deletes the links.

>Anybody know why I am getting this error? Also AFAIK, a 32 bit kernel
>can be compiled on a 64 bit machine as long as it is running a 32 bit
>OS. Correct?

Correct.

>Use menuconfig to load the current config from /boot and save and exit
>$> cp /boot/config-`uname -r` ./.config

This looks like you are copying the config from the build machine, not
your target. Can you confirm you actually copied the config from the
target machine?

>Then apply the patch
>$> patch --verbose -p1 < patches-hs/firewire_trv25_bug.patch

I assume there's a typo there? Should be ../patches-hs/... and you
should be in the linux directory if you are using patch -p1

Otherwise it looks you've done it right.

In your later post, you show errors trying to mount /dev/hda4. The
/dev/hd* driver is the legacy PATA driver (CONFIG_IDE). The newer driver
based on libata (CONFIG_ATA - both SATA and PATA) uses /dev/sd* .

It looks like your fstab is set up to mount partitions based on the
legacy driver, but you are probably using the new driver. I'd say you
are not using the same config from the target when building the new
kernel. Is your old target kernel also 2.6.32?


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1031.4c034c89.19...@getafix.xdna.net



Re: problem running kernel compiled on different machine

2010-05-30 Thread H.S.
H.S. wrote:
> H.S. wrote:
>> I am testing a patch for the Debian kernel (regarding the firewire bug I
>> reported earlier in this list). I have been sent the patch and I
>> followed the Debian way of compiling the kernel after patching the source.
>>
>> The kernel was compiled (and the deb created) on an AMD64 bit machine
>> which is running a 32 bit kernel (2.6.32-5-686-bigmem). The deb created
>> can be installed without any problems on this host machine. However, if
>> I try to install that deb on a target machine (Intell 32 bit processor),
>> the installation gives errors and I cannot boot into that kernel:
> 
> 
> Some more info. I tried the --initrd this time while compiling the
> kernel with the above mentioned patch. So different.

> 
> My next step is compile the ext3 support in the kernel and not as a
> module. 


Well, nothing has worked.

I have tried the config file from the host machine, with and without
compiling the file system options within the kernel (or as a module). I
have used config from the target machine, with and without compiling the
file system as compiled in (or as modules). I am getting the same error.
Basically, the boot fails at file system check.

Just a recap: I am trying to compile a kernel (on a machine running
Unstable) from linux-source-2.6.32 for a different machine (running
Testing). The compilation goes well, but I cannot boot in to the target
machine using the compiled kernel.

So, what am I missing here? Or this is a bug?



-- 

Please reply to this list only. I read this list on its corresponding
newsgroup on gmane.org. Replies sent to my email address are just
filtered to a folder in my mailbox and get periodically deleted without
ever having been read.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/htvgv9$79...@dough.gmane.org



Re: problem running kernel compiled on different machine

2010-05-30 Thread H.S.
H.S. wrote:
> I am testing a patch for the Debian kernel (regarding the firewire bug I
> reported earlier in this list). I have been sent the patch and I
> followed the Debian way of compiling the kernel after patching the source.
> 
> The kernel was compiled (and the deb created) on an AMD64 bit machine
> which is running a 32 bit kernel (2.6.32-5-686-bigmem). The deb created
> can be installed without any problems on this host machine. However, if
> I try to install that deb on a target machine (Intell 32 bit processor),
> the installation gives errors and I cannot boot into that kernel:


Some more info. I tried the --initrd this time while compiling the
kernel with the above mentioned patch. So different.

What I actually get while booting in the new kernel is a problem with
ext3 or something where the system cannot find ext3 and cannot mount my
partitions. The messages are similar to this (copied from a post elsewhere):
fsck.ext3: no such file or directory while trying to open /dev/hda4
/dev/hda4
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else) then the superblock


This is not the exact working, but close to what I get during the
reboot. The system than asks for root password for maintenance. I
eventually have to force a hardware restart of the system.

My next step is compile the ext3 support in the kernel and not as a
module. Currently, it is:
CONFIG_EXT3_FS=m
CONFIG_EXT3_DEFAULTS_TO_ORDERED=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y

I will change that to:
CONFIG_EXT3_FS=y


But what beats me is that the host machine has no problem with the
current config and boot properly.

Any further info as to what I am missing here?




-- 

Please reply to this list only. I read this list on its corresponding
newsgroup on gmane.org. Replies sent to my email address are just
filtered to a folder in my mailbox and get periodically deleted without
ever having been read.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/htv9r8$on...@dough.gmane.org



problem running kernel compiled on different machine

2010-05-30 Thread H.S.

I am testing a patch for the Debian kernel (regarding the firewire bug I
reported earlier in this list). I have been sent the patch and I
followed the Debian way of compiling the kernel after patching the source.

The kernel was compiled (and the deb created) on an AMD64 bit machine
which is running a 32 bit kernel (2.6.32-5-686-bigmem). The deb created
can be installed without any problems on this host machine. However, if
I try to install that deb on a target machine (Intell 32 bit processor),
the installation gives errors and I cannot boot into that kernel:

$> sudo dpkg -i
~/tmp/tmp/linux-image-2.6.32.100528-firewire_2.6.32.100528-firewire-10.00.Custom_i386.deb
Selecting previously deselected package linux-image-2.6.32.100528-firewire.
(Reading database ... 247095 files and directories currently installed.)
Unpacking linux-image-2.6.32.100528-firewire (from
.../linux-image-2.6.32.100528-firewire_2.6.32.100528-firewire-10.00.Custom_i386.deb)
...
Done.
Setting up linux-image-2.6.32.100528-firewire
(2.6.32.100528-firewire-10.00.Custom) ...


(  Here's is the installation error -->> )
 Hmm. There is a symbolic link /lib/modules/2.6.32.100528-firewire/build
 However, I can not read it: No such file or directory
 Therefore, I am deleting /lib/modules/2.6.32.100528-firewire/build

(  Here's is the installation error -->> )
 Hmm. The package shipped with a symbolic link
/lib/modules/2.6.32.100528-firewire/source
 However, I can not read the target: No such file or directory
 Therefore, I am deleting /lib/modules/2.6.32.100528-firewire/source

Running depmod.
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools
2.6.32.100528-firewire /boot/vmlinuz-2.6.32.100528-firewire
run-parts: executing /etc/kernel/postinst.d/pm-utils
2.6.32.100528-firewire /boot/vmlinuz-2.6.32.100528-firewire
run-parts: executing /etc/kernel/postinst.d/update-notifier
2.6.32.100528-firewire /boot/vmlinuz-2.6.32.100528-firewire
Running postinst hook script /usr/sbin/update-grub.
Generating grub.cfg ...
Found background image: moreblue-orbit-grub.png
Found linux image: /boot/vmlinuz-2.6.32.100528-firewire
Found initrd image: /boot/initrd.img-2.6.32.100528-firewire
Found linux image: /boot/vmlinuz-2.6.32-trunk-686
Found initrd image: /boot/initrd.img-2.6.32-trunk-686
Found linux image: /boot/vmlinuz-2.6.32-3-686
Found initrd image: /boot/initrd.img-2.6.32-3-686
Found linux image: /boot/vmlinuz-2.6.30-2-686
Found initrd image: /boot/initrd.img-2.6.30-2-686
Found linux image: /boot/vmlinuz-2.6.26-2-686
Found initrd image: /boot/initrd.img-2.6.26-2-686
Found Microsoft Windows XP Professional on /dev/hda1
Found Fedora release 9 (Sulphur) on /dev/hda13
done



Anybody know why I am getting this error? Also AFAIK, a 32 bit kernel
can be compiled on a 64 bit machine as long as it is running a 32 bit
OS. Correct?



The steps that I followed to compile and create the deb of the custom
kernel:
#
Downloaded kernel source:
$> sudo aptitude install linux-source-2.6.32

Removed symlink in /usr/src directory:
$> rm linux


Expanded the downloaded source tar ball:
$> tar jxf linux-source-2.6.32.tar.bz2


Now create the symlink
$> ln -s /path/to/linux-source-2.6.32 linux

So now "linux" points to our current kernel source tree.

Check for requirements by running the script in the kernel tree:
$> cd linux/scripts/
$> ./ver_linux
If some fields are empty or look unusual you may have an old version.
Compare to the current minimal requirements in Documentation/Changes.
NOTE: fdformat was not found (but we don't need it .. I think).


Use menuconfig to load the current config from /boot and save and exit
$> cp /boot/config-`uname -r` ./.config
$> make oldconfig
(no questions were asked by the last command)


Save the patch to be applied in a directory. I put it in
/usr/src/linux/patches_hs/firewire_trv25_bug.patch

Then apply the patch
$> patch --verbose -p1 < patches-hs/firewire_trv25_bug.patch


Start build commands sequence:
$> fakeroot make-kpkg clean

Use 2 cores:
$> export CONCURRENCY_LEVEL=2


$> time nice fakeroot make-kpkg --append-to-version=.100528-firewire
kernel_image

Remove symlink:
$> rm /usr/src/linux
rm: remove symbolic link `linux'? y
#


Thanks.

-- 

Please reply to this list only. I read this list on its corresponding
newsgroup on gmane.org. Replies sent to my email address are just
filtered to a folder in my mailbox and get periodically deleted without
ever having been read.


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/htuuo4$2d...@dough.gmane.org