Port-sgimips archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Flag day for bootloader + kernel?



macallan%NetBSD.org@localhost wrote:

> > Sounds good - but please also post a headsup and bootloader update
> > instructions (I always have to look up how sysinst does it in the  
> > code ;-})
> 
> man sgivol ;)

And FAQ page?
http://www.NetBSD.org/ports/sgimips/faq.html#sgivol

One problem is that sgivol(8) doesn't have a rename command
for files in sgivolhdr.

Anyway, typical procedure could be as the following:

1. update sources
 Not committed yet, but you'll have to update arch/sgimips/include/bootinfo.h
 and arch/sgimips/stand/boot/version.

2. build a new kernel and put it into your target sgimips
 New kernels will work with old bootloaders (without ksyms(4) support)

3. build a new bootloader binary (on your build host)

4. copy a new boot (ip2xboot or ip3xboot) binary into your target sgimips
 (/tmp/ip3xboot for IP32 is assumed here)

5. preserve an old boot binary
 (1) check old boot binary name
  Use sgivol(8) without any options:
---
# /usr/mdec/sgivol sd0
disklabel shows 4197405 sectors
checksum: 00000000
root part: 0
swap part: 1
bootfile: /netbsd

Volume header files:
boot     offset    2 blocks, length    59300 bytes (116 blocks)

SGI partitions:
 0:a blocks  3925980 first     8670 type  4 (BSD4.2)
 1:b blocks   262755 first  3934650 type  3 (Raw)
 3:d blocks     8670 first        0 type  4 (BSD4.2)
 8:i blocks     8686 first        0 type  0 (Volume Header)
10:k blocks  4197405 first        0 type  6 (Volume)
# 
---

  After the default installation, bootloader is stored as "boot",
  but "aoutboot" is also stored on IP20/IP22 machines.

 (2)read old boot binary from sgivolhdr to preserve it
  We can just use "sgivol -r" command:
---
# /usr/mdec/sgivol -r boot /tmp/boot.0 sd0
Reading file boot
# 
---

 (3)put the old (and renamed) boot binary into sgivolhdr
  By "sgivol -w" command:
---
# /usr/mdec/sgivol -w boot.0 /tmp/boot.0 sd0
Writing file /tmp/boot.0
File /tmp/boot.0 has 59300 bytes
disklabel shows 4197405 sectors
checksum: 00000000
root part: 0
swap part: 1
bootfile: /netbsd

Volume header files:
boot     offset    2 blocks, length    59300 bytes (116 blocks)
boot.0   offset  118 blocks, length    59300 bytes (116 blocks)

SGI partitions:
 0:a blocks  3925980 first     8670 type  4 (BSD4.2)
 1:b blocks   262755 first  3934650 type  3 (Raw)
 3:d blocks     8670 first        0 type  4 (BSD4.2)
 8:i blocks     8686 first        0 type  0 (Volume Header)
10:k blocks  4197405 first        0 type  6 (Volume)

Do you want to update volume (y/n)? y
# 
---

6. put a new bootloader binary
 By "sgivol -w" command again:
---
# /usr/mdec/sgivol -w boot /tmp/ip3xboot sd0
Writing file /tmp/ip3xboot
File /tmp/ip3xboot has 59272 bytes
File boot exists, removing old file
disklabel shows 4197405 sectors
checksum: 00000000
root part: 0
swap part: 1
bootfile: /netbsd

Volume header files:
boot     offset    2 blocks, length    59272 bytes (116 blocks)
boot.0   offset  118 blocks, length    59300 bytes (116 blocks)

SGI partitions:
 0:a blocks  3925980 first     8670 type  4 (BSD4.2)
 1:b blocks   262755 first  3934650 type  3 (Raw)
 3:d blocks     8670 first        0 type  4 (BSD4.2)
 8:i blocks     8686 first        0 type  0 (Volume Header)
10:k blocks  4197405 first        0 type  6 (Volume)

Do you want to update volume (y/n)? y
# 
---

7. reboot and see how it goes

8. how to recover on trouble
 (1) loading non-default kernels
  If you want to load an old kernel, use the following command (on IP32):

---
Command Monitor.  Type "exit" to return to the menu.
> boot netbsd.0
51152+2400 entry: 0x80002000

NetBSD/sgimips 4.99.71 Bootstrap, Revision 1.5
(tsutsui@mirage, Sun Aug  3 10:02:58 JST 2008)

devopen: pci(0)scsi(0)disk(1)rdisk(0)partition(0) type scsi file netbsd.0
5152448+334744 [270960+262228]=0x5be228
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008
    The NetBSD Foundation, Inc.  All rights reserved.
 :
---

 (2) use an old bootloader (which is preserved)
  If you want to use an old bootloader to load kernel,
  use the following command (on IP32):
---
Command Monitor.  Type "exit" to return to the menu.
> boot -f pci()scsi()disk(1)rdisk()partition(8)boot.0
50992+2400 entry: 0x80002000

NetBSD/sgimips 4.99.54 Bootstrap, Revision 1.2
(builds%b1.netbsd.org@localhost, Wed Feb 20 18:50:08 UTC 2008)

devopen: pci(0)scsi(0)disk(1)rdisk(0)partition(0) type scsi file /netbsd
5242064+322016 [276176+263257]=0x5d26e8
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
    2006, 2007, 2008
    The NetBSD Foundation, Inc.  All rights reserved.
 :
---

 (3) recovery from CD-ROM
  To boot the install kernel from CD-ROM see the following entry:
ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-4.0/sgimips/INSTALL.html#Install%20via%20a%20bootable%20CD-ROM
---
(for most Indigo2 (IP22) and Indy (IP24) machines)
>> boot -f scsi(0)cdrom(X)rdisk(0)partition(8)ip2xboot

(for Indigo (IP20) and Indigo2/Indy machines with old PROMs)
>> boot -f scsi(0)cdrom(X)rdisk(0)partition(8)aoutboot

(for O2 (IP32) machines)
>> boot -f pci(0)scsi(0)cdrom(X)rdisk(0)partition(8)ip3xboot
---

 (4) recovery by netboot
 See FAQ entry:
http://www.NetBSD.org/ports/sgimips/faq.html#bootstrapping

In short (after setup your server and setenv on your sgimips):
> boot -f bootp():/netbsd.IP32
---

Is this enough? ;-)
---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index