Linux MIPS Architecture development
 help / color / mirror / Atom feed
* Kernel boot tips.
@ 2000-07-07 13:10 J. Scott Kasten
  2000-07-09  4:29 ` Ralf Baechle
  0 siblings, 1 reply; 9+ messages in thread
From: J. Scott Kasten @ 2000-07-07 13:10 UTC (permalink / raw)
  To: linux-mips


I learned 3 slick booting tips for booting an Indy from disk without a
regular Linux boot loader that might be useful to some of the newbies.

First off, there are two ways to trick the prom into booting the kernel
image like the normal Irix kerenel from disk.  If you have an EFS or XFS
bootable file system on the drive, and have Irix up at some point, you can
put the linux kernel in the file system as /unix in place of an Irix
kernel.  When booting, sash will look for that particular file and
bootstrap it.  Another way to accomplish this trick if you don't want any
Irix partitions on your drive at all is to use the volume header itself.
Sash is located there, and the boot prom will load and execute sash as
part of the boot process.  Under Irix, you can use dvhtool to replace sash
with the linux kernel itself.  Then when the system tries to boot, the
prom will load "sash" like normal, but will end up boot straping the linux
kernel for you.  (I think this will require a coff image though.)

The third trick I learned will help those that cannot afford the spare
change to keep around extra SCSI drives so that they have a bootable Irix
image to use for accomplishing these feats.  If you use fx to initially
prepare your linux disk, use the expert option and resize the volume
header partition.  Make it big, like 25 Meg or so.  Shrink the efs/xfs
root partition down very small, but don't delete it.  Keep the swap
partition as well, but again, rather small.  On the Irix CD, you'll find
the directory /dist/miniroot, and inside there, the Irix kernel miniroot
images.  Pick the one named for your machine arch, such as unix.IP22.
When I set up my volume header, I put sash in there like normal, but also
put the miniroot image in there as well, and put the linux kernel as /unix
in the vestigal efs/xfs root partition.  Now from the prom, I can enter
the command "miniroot" and get the Irix kernel up with a handful of
utilities to manage the disk.  It has fx, dvhtool, and others.  On top of
that, you can ifconfig your ethernet device and use rcp to pull over your
linux kernel from the network to install it on the efx/xfs root or in the
volume header as you choose.  You can even mount cdroms and so forth.
Basicly, this is the next best thing to having a full blown Irix install
somewhere.

Hope these tips are usefull for someone!


--

J. Scott Kasten
Email: jsk AT tetracon-eng DOT net

"The only future you have is the one
 you choose to make for yourself..."

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Kernel boot tips.
  2000-07-07 13:10 Kernel boot tips J. Scott Kasten
@ 2000-07-09  4:29 ` Ralf Baechle
  2000-07-09 20:59   ` J. Scott Kasten
  2000-07-09 22:34   ` Bryan Manternach
  0 siblings, 2 replies; 9+ messages in thread
From: Ralf Baechle @ 2000-07-09  4:29 UTC (permalink / raw)
  To: J. Scott Kasten; +Cc: linux-mips, linux-mips, linux-mips

On Fri, Jul 07, 2000 at 10:10:59AM -0300, J. Scott Kasten wrote:

> I learned 3 slick booting tips for booting an Indy from disk without a
> regular Linux boot loader that might be useful to some of the newbies.
> 
> First off, there are two ways to trick the prom into booting the kernel
> image like the normal Irix kerenel from disk.  If you have an EFS or XFS
> bootable file system on the drive, and have Irix up at some point, you can
> put the linux kernel in the file system as /unix in place of an Irix
> kernel.  When booting, sash will look for that particular file and
> bootstrap it.  Another way to accomplish this trick if you don't want any
> Irix partitions on your drive at all is to use the volume header itself.
> Sash is located there, and the boot prom will load and execute sash as
> part of the boot process.  Under Irix, you can use dvhtool to replace sash
> with the linux kernel itself.  Then when the system tries to boot, the
> prom will load "sash" like normal, but will end up boot straping the linux
> kernel for you.  (I think this will require a coff image though.)
> 
> The third trick I learned will help those that cannot afford the spare
> change to keep around extra SCSI drives so that they have a bootable Irix
> image to use for accomplishing these feats.  If you use fx to initially
> prepare your linux disk, use the expert option and resize the volume
> header partition.  Make it big, like 25 Meg or so.  Shrink the efs/xfs
> root partition down very small, but don't delete it.  Keep the swap
> partition as well, but again, rather small.  On the Irix CD, you'll find
> the directory /dist/miniroot, and inside there, the Irix kernel miniroot
> images.  Pick the one named for your machine arch, such as unix.IP22.
> When I set up my volume header, I put sash in there like normal, but also
> put the miniroot image in there as well, and put the linux kernel as /unix
> in the vestigal efs/xfs root partition.  Now from the prom, I can enter
> the command "miniroot" and get the Irix kernel up with a handful of
> utilities to manage the disk.  It has fx, dvhtool, and others.  On top of
> that, you can ifconfig your ethernet device and use rcp to pull over your
> linux kernel from the network to install it on the efx/xfs root or in the
> volume header as you choose.  You can even mount cdroms and so forth.
> Basicly, this is the next best thing to having a full blown Irix install
> somewhere.

I've finally commited my rewrite of dvhtool into the CVS archive on
oss.  It's not yet complete but hackers may be interested in taking a
look at it.

One of my next projects will be a standalone libc which can be used to
write reasonably portable standalone tools like a sash equivalent.

  Ralf

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Kernel boot tips.
  2000-07-09  4:29 ` Ralf Baechle
@ 2000-07-09 20:59   ` J. Scott Kasten
  2000-07-09 22:34   ` Bryan Manternach
  1 sibling, 0 replies; 9+ messages in thread
From: J. Scott Kasten @ 2000-07-09 20:59 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips



On Sun, 9 Jul 2000, Ralf Baechle wrote:

> I've finally commited my rewrite of dvhtool into the CVS archive on
> oss.  It's not yet complete but hackers may be interested in taking a
> look at it.
> 
> One of my next projects will be a standalone libc which can be used to
> write reasonably portable standalone tools like a sash equivalent.

Cool.  We need those things.  The tips I gave are only a work around until
we have a regular boot loader/miniroot.  The one thing that does not
work well with my methods is getting command line args to the booting
kernel such as "root=/dev/sda3" etc...  You can do that, but have to stop
the auto boot and enter the prom command tool to do it.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Kernel boot tips.
  2000-07-09  4:29 ` Ralf Baechle
  2000-07-09 20:59   ` J. Scott Kasten
@ 2000-07-09 22:34   ` Bryan Manternach
  2000-07-09 22:59     ` Florian Lohoff
  1 sibling, 1 reply; 9+ messages in thread
From: Bryan Manternach @ 2000-07-09 22:34 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: J. Scott Kasten, linux-mips, linux-mips, linux-mips

Ralf Baechle wrote:

> On Fri, Jul 07, 2000 at 10:10:59AM -0300, J. Scott Kasten wrote:
>
> > I learned 3 slick booting tips for booting an Indy from disk without a
> > regular Linux boot loader that might be useful to some of the newbies.

A fourth means is to change the nvram to boot the file you want.
Leave /unix there,and call your linux kernel something like /linux2.2.0
and change the "kernname" nvram.

kernname=pci(0)scsi(0)disk(2)rdisk(0)partition(0)/unix
becomes

kernname=pci(0)scsi(0)disk(2)rdisk(0)partition(0)/linux2.2.0

This should work on the IRIX efs/xfs filesystem on the IRIX
partition.  Then you can create a script that resets the NVRAM
variable before reboot.

All we would need to make back and forth boots of IRIX/LINUX
is an "nvram" tool that runs under LInux.  (Which would be handy
for other porposes as well.


>
> >--
> THE USE OF EMAIL FOR THE TRANSMISSION OF UNSOLICITED COMMERICAL
> MATERIAL IS PROHIBITED UNDER FEDERAL LAW (47 USC 227). Violations may
> result in civil penalties and claims of $500.00 PER OCCURRENCE
> (47 USC 227[c]).  Commercial spam WILL be forwarded to postmasters.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Kernel boot tips.
  2000-07-09 22:34   ` Bryan Manternach
@ 2000-07-09 22:59     ` Florian Lohoff
  0 siblings, 0 replies; 9+ messages in thread
From: Florian Lohoff @ 2000-07-09 22:59 UTC (permalink / raw)
  To: Bryan Manternach
  Cc: Ralf Baechle, J. Scott Kasten, linux-mips, linux-mips, linux-mips

On Sun, Jul 09, 2000 at 03:34:17PM -0700, Bryan Manternach wrote:
> A fourth means is to change the nvram to boot the file you want.
> Leave /unix there,and call your linux kernel something like /linux2.2.0
> and change the "kernname" nvram.
> 
> kernname=pci(0)scsi(0)disk(2)rdisk(0)partition(0)/unix
> becomes

The problem with the nvram vars is the non-availability on
the Indigo2 which is not capable of storing arbitrary vars
or arbitrary content in existing vars.

I would prefer a "SILO" the Sparc Linux LOader which is capable
of reading an ext2 filesystem, getting its config from there
and loading the kernel from an ext2.

Flo
-- 
Florian Lohoff		flo@rfc822.org		      	+49-5201-669912
     "If you're not having fun right now, you're wasting your time."

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Kernel boot tips.
@ 2000-07-10 13:55 Tor Arntsen
  2000-07-10 22:53 ` Ralf Baechle
  0 siblings, 1 reply; 9+ messages in thread
From: Tor Arntsen @ 2000-07-10 13:55 UTC (permalink / raw)
  To: ralf; +Cc: linux-mips, linux-mips, linux-mips

On Jul 9, 21:59, Ralf Baechle wrote:
>I've finally commited my rewrite of dvhtool into the CVS archive on
>oss.  It's not yet complete but hackers may be interested in taking a
>look at it.
[..]

This looks great. Just for fun I did a quick compile under irix 6.5.8 on 
an SGI Octane, dvhtool --print-all and dvhtool --print-all /dev/rdsk/dksXXXvh 
worked fine. --vh-to-unix failed with 'Short read: Error 0', I assume this 
simply isn't finished yet (or maybe it doesn't work under irix).
BTW it compiled fine with gcc as well as with the MIPSPro compiler (after
replacing this little gcc'ism:)
--- dvhlib.c.orig       Fri Jul  7 04:24:53 2000
+++ dvhlib.c    Mon Jul 10 15:43:51 2000
@@ -40,7 +40,7 @@
        case PTYPE_XFS:         return "XFS";
        case PTYPE_XFSLOG:      return "XFS Log";
        case PTYPE_XLV:         return "XLV Volume";
-       case 13 ... 15:         return "Unknown Partition Type";
+       default:                return "Unknown Partition Type";
        }
 
        return "Invalid Type";

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Kernel boot tips.
  2000-07-10 13:55 Tor Arntsen
@ 2000-07-10 22:53 ` Ralf Baechle
  0 siblings, 0 replies; 9+ messages in thread
From: Ralf Baechle @ 2000-07-10 22:53 UTC (permalink / raw)
  To: Tor Arntsen; +Cc: linux-mips, linux-mips, linux-mips

On Mon, Jul 10, 2000 at 03:55:34PM +0200, Tor Arntsen wrote:

> This looks great. Just for fun I did a quick compile under irix 6.5.8 on 
> an SGI Octane, dvhtool --print-all and dvhtool --print-all /dev/rdsk/dksXXXvh 
> worked fine. --vh-to-unix failed with 'Short read: Error 0', I assume this 
> simply isn't finished yet (or maybe it doesn't work under irix).

It was actually developed under with gcc under IRIX and I can't even remember
having tested it under anything else.

It's a while that I last worked on it but as I remember --vh-to-unix was
actually working while the other direction was work in progress.

Maybe some nroff fan also wants to provide a manpage?

> BTW it compiled fine with gcc as well as with the MIPSPro compiler (after
> replacing this little gcc'ism:)

Patch applied.

  Ralf

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Kernel boot tips.
@ 2000-07-11 14:19 Tor Arntsen
  2000-07-11 23:57 ` Ralf Baechle
  0 siblings, 1 reply; 9+ messages in thread
From: Tor Arntsen @ 2000-07-11 14:19 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, linux-mips, linux-mips

On Jul 10, 23:53, Ralf Baechle wrote:
[...]
>It's a while that I last worked on it but as I remember --vh-to-unix was
>actually working while the other direction was work in progress.

It is indeed working, I was merely using it incorrectly (I had specified 
the device as I do with the SGI dvhtool instead of using -d).

>Maybe some nroff fan also wants to provide a manpage?

I can do it if nobody else beats me to it.

-Tor

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Kernel boot tips.
  2000-07-11 14:19 Tor Arntsen
@ 2000-07-11 23:57 ` Ralf Baechle
  0 siblings, 0 replies; 9+ messages in thread
From: Ralf Baechle @ 2000-07-11 23:57 UTC (permalink / raw)
  To: Tor Arntsen; +Cc: linux-mips, linux-mips, linux-mips

On Tue, Jul 11, 2000 at 04:19:18PM +0200, Tor Arntsen wrote:

> On Jul 10, 23:53, Ralf Baechle wrote:
> [...]
> >It's a while that I last worked on it but as I remember --vh-to-unix was
> >actually working while the other direction was work in progress.
> 
> It is indeed working, I was merely using it incorrectly (I had specified 
> the device as I do with the SGI dvhtool instead of using -d).
> 
> >Maybe some nroff fan also wants to provide a manpage?
> 
> I can do it if nobody else beats me to it.

While still somewhat inaccurate the manpage is still a big improvment
over the current Read-The-Fucking-Source state of things, so I've applied
it.

  Ralf

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2000-07-11 23:57 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-07-07 13:10 Kernel boot tips J. Scott Kasten
2000-07-09  4:29 ` Ralf Baechle
2000-07-09 20:59   ` J. Scott Kasten
2000-07-09 22:34   ` Bryan Manternach
2000-07-09 22:59     ` Florian Lohoff
  -- strict thread matches above, loose matches on Subject: below --
2000-07-10 13:55 Tor Arntsen
2000-07-10 22:53 ` Ralf Baechle
2000-07-11 14:19 Tor Arntsen
2000-07-11 23:57 ` Ralf Baechle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox