Subject: Passing kernel args

From: Dave Gilbert <[email-masked]>
Date: Thu, 19 Apr 2001 21:00:48 +0100 (BST)

Hi,
  With help from some of the guys on the #mipslinux IRC channel I've
managed to force a Linux kernel onto my Indy's internal disc.

One problem is that I'd like to pass some parameters to it, but it is not
obvious to me which prom environment variable to put them in - any
suggestions???

Thanks in advance,

Dave

-- 
 ---------------- Have a happy GNU millennium! ----------------------   
/ Dr. David Alan Gilbert      | Running GNU/Linux on Alpha, | Happy  \ 
\   gro.gilbert @ treblig.org | 68K,MIPS,x86,ARM and SPARC  | In Hex /
 \ ___________________________|___ http://www.treblig.org   |_______/

---

From: Guido Guenther <[email-masked]>
Date: Thu, 19 Apr 2001 22:40:30 +0200

> obvious to me which prom environment variable to put them in - any
OSLoadOptions
See 
http://honk.physik.uni-konstanz.de/linux-mips/indy-boot/indy-hd-boot-micro-howto.html
(at the bottom) for an example.
 -- Guido

---

From: Dave Gilbert <[email-masked]>
Date: Thu, 19 Apr 2001 23:45:08 +0100 (BST)

> (at the bottom) for an example.

Ah thanks - that would have helped a lot if I'd seen that before :-)
However there are a couple of points which don't seem to have matched my
experience:

  1) Disk partitioning.  I had a disk that had Irix on, however my first
problem was that the volume header wasn't big enough for a Linux kernel.
You state that you can use x and then g in fdisk to create a new partition
table, however that only works if the disc is clean and doesn't already
have an Irix partition on it.  In my case since it already did have, x
just gave 'sorry there is no expert mode for SG partitions' (or something
similar).   Having wiped the disc clean with:

dd if=/dev/zero of=/dev/sda

for a few moments I could then do the x and g (thanks to someone on the
IRC channel for pointing the x, g thing out prior to you giving me that
document).

  2) OSLoadPartition - it seems to look at this a little late; i.e. if you
have an NFS Root kernel it ignores OSLoadPartition and still NFS roots -
so I needed to pass a root= option.

  2) OSLoadOptions - the kernel I have (a 2.4.0) gets a string which is:

      OSLoadOptions=whatEverYouSet

    So if you:

       setenv OSLoadOptions "root=/dev/sda1 ro"

    The kernel actually sees:
       OSLoadOptions=root=/dev/sda1 ro

    So I had to do:

       setenv OSLoadOptions " root=/dev/sda1 ro"

    Which works like a dream. (Note the trailing space after the first " )

It is also useful to point out that it is the partition(8) in the options
that corresponds to the /dev/sda9 in the fdisk output.

Thanks again,

Dave (Whose Indy, dino, now boots off its disc)

--

---

From: Florian Lohoff <[email-masked]>
Date: Fri, 20 Apr 2001 10:16:33 +0200

>     Which works like a dream. (Note the trailing space after the first " )

This sounds like a ARC firmware bug. The patch Guido produced 2
weeks ago now in the kernel worked for me on multiple indys and indigo2s
up to now without the leading space.

Flo
-- 
Florian Lohoff                  [email-masked]             +49-5201-669912
     Why is it called "common sense" when nobody seems to have any?

---

From: Guido Guenther <[email-masked]>
Date: Sun, 22 Apr 2001 00:14:40 +0200

[..snip..] 
> dd if=/dev/zero of=/dev/sda
Thanks. I'll add this to the howto.
[..snip..] 
> so I needed to pass a root= option.
This only happens when fetching a kernel via bootp. I suspect that the
prom variables do not get passed to the kernel in that case, only the
arguments after the "bootp(): "call . Not sure if we can do anything about
this.

>     Which works like a dream. (Note the trailing space after the first " )
Hmm...I'm not seeing this here on 2 Indy's and an I2. As Flo already
pointed out this might be a firmware bug.

> that corresponds to the /dev/sda9 in the fdisk output.
Will add that one too.
Regards,
 -- Guido

---

From: "Andrew Linfoot" <[email-masked]>
Date: Tue, 24 Apr 2001 20:09:13 +0100

Just thought i would let you know of my experience with autobooting.

I'm having the same problems as Dave in that i must specify a space in
the OSLoadOptions " root=/dev/sda1 ro". However every time i shutdown or
reboot it is truncated to OSLoadOptions= root=/dev/s meaning i have to reset
it after every reboot.

any ideas as to what may be causing this?
I am runnning on an Indy R5K

Also i am using an ELF kernel and not ECOFF as specified in Guido's howto.

Cheers
Andy

---

From: Guido Guenther <[email-masked]>
Date: Tue, 24 Apr 2001 23:09:23 +0200

> reboot it is truncated to OSLoadOptions= root=/dev/s meaning i have to reset
Could you please send me the kernel command line with and without using
the space (e.g.  dmesg | grep "command line") - i still don't see what
this should be good for.  BTW no need to give root= in OSLoadOptions,
you can use OSLoadPartition instead.
> I am runnning on an Indy R5K
It seems the space in the PROM for OSLoadOptions is quiet limited. The
space available seems to differ between different PROM versions
though(see the HOWTO, it's in there).
> Also i am using an ELF kernel and not ECOFF as specified in Guido's howto.
Doesn't make a difference. ECOFF is just a save bet.
 -- Guido