Description

When the Routing Enginer (RE) cannot boot up from all available media like compact flash (CF) and hard disk (HDD) the only option left is to use PCMCIA.

Symptoms

The problem with PCMCIA is that this media is intended to be use only as install-media, what means that all information on CF and HDD are lost during recovery.

Solution

There is a possibility to use PCMCIA card as a normal boot media. This will give a possibility to get access to data on the HDD or CF which could be critical for further troubleshooting.
Additionally we can do a snapshot from the PCMCIA to the CF/HDD to fully recover the RE if the root cause of the problem was the corruption of the file system on one of the partition.

The following procedure shows how to prepare PCMCIA card to be used as boot media:

  1. Put the PCMCIA card into the slot of a RE which is fully operational (advised to use same platform to avoid problem with the PFE package)

  • Check the disk label used by the PCMCIA card, the information is available in the messages logs (here ad3)

Jul  1 10:55:31  router /kernel: ata2: <STI Flash 6.2.0> at port 0x200-0x20f irq 15 function 0 config 1 on pccard0
Jul  1 10:55:31  router /kernel: ad3: Device does not support APM
Jul  1 10:55:31  router /kernel: ad3: 977MB <STI Flash 6.2.0 Rev6.2.0> at ata2-master PIO1
Jul  1 10:55:33  router chassisd[4229]: CHASSISD_SNMP_TRAP7: SNMP trap generated: FRU insertion (jnxFruContentsIndex 9, jnxFruL1Index 1, jnxFruL2Index 1, jnxFruL3Index 0, jnxFruName Routing Engine 0 PCMCIA Card 0, jnxFruType 6, jnxFruSlot 1)

  • Log into the shell as user root:

user@router> start shell user root               
Password:
user@router%

  • Run a snapshot to the PCMCIA as follows

user@router% snapshot -p /dev/ad3
Clearing current label...
Partitioning pcmcia-card media (ad3) ...
Partitions to be created on pcmcia-card media (ad3):

Partition   Mount point  Size    Snapshot argument
    a       /            880MB   root-size
    e       /config      97MB    config-size
Running newfs (880MB) on pcmcia-card media / partition (ad3s1a)...
Running newfs (97MB) on pcmcia-card media /config partition (ad3s1e)...
Copying / from compact-flash to pcmcia-card (ad3s1a).. (this may take a few minutes)
Copying /config from compact-flash to pcmcia-card (ad3s1e).. (this may take a few minutes)

The following filesystems were archived: / /config

  • The PCMCIA is ready to be used as the boot-media; reboot the router, and it should boot from this device as it is first in the boot list:

Trying to boot from PCMCIA Flash Card ...                                      

Hit [Enter] to boot immediately, or space bar for command prompt.
<...>
Trying to mount root from ufs:/dev/ad3s1a
Attaching /packages/jbase via /dev/mdctl...
Mounted jbase package on /dev/md0...
<...>

router (ttyd0)

login: user
Password:

--- JUNOS 8.5-20081017.0 built 2008-10-17 07:30:16 UTC
---
--- NOTICE: System is running on alternate media device  (/dev/ad3s1a).
---
user@router>

  • At this moment it is possible to try to mount the CF or HDD partions, using the 'mount' commands on the shell:
  • user@router> start shell user root
    Password: 
    % mount -r /dev/(devicename) /mnt
    or
    % mount /dev/(devicename) /mnt

    This should allow you to mount the device to be able to access the device to recover any files, logs or configurations (if the filesystem is not damaged beyond repair)

note: By default the snapshot is done to the HDD only! To also snapshot the image to the compact flash, the snapshot needs to be done manually from the shell as root:

root@router% snapshot /dev/ad0

or if partitioning is needed:

root@router% snapshot -p /dev/ad0