Building kernels (Re: Contents of /boot and /etc/yaboot.conf)

2005-01-21 Thread Shyamal Prasad
Chris == Chris Doherty [EMAIL PROTECTED] writes:

Chris That's not quite what I meant: given that not building in
Chris initrd means that one *must* have the right filesystems
Chris []

Chris Then again, I subscribe to the first do no harm
Chris philosophy of IT - it seems more useful to me for the
Chris defaults on these tools to give you a bootable system
Chris without necessarily optimizing very well; the optimization
Chris can come later (and of course should be supported by the
Chris same tools).

I can't disagree with you completely, but finally we are stating
opinions. I also believe you might be missing some historical context
here (i've been using Linux, on Intel CPUs, since 1993 so I can claim
to have some ;-) I believe the defaults are actually acceptable.

The Debian philosophy (as far as I can tell, and with the arrogance to
pretend to speak for the project) seems to be that users should not
have to compile kernels. If you are building a kernel you are, by
default, and a developer or expert user. That was not the way Linux
used to be a few years ago. Four or five years ago it was common for
users to build kernels, and initrd was not widely understood or used,
and x86 hardware was the platform of choice and all the modern
complications of supporting everything from IBM mainframes to ARM
handhelds did not exist. That is not the case today: Debian supports
over a dozen architectures with all kinds of configurations which is
why initrd is so crucial.

In your specific case my opinion is (and it is an *opinion*) that the
real fault is in the linux-wlan-ng package. It does not provide
modules for the default powerpc kernel, and it does not seem to
compile cleanly for it either. You should not have had to build a
kernel, nor compile the modules. That is the real fault.

Let me put it this way: how many times did you have to compile the
Win9x or NT kernels, and build device drivers from source against the
kernel as a Windows admin? I'm presuming never, and Debian tries to do
its best to do the same. But Debian often depends on the *charity* of
its users and developers to get there.

You became a developer when you started compiling. Open source at
least gave you that *option* ;-) You could always go buy Yellow Dog
Linux or some other distribution with support (Mandrake, Redhat come
to mind) and not have to do any of this.

At any rate, I'll shut up about this from here on. But I'm curious:
did your card work? Did you figure out what it was that broke the
linux-wlan-ng modules from compiling? I hope you got those iMacs
working.

Cheers!
Shyamal



Re: Contents of /boot and /etc/yaboot.conf

2005-01-20 Thread Shyamal Prasad

Chris == Chris Doherty [EMAIL PROTECTED] writes:

Chris I didn't use the --initrd options (or the added-patches
Chris options, either) to make-kpkg.  I made the mistake of
Chris assuming that the defaults would be sensible.  I'm

Well, most people I've run into think that not having the initrd built
by default is sensible. There is (was? its been a while) a certain
class of Linux users who immediately recompile the kernel so they
build all that they need into the kernel and not have any
modules. They say this is more efficient. Whatever. It is hard to
keep everyone happy. 

I hope you've had better (good) luck since.

Cheers!
Shyamal


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: Contents of /boot and /etc/yaboot.conf

2005-01-20 Thread Chris Doherty
Shyamal Prasad wrote:
Well, most people I've run into think that not having the initrd built
by default is sensible. There is (was? its been a while) a certain
class of Linux users who immediately recompile the kernel so they
build all that they need into the kernel and not have any
modules. They say this is more efficient. Whatever. It is hard to
keep everyone happy. 
That's not quite what I meant: given that not building in initrd means 
that one *must* have the right filesystems compiled directly in, and 
what that filesystem is is going to depend on what one decided to format 
the boot partition with, *and* that not compiling in initrd is likely to 
give you an unbootable system, it seems sensible to me that initrd 
should be on by default, since this will always give you a bootable system.

Then again, I subscribe to the first do no harm philosophy of IT - it 
seems more useful to me for the defaults on these tools to give you a 
bootable system without necessarily optimizing very well; the 
optimization can come later (and of course should be supported by the 
same tools).

Chris
--
As an adolescent I aspired to lasting fame, I craved factual certainty, 
and I thirsted for a meaningful vision of human life - so I became a 
scientist. This is like becoming an archbishop so you can meet girls.
~ M. Cartmill

--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]


Re: Contents of /boot and /etc/yaboot.conf

2005-01-20 Thread Shyamal Prasad

Chris == Chris Doherty [EMAIL PROTECTED] writes:

Chris I didn't use the --initrd options (or the added-patches
Chris options, either) to make-kpkg.  I made the mistake of
Chris assuming that the defaults would be sensible.  I'm

Well, most people I've run into think that not having the initrd built
by default is sensible. There is (was? its been a while) a certain
class of Linux users who immediately recompile the kernel so they
build all that they need into the kernel and not have any
modules. They say this is more efficient. Whatever. It is hard to
keep everyone happy. 

I hope you've had better (good) luck since.

Cheers!
Shyamal



Re: Contents of /boot and /etc/yaboot.conf

2005-01-20 Thread Chris Doherty

Shyamal Prasad wrote:

Well, most people I've run into think that not having the initrd built
by default is sensible. There is (was? its been a while) a certain
class of Linux users who immediately recompile the kernel so they
build all that they need into the kernel and not have any
modules. They say this is more efficient. Whatever. It is hard to
keep everyone happy. 


That's not quite what I meant: given that not building in initrd means 
that one *must* have the right filesystems compiled directly in, and 
what that filesystem is is going to depend on what one decided to format 
the boot partition with, *and* that not compiling in initrd is likely to 
give you an unbootable system, it seems sensible to me that initrd 
should be on by default, since this will always give you a bootable system.


Then again, I subscribe to the first do no harm philosophy of IT - it 
seems more useful to me for the defaults on these tools to give you a 
bootable system without necessarily optimizing very well; the 
optimization can come later (and of course should be supported by the 
same tools).


Chris

--
As an adolescent I aspired to lasting fame, I craved factual certainty, 
and I thirsted for a meaningful vision of human life - so I became a 
scientist. This is like becoming an archbishop so you can meet girls.

~ M. Cartmill



Re: Contents of /boot and /etc/yaboot.conf

2005-01-19 Thread Shyamal Prasad
Chris == Chris Doherty [EMAIL PROTECTED] writes:

Chris And /boot.  Notice that there's no initrd.img symlink.  I
Chris thought there was earlier, but I was obviously mistaken.

The inintrd.img symlink is a convenience, and it is created by the
kernel install scripts when you first install an initrd kernel. What
is more important is the /boot/initrd.img-kernel-version file is
missing.

If you built your kernel with make-kpkg you need to provide the
--initrd switch to create an initrd kernel. If you do that then when
you install the kernel (with dpkg -i kernel-pkg-name.deb) it will
create the initrd image for you. Which part of this do you think
failed? 

If you do not use the --initrd switch you don't get an initrd
kernel. You can safely take out the initrd line in yaboot.conf if this
is the case. I suspect this is what you have done. But it's not always
safe

Is is usually *NOT* safe because you MUST make sure that you have
built every module that you need to mount the root file system into
that kernel so it can mount the root fs and find any other modules it
needs. If the root fs is ext3 it needs to be built in, not a module,
and so on! This can get tricky on modern h/w (like if you have a SCSI
or SATA drive etc), so you should use an initrd kernel. The best ones
are the Debian pre-packaged ones. Let Sven do the hard work for you ;-)

One more thing: if you managed to build linux-wlan-ng against the
Debian 2.6.8 sources then you should be able to use the linux-wlan-ng
modules package with the pre-built Debian kernel.

Oh, yes, since you really do seem to enjoy poking a system to death (I
mean that as a compliment) you might find these commands mildly
interesting 

man mkinitrd
mount -t cramfs -o loop /path/to/initrd.img /mnt

(of course, your kernel needs to have the loop device built in, or
available as a module).

It scares me that I'm giving you all this advice. I've built kernels
twice this decade (last December to boot my spanking new G5 whose
970FX processors were unsupported by Debian the day I bought it, and
in early 2002 to boot an 8 year old laptop with a broken SCSI card).

Cheers!
Shyamal


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Contents of /boot and /etc/yaboot.conf

2005-01-19 Thread Chris Doherty
Here's the yaboot.conf:

## yaboot.conf generated by debian-installer
##
## run: man yaboot.conf for details. Do not make changes until you have!!
## see also: /usr/share/doc/yaboot/examples for example configurations.
##
## For a dual-boot menu, add one or more of:
## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ

boot=/dev/hda2
device=/[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED]/[EMAIL PROTECTED]:
partition=4
root=/dev/hda4
timeout=100
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
enablecdboot

image=/boot/vmlinux
label=Linux
read-only
initrd=/boot/initrd.img

image=/boot/vmlinux.old
label=old
read-only
initrd=/boot/initrd.img.old

And /boot.  Notice that there's no initrd.img symlink.  I thought there was 
earlier, but I was obviously mistaken.

drwxr-xr-x   2 root root4096 2005-01-20 03:23 .
drwxr-xr-x  22 root root4096 2004-12-16 01:07 ..
-rw-r--r--   1 root root   39983 2005-01-18 23:32 config-2.6.8-20050118
-rw-r--r--   1 root root   40069 2004-10-03 07:15 config-2.6.8-powerpc
-rw-r--r--   1 root root1024 2004-10-28 13:46 first.b
-rw-r--r--   1 root root 4800512 2004-12-16 01:44 initrd.img-2.6.8-powerpc
lrwxrwxrwx   1 root root  24 2005-01-20 03:23 initrd.img.old - 
initrd.img-2.6.8-powerpc
-rw-r--r--   1 root root   44336 2004-10-28 13:46 second.b
-rw-r--r--   1 root root  944303 2005-01-19 03:48 System.map-2.6.8-20050118
-rw-r--r--   1 root root  942649 2004-10-03 08:13 System.map-2.6.8-powerpc
lrwxr-xr-x   1 root root  22 2005-01-19 18:51 vmlinux - 
vmlinux-2.6.8-20050118
-rw-r--r--   1 root root 3966579 2005-01-19 03:48 vmlinux-2.6.8-20050118
-rw-r--r--   1 root root 3964695 2004-10-03 08:13 vmlinux-2.6.8-powerpc
-rw-r--r--   1 root root 1290162 2005-01-19 03:48 vmlinux.coff-2.6.8-20050118
lrwxr-xr-x   1 root root  21 2004-12-16 01:44 vmlinux.old - 
vmlinux-2.6.8-powerpc

This is the only difference in kernel config:
[EMAIL PROTECTED]:/boot$ diff config-2.6.8-20050118 config-2.6.8-powerpc
314a315
 # CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
321a323
 # CONFIG_AIC79XX_BUILD_FIRMWARE is not set

So I don't quite understand why an initrd image wasn't created, nor how I can 
create one myself to get my new kernel booting.  Any suggestions?



Re: Contents of /boot and /etc/yaboot.conf

2005-01-19 Thread Shyamal Prasad
Chris == Chris Doherty [EMAIL PROTECTED] writes:

Chris And /boot.  Notice that there's no initrd.img symlink.  I
Chris thought there was earlier, but I was obviously mistaken.

The inintrd.img symlink is a convenience, and it is created by the
kernel install scripts when you first install an initrd kernel. What
is more important is the /boot/initrd.img-kernel-version file is
missing.

If you built your kernel with make-kpkg you need to provide the
--initrd switch to create an initrd kernel. If you do that then when
you install the kernel (with dpkg -i kernel-pkg-name.deb) it will
create the initrd image for you. Which part of this do you think
failed? 

If you do not use the --initrd switch you don't get an initrd
kernel. You can safely take out the initrd line in yaboot.conf if this
is the case. I suspect this is what you have done. But it's not always
safe

Is is usually *NOT* safe because you MUST make sure that you have
built every module that you need to mount the root file system into
that kernel so it can mount the root fs and find any other modules it
needs. If the root fs is ext3 it needs to be built in, not a module,
and so on! This can get tricky on modern h/w (like if you have a SCSI
or SATA drive etc), so you should use an initrd kernel. The best ones
are the Debian pre-packaged ones. Let Sven do the hard work for you ;-)

One more thing: if you managed to build linux-wlan-ng against the
Debian 2.6.8 sources then you should be able to use the linux-wlan-ng
modules package with the pre-built Debian kernel.

Oh, yes, since you really do seem to enjoy poking a system to death (I
mean that as a compliment) you might find these commands mildly
interesting 

man mkinitrd
mount -t cramfs -o loop /path/to/initrd.img /mnt

(of course, your kernel needs to have the loop device built in, or
available as a module).

It scares me that I'm giving you all this advice. I've built kernels
twice this decade (last December to boot my spanking new G5 whose
970FX processors were unsupported by Debian the day I bought it, and
in early 2002 to boot an 8 year old laptop with a broken SCSI card).

Cheers!
Shyamal



Re: Contents of /boot and /etc/yaboot.conf

2005-01-19 Thread Chris Doherty

Shyamal Prasad wrote:


If you built your kernel with make-kpkg you need to provide the
--initrd switch to create an initrd kernel. If you do that then when
you install the kernel (with dpkg -i kernel-pkg-name.deb) it will
create the initrd image for you. Which part of this do you think
failed? 


I didn't use the --initrd options (or the added-patches options, either) 
to make-kpkg.  I made the mistake of assuming that the defaults would be 
sensible.  I'm rebuilding using make-kpkg now with the --initrd option 
and PATCH_THE_KERNEL=YES (althought the Debianlogo patch failed utterly. 
:-( )



Oh, yes, since you really do seem to enjoy poking a system to death (I
mean that as a compliment) you might find these commands mildly


throws up hands *I* just wanted to install a wireless adapter. :-)


It scares me that I'm giving you all this advice. I've built kernels
twice this decade (last December to boot my spanking new G5 whose
970FX processors were unsupported by Debian the day I bought it, and
in early 2002 to boot an 8 year old laptop with a broken SCSI card).


Heh.  So far it's been quite useful, thanks.

Chris

--
As an adolescent I aspired to lasting fame, I craved factual certainty, 
and I thirsted for a meaningful vision of human life - so I became a 
scientist. This is like becoming an archbishop so you can meet girls.

~ M. Cartmill