Re: [gentoo-user] Re: kenel line in grub.conf when using initrd

2008-12-11 Thread Dirk Heinrichs
On Thursday 11 December 2008 19:04:21 Harry Putnam wrote:
> > Sure, we can give it a try.
>
> Please see the thread noted at the start of this message.
> If you are willing to continue.

Yep, will switch to that thread.

Bye...

Dirk



[gentoo-user] Re: kenel line in grub.conf when using initrd

2008-12-11 Thread Harry Putnam
"Heinrichs, Dirk (EXT-Capgemini - DE/Dusseldorf)"
 writes:

> Am Donnerstag, den 11.12.2008, 08:05 +0100 schrieb ext Heinrichs, Dirk
> (EXT-Capgemini - DE/Dusseldorf):
>> > I'll extract `exact' messages if you are willing to spend some time
>> on
>> > this.  But I suspect we should begin another thread with a subject
>> > that makes it clear this is about building a kernel for use inside a
>> > gentoo vmware appliance running on windows.
>> 
>> Sure, we can give it a try.
>
> Oh, I see you already did and got it solved. Fine.

Not!

I managed to hand build a kernel and initrd that booted but still have
not managed to build a trimmed down kernel that needs no initrd.

See thread:
 `Subject: Tragic kernel building for vmware gentoo guest on WinXP'




[gentoo-user] Re: kenel line in grub.conf when using initrd

2008-12-11 Thread Harry Putnam
"Heinrichs, Dirk (EXT-Capgemini - DE/Dusseldorf)"
 writes:

[...]

>> > What is the error message you get?

Posted in thread:
  Tragic kernel building for vmware gentoo guest on WinXP

[...]

> Did you try to examine the contents of that initrd with the one you
> produce. Maybe somthing is missing there. Could you post the .config
> here together with an "ls -Rl" output of the initrd contents. I suspect
> the drivers mentioned by Alan are compiled as modules and put into that
> initrd instead of just compiling them into the kernel. Would like to
> verify that.
>



[...]

>> I'm starting to wonder now if the vmappliance creator has put
>> something into the initrd that isn't the standard genkernel assembly.
>> Some driver that makes the boot work.
>
> Yes, that may be the case.
>
>> However during boot, the kernel I've built appears to fail after the
>> initrd has already passed the torch on to the kernel.
>
> Usually it's vice versa. The kernel uses the initrd as a temporary root
> fs. This one sets up the real rootfs (by loading the needed driver
> modules, unlocking encrypted devices or similar stuff). Finally, it
> calls pivot_root to switch root devices and runs /sbin/init from the
> real root device.

I'm saying the failure appears to happen after pivot_root.. what ever
initrd loaded wasn't enough for the kernel to find /dev/sdb3

That particular build and attempt has been replaced by several new
tries. 

[...]

> Sure, we can give it a try.

Please see the thread noted at the start of this message.
If you are willing to continue.

===
ls -lR ~/projects/kernel/test/

/home/reader/projects/kernel/test:
total 5820
drwxr-xr-x 2 reader reader4096 Dec 11 11:45 bin
drwxr-xr-x 2 reader reader4096 Dec 11 11:45 dev
drwxr-xr-x 3 reader reader4096 Dec 11 11:45 etc
-rwxr-xr-x 1 reader reader   15025 Dec 11 11:45 init
drwxr-xr-x 4 reader reader4096 Dec 11 11:45 lib
lrwxrwxrwx 1 reader reader   3 Dec 11 11:45 lib64 -> lib
lrwxrwxrwx 1 reader reader   4 Dec 11 11:45 linuxrc -> init
drwxr-xr-x 2 reader reader4096 Dec 11 11:45 proc
drwxr-xr-x 2 reader reader4096 Dec 11 11:45 sbin
drwxr-xr-x 2 reader reader4096 Dec 11 11:45 sys
drwxr-xr-x 2 reader reader4096 Dec 11 11:45 temp
-rw-r--r-- 1 reader reader 482 Dec 11 11:50 tocat
drwxr-xr-x 4 reader reader4096 Dec 11 11:45 usr
drwxr-xr-x 3 reader reader4096 Dec 11 11:45 var

/home/reader/projects/kernel/test/bin:
total 7844
-rwxr-xr-x 8 reader reader 995368 Dec 11 11:45 [
-rwxr-xr-x 8 reader reader 995368 Dec 11 11:45 ash
-rwxr-xr-x 8 reader reader 995368 Dec 11 11:45 busybox
-rwxr-xr-x 8 reader reader 995368 Dec 11 11:45 cut
-rwxr-xr-x 8 reader reader 995368 Dec 11 11:45 echo
-rwxr-xr-x 8 reader reader 995368 Dec 11 11:45 mount
-rwxr-xr-x 8 reader reader 995368 Dec 11 11:45 sh
-rwxr-xr-x 1 reader reader396 Dec 11 11:45 udhcpc.scripts
-rwxr-xr-x 8 reader reader 995368 Dec 11 11:45 uname

/home/reader/projects/kernel/test/dev:
total 0
crw-rw 1 reader reader 5, 1 Dec 11 11:45 console
crw-rw 1 reader reader 1, 3 Dec 11 11:45 null
crw--- 1 reader reader 4, 1 Dec 11 11:45 tty1

/home/reader/projects/kernel/test/etc:
total 36
-rw-r--r-- 1 reader reader97 Dec 11 11:45 fstab
-rwxr-xr-x 1 reader reader  1775 Dec 11 11:45 initrd.defaults
-rwxr-xr-x 1 reader reader 24046 Dec 11 11:45 initrd.scripts
drwxr-xr-x 2 reader reader  4096 Dec 11 11:45 modules

/home/reader/projects/kernel/test/etc/modules:
total 52
-rw-r--r-- 1 reader reader  24 Dec 11 11:45 ataraid
-rw-r--r-- 1 reader reader  17 Dec 11 11:45 dmraid
-rw-r--r-- 1 reader reader  75 Dec 11 11:45 evms
-rw-r--r-- 1 reader reader  23 Dec 11 11:45 firewire
-rw-r--r-- 1 reader reader  31 Dec 11 11:45 fs
-rw-r--r-- 1 reader reader  36 Dec 11 11:45 lvm
-rw-r--r-- 1 reader reader  75 Dec 11 11:45 mdadm
-rw-r--r-- 1 reader reader  10 Dec 11 11:45 net
-rw-r--r-- 1 reader reader 534 Dec 11 11:45 pata
-rw-r--r-- 1 reader reader  83 Dec 11 11:45 pcmcia
-rw-r--r-- 1 reader reader 173 Dec 11 11:45 sata
-rw-r--r-- 1 reader reader 513 Dec 11 11:45 scsi
-rw-r--r-- 1 reader reader  74 Dec 11 11:45 usb

/home/reader/projects/kernel/test/lib:
total 8
drwxr-xr-x 2 reader reader 4096 Dec 11 11:45 keymaps
drwxr-xr-x 3 reader reader 4096 Dec 11 11:45 modules

/home/reader/projects/kernel/test/lib/keymaps:
total 348
-rwxr-xr-x 2 reader reader 2823 Dec 11 11:45 1.map
-rwxr-xr-x 2 reader reader 2823 Dec 11 11:45 10.map
-rwxr-xr-x 2 reader reader 2823 Dec 11 11:45 11.map
-rwxr-xr-x 2 reader reader 2823 Dec 11 11:45 12.map
-rwxr-xr-x 2 reader reader 2823 Dec 11 11:45 13.map
-rwxr-xr-x 2 reader reader 2823 Dec 11 11:45 14.map
-rwxr-xr-x 2 reader reader 2823 Dec 11 11:45 15.map
-rwxr-xr-x 2 reader reader 2823 Dec 11 11:45 16.map
-rwxr-xr-x 2 reader reader 2823 Dec 11 11:45 17.map
-rwxr-xr-x 2 reader reader 2823 Dec 11 11:45 18.map
-rwxr-xr-x 2 reader reader 2823 Dec 11 11:45 19.map
-rwxr-xr-x 2 reader reader 2823 Dec 11 11:45 2.map
-rwxr-xr-x 2 reader r

Re: [gentoo-user] Re: kenel line in grub.conf when using initrd

2008-12-10 Thread Heinrichs, Dirk (EXT-Capgemini - DE/Dusseldorf)
Am Donnerstag, den 11.12.2008, 08:05 +0100 schrieb ext Heinrichs, Dirk
(EXT-Capgemini - DE/Dusseldorf):
> > I'll extract `exact' messages if you are willing to spend some time
> on
> > this.  But I suspect we should begin another thread with a subject
> > that makes it clear this is about building a kernel for use inside a
> > gentoo vmware appliance running on windows.
> 
> Sure, we can give it a try.

Oh, I see you already did and got it solved. Fine.

Bye...

Dirk
-- 
Dirk Heinrichs  | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: [EMAIL PROTECTED]
Wanheimerstraße 68  | Web:  http://www.capgemini.com
D-40468 Düsseldorf  | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


Re: [gentoo-user] Re: kenel line in grub.conf when using initrd

2008-12-10 Thread Heinrichs, Dirk (EXT-Capgemini - DE/Dusseldorf)
Am Mittwoch, den 10.12.2008, 16:34 -0600 schrieb ext Harry Putnam:
> Dirk Heinrichs <[EMAIL PROTECTED]> writes:
> 
> > Am Mittwoch, 10. Dezember 2008 19:53:10 schrieb Harry Putnam:
> >> I happen to be stuck with a machine using an initramfs.  Every of attempt
> >> of mine to build a new kernel not using an initram (Or even with initram)
> >> has failed with the boot routine failing to recognize my /dev/sdb3 as root.
> >
> > What is the error message you get?
> 
> /dev/sdb3 is not a valid device

Hmm, can't find that message in the kernel sources...  Would be good to
have the exact message you get (I know they're somtimes hard to remember
w/o copy'n'paste).

> [...] Thanks
> 
> > Why do you think you need an initramfs at all? It's usually only
> > needed in very rare cases where either a driver for storage hardware
> > is needed which is not part of the kernel itself or some user space
> > things need to be done to even setup the root device before the
> > system can be booted from it (i.e. when it's encrypted).
> 
> I don't want it.  I've never felt a need for initramfs before.
> However with this vmware appliance.  I am just keeping the original
> setup because any of my attempts to compile a newer kernel and ditch
> the initramfs have failed in the way I mentioned.  
> 
> Apparently some basic driver or such had been missing in all my
> attempts.   even running `make' using the same `.config' that works, has
> resulted in the same failure the boot routine sees the root
> /dev/sdb3 and an invalid device. 
> 
> If I boot from the original kernel and initrd... it works find.
> Same /dev/sdb3 rocks and rolls right along.
> 
> I'm attempting piece by piece to track down what it is but I'll tell
> you .. it is a flat out pain in the butt has been extremely
> time consuming and aggravating I've compiled a different kernel at
> least 25 times now... I started out with the newewst and workied back
> a few versions then went to the exact same version 2.6.24-r8 and
> even there my compiled bzimage still failed.
> 
> The original appears to have been compiled with genkernel so I tried
> that.  Put the running config:
>  zcat /proc/config.gz > linux-2.6.24-r/.config 
>
> into the exact same sources as the origina kernel and ran genkernel on
> it.  That has also failed to produce a bootable kernel.

Did you try to examine the contents of that initrd with the one you
produce. Maybe somthing is missing there. Could you post the .config
here together with an "ls -Rl" output of the initrd contents. I suspect
the drivers mentioned by Alan are compiled as modules and put into that
initrd instead of just compiling them into the kernel. Would like to
verify that.

> > However, to get a better understanding about initramfs and how it
> > works, you should read Documentation/early-userspace/README in the
> > kernel source tree.
> 
> Thanks, that looks like a far more complete write up, than what I've
> seen so far.  I haven't finished it yet... it will take some study.
> 
> I'm starting to wonder now if the vmappliance creator has put
> something into the initrd that isn't the standard genkernel assembly.
> Some driver that makes the boot work.

Yes, that may be the case.

> However during boot, the kernel I've built appears to fail after the
> initrd has already passed the torch on to the kernel.

Usually it's vice versa. The kernel uses the initrd as a temporary root
fs. This one sets up the real rootfs (by loading the needed driver
modules, unlocking encrypted devices or similar stuff). Finally, it
calls pivot_root to switch root devices and runs /sbin/init from the
real root device.

> And in the case of the many attempted builds and booting with no
> initrd the message is worded a  little different but says the same
> thing.  Apparently the initrd has some different error language.

That's because without initrd the message comes from the kernel and with
initrd it may come from the linuxrc script inside it, which is usually
handcrafted for a special purpose.

> I'll extract `exact' messages if you are willing to spend some time on
> this.  But I suspect we should begin another thread with a subject
> that makes it clear this is about building a kernel for use inside a
> gentoo vmware appliance running on windows.

Sure, we can give it a try.

Bye...

Dirk
-- 
Dirk Heinrichs  | Tel:  +49 (0)162 234 3408
Configuration Manager   | Fax:  +49 (0)211 47068 111
Capgemini Deutschland   | Mail: [EMAIL PROTECTED]
Wanheimerstraße 68  | Web:  http://www.capgemini.com
D-40468 Düsseldorf  | ICQ#: 110037733
GPG Public Key C2E467BB | Keyserver: www.keyserver.net


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


[gentoo-user] Re: kenel line in grub.conf when using initrd

2008-12-10 Thread Harry Putnam
Alan McKinnon <[EMAIL PROTECTED]> writes:

> You are running it in vmware right?
>
> Your disk type, disk adapters type and chipset in a vmware vm are
> NOT the same as these device on the physical hardware. vmware
> emulates a BX440 chipset, SCSI drives and LSI or BusLogic
> adapter. You must use those drivers, not the drivers for the
> physical hardware. Then everything should JustWork(tm) as the rest
> of your hardware is presented as-is via the hypervisor.

Yes, and thanks but I had worked most of that out already.  Having run
a few vmware that I built. Particularly the BUSLOGIC module is
important.  But I've gone ahead and enabled most scsi stuff in one or
another kernel build, in vain.

I've used the original (bootable) kernels .config to establish the new
build but still  it fails.   Each time I've attempted to disable a few
of the settings since the running config has just about everthing
imaginable enabled.  Some 400+ modules installed at /lib/modules.

  du -sh /lib/modules/2.6.24-gentoo-r8/
  295M/lib/modules/2.6.24-gentoo-r8/

Thats a pretty unreasonable herd of modules. I haven't actually tried
an actual mirror image of the running kernel... whats the point...

But I do want to be able to move ahead in versions at some point.  I
don't need a newer kernels for any other reason than just keeping up
at some point.
 




Re: [gentoo-user] Re: kenel line in grub.conf when using initrd

2008-12-10 Thread Alan McKinnon
On Thursday 11 December 2008 00:34:24 Harry Putnam wrote:
> > Why do you think you need an initramfs at all? It's usually only
> > needed in very rare cases where either a driver for storage hardware
> > is needed which is not part of the kernel itself or some user space
> > things need to be done to even setup the root device before the
> > system can be booted from it (i.e. when it's encrypted).
>
> I don't want it.  I've never felt a need for initramfs before.
> However with this vmware appliance.  I am just keeping the original
> setup because any of my attempts to compile a newer kernel and ditch
> the initramfs have failed in the way I mentioned.  
>
> Apparently some basic driver or such had been missing in all my
> attempts.   even running `make' using the same `.config' that works, has
> resulted in the same failure the boot routine sees the root
> /dev/sdb3 and an invalid device.

You are running it in vmware right?

Your disk type, disk adapters type and chipset in a vmware vm are NOT the same 
as these device on the physical hardware. vmware emulates a BX440 chipset, 
SCSI drives and LSI or BusLogic adapter. You must use those drivers, not the 
drivers for the physical hardware. Then everything should JustWork(tm) as the 
rest of your hardware is presented as-is via the hypervisor.

-- 
alan dot mckinnon at gmail dot com



[gentoo-user] Re: kenel line in grub.conf when using initrd

2008-12-10 Thread Harry Putnam
Dirk Heinrichs <[EMAIL PROTECTED]> writes:

> Am Mittwoch, 10. Dezember 2008 19:53:10 schrieb Harry Putnam:
>> I happen to be stuck with a machine using an initramfs.  Every of attempt
>> of mine to build a new kernel not using an initram (Or even with initram)
>> has failed with the boot routine failing to recognize my /dev/sdb3 as root.
>
> What is the error message you get?

/dev/sdb3 is not a valid device

[...] Thanks

> Why do you think you need an initramfs at all? It's usually only
> needed in very rare cases where either a driver for storage hardware
> is needed which is not part of the kernel itself or some user space
> things need to be done to even setup the root device before the
> system can be booted from it (i.e. when it's encrypted).

I don't want it.  I've never felt a need for initramfs before.
However with this vmware appliance.  I am just keeping the original
setup because any of my attempts to compile a newer kernel and ditch
the initramfs have failed in the way I mentioned.  

Apparently some basic driver or such had been missing in all my
attempts.   even running `make' using the same `.config' that works, has
resulted in the same failure the boot routine sees the root
/dev/sdb3 and an invalid device. 

If I boot from the original kernel and initrd... it works find.
Same /dev/sdb3 rocks and rolls right along.

I'm attempting piece by piece to track down what it is but I'll tell
you .. it is a flat out pain in the butt has been extremely
time consuming and aggravating I've compiled a different kernel at
least 25 times now... I started out with the newewst and workied back
a few versions then went to the exact same version 2.6.24-r8 and
even there my compiled bzimage still failed.

The original appears to have been compiled with genkernel so I tried
that.  Put the running config:
 zcat /proc/config.gz > linux-2.6.24-r/.config 

into the exact same sources as the origina kernel and ran genkernel on
it.  That has also failed to produce a bootable kernel.

> However, to get a better understanding about initramfs and how it
> works, you should read Documentation/early-userspace/README in the
> kernel source tree.

Thanks, that looks like a far more complete write up, than what I've
seen so far.  I haven't finished it yet... it will take some study.

I'm starting to wonder now if the vmappliance creator has put
something into the initrd that isn't the standard genkernel assembly.
Some driver that makes the boot work.

However during boot, the kernel I've built appears to fail after the
initrd has already passed the torch on to the kernel.

And in the case of the many attempted builds and booting with no
initrd the message is worded a  little different but says the same
thing.  Apparently the initrd has some different error language.

I'll extract `exact' messages if you are willing to spend some time on
this.  But I suspect we should begin another thread with a subject
that makes it clear this is about building a kernel for use inside a
gentoo vmware appliance running on windows.

Even if just for the sake of searchers who look here about getting
gentoo running in vmware.