SRX

Expand all | Collapse all

Select device to boot from

  • 1.  Select device to boot from

    Posted 09-22-2017 07:27

    I did an upgrade on my SRX and purposely left the old image on the disk - just in case. So now, things look like they are working okay and I was going to snapshot over the old image. Before I do, I have a couple of files that are on there that I need to copy of so I figured I could just reboot and interrupt the boot and tell it to boot from the backup partition but it keeps booting into the updated partition and not the old one.

     

    root@GreatGazoo> show system snapshot media internal
    Information for snapshot on       internal (/dev/da0s1a) (backup)
    Creation date: Jan 7 06:36:38 2014
    JUNOS version on snapshot:
      junos  : 11.4R6.6-domestic
    Information for snapshot on       internal (/dev/da0s2a) (primary)
    Creation date: Sep 22 14:04:54 2017
    JUNOS version on snapshot:
      junos  : 12.1X46-D65.4-domestic
    

    Interrupting the boot and changing the boot.current didn't seem to help either:

    loader> show
    LINES=24
    autoboot_delay=2
    autoload=n
    baudrate=9600
    boot.btsq.len=0x00002000
    boot.btsq.start=0x003fa000
    boot.current=backup
    boot.devlist=nand-flash:usb
    boot.env.size=0x00002000
    boot.env.start=0x003fe000
    boot.status=0x2000a
    boot.upgrade.loader=0xbfe00000
    boot.upgrade.loader.data=0x00200000
    boot.upgrade.loader.hdr=0x002fffc0
    boot.upgrade.uboot=0xbfc00000
    boot.upgrade.uboot.data=0x00000100
    boot.upgrade.uboot.hdr=0x00000030
    boot.ver=1.7
    bootcmd=cp.b 0xbfe00000 0x100000 0x100000; bootelf 0x100000
    bootdelay=1
    bootfile=/kernel;/kernel.old
    comconsole_speed=9600
    console=comconsole
    currdev=disk0s2
    

    So basically I want to boot to /dev/da0s1a.

     

    Do I need to change the currdev to disk0s1? I've not seen any reference to changing this parameter and figured before I do and brick my device, I'd ask.

     

    Thanks!!!

     



  • 2.  RE: Select device to boot from

    Posted 09-22-2017 09:58

     request system reboot slice alternate media internal 

     

     



  • 3.  RE: Select device to boot from

    Posted 09-23-2017 15:34

    Thouhgt I had said in the original post but guess not - command not available:

     

    root@GreatGazoo> request system reboot ?
    Possible completions:
      <[Enter]>            Execute this command
      at                   Time at which to perform the operation
      in                   Number of minutes to delay before operation
      media                Boot media for next boot
      message              Message to display to all users
      |                    Pipe through a command
    root@GreatGazoo> request system reboot sli
                                              ^
    syntax error.
    root@GreatGazoo> request system reboot slice al
                                                 ^
    Invalid numeric value: 'al' at 'al'
    root@GreatGazoo> request system reboot slice alternate
                                                 ^
    Invalid numeric value: 'alternate' at 'alternate'
    root@GreatGazoo> request system reboot slice alternate
                                                 ^
    Invalid numeric value: 'alternate' at 'alternate'
    root@GreatGazoo> request system reboot slice alternate
    

     



  • 4.  RE: Select device to boot from

     
    Posted 09-24-2017 07:32

    Alternatively, you can mount the backup partition as root and grab the files that way.

     

    root@test> show system snapshot media internal 
    Information for snapshot on       internal (/dev/da0s1a) (backup)
    Creation date: Aug 27 12:13:42 2016
    JUNOS version on snapshot:
      junos  : 12.1X46-D55.3-domestic
    Information for snapshot on       internal (/dev/da0s2a) (primary)
    Creation date: Sep 27 18:48:05 2016
    JUNOS version on snapshot:
      junos  : 12.1X46-D55.3-domestic
    
    root@test> start shell 
    root@test% mount /dev/da0s1a /mnt
    root@test% ls /mnt
    .snap           dev             kernel.old      root
    bin             etc             opt             sbin
    boot            junos           packages        usr
    cf              kernel          pkg             var
    root@test% umount /mnt
    root@test% 
    

     



  • 5.  RE: Select device to boot from

    Posted 09-24-2017 10:44

    Thanks for the suggestion but would that allow me to get to the config and logs as well? I'll have to give that a try. Thanks!!!



  • 6.  RE: Select device to boot from

     
    Posted 09-24-2017 11:11
    I am pretty sure those are on seperate single partitions shared by both boot environments.

    https://www.juniper.net/documentation/en_US/junos/topics/reference/command-summary/show-system-storage-partitions.html