Setting up dual-boot on Indigo2 for 6.5 and 5.3... - SGI

This is a discussion on Setting up dual-boot on Indigo2 for 6.5 and 5.3... - SGI ; Dear All, I'm trying to setup an Indigo2 so that it can boot with either 6.5 or 5.3. Not wishing to make things too complicated, all I want is a script for each installation which one can run as root ...

+ Reply to Thread
Results 1 to 9 of 9

Thread: Setting up dual-boot on Indigo2 for 6.5 and 5.3...

  1. Setting up dual-boot on Indigo2 for 6.5 and 5.3...

    Dear All,

    I'm trying to setup an Indigo2 so that it can boot with either
    6.5 or 5.3. Not wishing to make things too complicated, all I
    want is a script for each installation which one can run as root
    that will change the appropriate nvram settings and then reboot.

    The disk on SCSI ID 1 has a 6.5.15m installation. The 5.3 disk
    is on ID 2 (5.3 with XFS to be precise).

    So far, when I run the script on the 6.5 disk, it correctly sets
    SystemPartition and OSLoadPartition, but after rebooting the
    5.3 startup gives the normal copyright message followed by this error:

    WARNING: initial mount of root device 0x2000010 failed with errno 22

    A few seconds later the screen clears and then this error is displayed:

    PANIC: vfs_mountroot: no root found

    Does anyone know what's happening? What is vfs_mountroot? I can't
    find any reference to it on techpubs, and there's no man page for it
    on either installation. I tried using grep to see if any of the scripts
    in /etc would be responsible for printout out either message, but none
    of them are. I'm going through bcheckrc and brc at the moment, trying
    to see how things are initially mounted, but it's a bit of a shell
    script decyphering job. Any ideas?

    If I restart and do a resetenv in Command Monitor, all returns to normal
    and 6.5 boots fine. If I manually put the 5.3 disk back to SCSI ID 1, it
    also boots ok, so whatever is going wrong at least I know it's not
    harming the two installations.

    Thanks for any help!

    Cheers!

    Ian.

  2. Re: Setting up dual-boot on Indigo2 for 6.5 and 5.3...

    ["Followup-To:" header set to comp.sys.sgi.admin.]
    On 11 Aug 2004 08:39:12 -0700, Ian Mapleson wrote:
    > So far, when I run the script on the 6.5 disk, it correctly sets
    > SystemPartition and OSLoadPartition, but after rebooting the
    > 5.3 startup gives the normal copyright message followed by this error:


    Are these all NVRAM variables that are set?

    > WARNING: initial mount of root device 0x2000010 failed with errno 22
    >
    > A few seconds later the screen clears and then this error is displayed:
    >
    > PANIC: vfs_mountroot: no root found


    Maybe it is still trying to mount the root from the 6.5 disk
    which is XFS that might not be readable for 5.3.

    > Does anyone know what's happening? What is vfs_mountroot? I can't
    > find any reference to it on techpubs, and there's no man page for it
    > on either installation. I tried using grep to see if any of the scripts
    > in /etc would be responsible for printout out either message, but none
    > of them are. I'm going through bcheckrc and brc at the moment, trying
    > to see how things are initially mounted, but it's a bit of a shell
    > script decyphering job. Any ideas?


    I guess it's happening way before anything from /etc is executed.
    After all... no root filesystem, no "/etc", right?



    Gerhard

  3. Re: Setting up dual-boot on Indigo2 for 6.5 and 5.3...

    On Wed, 11 Aug 2004 18:05:22 +0200, Gerhard Lenerz wrote:
    > ["Followup-To:" header set to comp.sys.sgi.admin.]
    > On 11 Aug 2004 08:39:12 -0700, Ian Mapleson wrote:
    >> So far, when I run the script on the 6.5 disk, it correctly sets
    >> SystemPartition and OSLoadPartition, but after rebooting the
    >> 5.3 startup gives the normal copyright message followed by this error:

    >
    > Are these all NVRAM variables that are set?


    Try also setting root to an appropriate value for both cases. As
    I have seen it isn't required with one disk installed (even if the
    boot disk is on #2 and another one on #1 exists), but maybe IRIX
    gets confused somehow with two system disks.

    I just tried setting root to the wrong value on my Octane so that
    it loads the kernel from disk #2 and is asked to mount root from
    the wrong disk (#1). The kernel comes up, then complains that it
    cannot mount it's root. It then continues with it's default overriding
    the wrong NVRAM setting. The message looks similar to what you get.


    Gerhard

  4. Re: Setting up dual-boot on Indigo2 for 6.5 and 5.3...

    Ian Mapleson wrote:
    > Dear All,
    >
    > I'm trying to setup an Indigo2 so that it can boot with either
    > 6.5 or 5.3. Not wishing to make things too complicated, all I
    > want is a script for each installation which one can run as root
    > that will change the appropriate nvram settings and then reboot.
    >
    > The disk on SCSI ID 1 has a 6.5.15m installation. The 5.3 disk
    > is on ID 2 (5.3 with XFS to be precise).
    >
    > So far, when I run the script on the 6.5 disk, it correctly sets
    > SystemPartition and OSLoadPartition, but after rebooting the
    > 5.3 startup gives the normal copyright message followed by this error:
    >
    > WARNING: initial mount of root device 0x2000010 failed with errno 22
    >
    > A few seconds later the screen clears and then this error is displayed:
    >
    > PANIC: vfs_mountroot: no root found
    >
    > Does anyone know what's happening? What is vfs_mountroot? I can't


    Check that following params are set in the environment:

    OSLoader=sash
    OSLoadFilename=/unix

    I once had a similar problem (dont remember the exact error messages,
    but I belief they were different) trying to boot from a disk connected
    to the external SCSI. These two params solved it. Seem to be the
    default, but required when booting from other disk

    Rainer

    > find any reference to it on techpubs, and there's no man page for it
    > on either installation. I tried using grep to see if any of the scripts
    > in /etc would be responsible for printout out either message, but none
    > of them are. I'm going through bcheckrc and brc at the moment, trying
    > to see how things are initially mounted, but it's a bit of a shell
    > script decyphering job. Any ideas?
    >
    > If I restart and do a resetenv in Command Monitor, all returns to normal
    > and 6.5 boots fine. If I manually put the 5.3 disk back to SCSI ID 1, it
    > also boots ok, so whatever is going wrong at least I know it's not
    > harming the two installations.
    >
    > Thanks for any help!
    >
    > Cheers!
    >
    > Ian.


  5. Re: Setting up dual-boot on Indigo2 for 6.5 and 5.3...

    Brent Casavant wrote:
    > Another one to check is:


    Yep, tried clearing that. No effect.


    > Oh, and vfs_mountroot is just the name of the kernel routine that
    > tries to mount the root filesystem.


    As near as I can make out, consensus in past posts (thanks to Tony
    for the search suggestions!) is that the kernel has some record
    built into it of where to boot from and this needs to be changed.
    Mark Mitchell said in 1997 on .admin:

    ***************************
    From: Mark Mitchell (mark@k-par.co.uk)
    Subject: Re: Dual boot capability
    View: Complete Thread (3 articles)
    Original Format
    Newsgroups: comp.sys.sgi.admin
    Date: 1997/02/25

    > I have a need to be able to boot an Indigo2 system under either 5.3 or 6.2.
    > I have two drives (one with either operating system), and I can mount the
    > 5.3 drive under 6.2, but the need is to be able to boot under the OS of
    > choice without having to physically swap drives. So far, this capability is
    > completely eluding me. Any pointers would be greatly appreciated. Thanks.


    Mike,
    I've got an IRIX 5.3 disk on ID 1, and a 6.2 disk on ID 2. To boot
    IRIX 5, I run the following script:

    nvram -v SystemPartition "dksc(0,1,8)"
    nvram -v OSLoadPartition "dksc(0,1,0)"
    /etc/reboot

    or to boot IRIX 6:

    nvram -v SystemPartition "dksc(0,2,8)"
    nvram -v OSLoadPartition "dksc(0,2,0)"
    /etc/reboot

    I hope this helps.

    By the way - be careful if you're changing the scsi IDs of these disks. E.g. if
    you've currently got both disks on ID 1. The scsi ID (or some reference to it from
    /dev/root) is compiled into the kernel: if you change the scsi ID of the disk and
    try to boot - it'll fail - or it'll load the kernel off the disk at ID 1.

    If you do have this situation, (and you don't want to re-install):
    - set your 6.2 disk to scsi ID 1
    - boot
    - change /dev/root and /dev/rroot so that the minor numbers are correct for the
    new scsi ID: it'll be the same as the fs partition containing unix:
    e.g. for ID 2, partition 0:
    ls -l /dev/rdsk/dks0d2s0
    brw------- 2 root sys 128, 32 Oct 8 11:49 dks0d2s0
    giving a major number of 128 and a minor number of 32.
    Create the new devices with:
    mknod /dev/root b 128 32
    mknod /dev/rroot c 128 32
    - run /etc/autoconfig
    - Shutdown, set the scsi ID to the new ID and boot.

    This last section should probably have "use at your own risk" and "may be a bad
    idea" plastered all over it.

    Mark.
    ***************************

    What do you reckon? Also, one other poster thought that the swap reference
    may have to be changed in the same way; if so, how?

    I'll setup a basic 5.3 disk to test this out, make sure I don't wreck
    my main complete 5.3 disk.

    Thanks for the replies so far!

    Ian.

  6. Re: Setting up dual-boot on Indigo2 for 6.5 and 5.3...

    Gerhard Lenerz wrote:
    > Are these all NVRAM variables that are set?


    Yes. kernname is set automatically, as is root if it's cleared.


    > Maybe it is still trying to mount the root from the 6.5 disk
    > which is XFS that might not be readable for 5.3.


    Due to the kernel issues mentioned in my other reply, I think this
    is what's happening even though initially it must be grabbing the
    unix file from the 5.3 disk (otherwise the 5.3 copyright wouldn't
    appear I would have thought).

    When installing the 6.5 disk, I forgot to fx the disk using a 6.2
    boot CD, so yes 5.3 can't use it. My intention, once the dual-boot
    was up & active, was to clone the 6.5 disk elsewhere, re-fx/mkfs
    the disk with 6.2, then clone the 6.5 data back again. Both 5.3 with
    XFS and 6.5.x can mount XFS disks which have been initialised with
    6.2. Thus, the 5.3 disk will have the 6.5 disk mounted on /6.5
    for access, and vice versa. The 6.5 disk already has the 5.3 disk
    mounted on /5.3, works fine (the 5.3 disk is a 9GB, so 5.3 with
    XFS is essential).

    Cheers!

    Ian.

  7. Re: Setting up dual-boot on Indigo2 for 6.5 and 5.3...

    >>>>> "mapesdhs" == Ian Mapleson writes:

    mapesdhs> Brent Casavant wrote:
    >> Another one to check is:


    mapesdhs> Yep, tried clearing that. No effect.

    Here is an example of script which we use to do "multiboot"

    #! /bin/sh
    /sbin/nvram OSLoadPartition 'dksc(0,1,11)'
    /sbin/nvram root 'dks0d1s11'

    /sbin/telinit 6

    In this case, all partitions are on the same disk and all are variants
    of 6.5, so we keep one SystemPartition and boot different releases of
    6.5.

    You could consider using 6.5 sash for both and just change to 5.3
    OSLoadPartiton and root - AFAIK there is no requirement to have both
    sash and root on the same disk and as long as both disks are
    connected, it should "just work (tm)".

    >> Oh, and vfs_mountroot is just the name of the kernel routine that
    >> tries to mount the root filesystem.


    mapesdhs> As near as I can make out, consensus in past posts (thanks to Tony
    mapesdhs> for the search suggestions!) is that the kernel has some record
    mapesdhs> built into it of where to boot from and this needs to be
    mapesdhs> changed.

    No, that is (was?) Linux way of doing things, Irix has no information
    about root device in the kernel whatsoever: you can boot from
    different disk, from NFS, from CD, all with the same kernel.

    max

  8. Re: Setting up dual-boot on Indigo2 for 6.5 and 5.3...

    Max Matveev wrote:
    > No, that is (was?) Linux way of doing things, Irix has no information
    > about root device in the kernel whatsoever: you can boot from
    > different disk, from NFS, from CD, all with the same kernel.


    Either that or the devices mentioned in the post I quoted, so I'm
    going to try that. I certainly know that settings I'm trying are as they
    should be, but it still looks as if the system is trying to use
    disk 1. Must create a fresh 5.3 first...

    Cheers!

    Ian.

  9. Re: Setting up dual-boot on Indigo2 for 6.5 and 5.3...

    All solved! Three device files must be changed: root, rroot and swap.
    I've added section on how to do it to my misc problems page:

    http://www.futuretech.blinkenlights....blems.html#008

    Thanks for all the advice!

    Cheers!

    Ian.

+ Reply to Thread