Citrix Netscaler 6xCu

  1. Start the console session.

    Plug in serial cable to console port of device from PC COM1 port
    Open PuTTY and select "Serial" connection type, leave baud rate (Speed) and other settings as default.
    Plug power into device and if a power button exists, turn it on.
  2. Boot into single user mode.

    Press Ctrl C when prompted and before the countdown ends:
    Version 2.14.1219. Copyright (C) 2011 American Megatrends, Inc. Citrix MPX5550 BIOS Date:09/06/2012 Rev:2.1d CPU : Intel(R) Xeon(R) CPU E31225 @ 3.10GHz Speed : 3.10 GHz The IMC is operating with DDR3 1333 Mhz Press <DEL> to enter setup. A3 1 NetScaler Default: 1 /boot.config: -h Consoles: serial port Press Ctrl-C for command prompt, or any other key to boot immediately.
    Type the boot -s command:
    > boot -s GDB: debug ports: uartvailable memory GDB: current port: uartcommands, 'help' for more detailed help. KDB: debugger backends: ddb gdbRevision NS1.1a KDB: current backend: ddbader.conf … Copyright (c) 1992-2013 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 8.4-NETSCALER-10.5 #0: Thu Apr 23 17:53:52 UTC 2015
    Further output will bring you to the shell choice, press Enter for the \u@ prompt.
    Enter full pathname of shell or RETURN for /bin/sh: \u@
  3. Erase configuration.

    Type the gpart show -p command to discover the partition name to check with the fsck command, it will end in 1a:
    \u@gpart show -p => 63 312581745 ad4 MBR (149G) 63 8389521 - free - (4.0G) 8389584 304186176 ad4s1 freebsd [active] (145G) 312575760 6048 - free - (3M) => 0 304186176 ad4s1 BSD (145G) [CORRUPT] 0 16 - free - (8.0k) 16 16868234 ad4s1d freebsd-vinum (8.0G) 16868250 16 - free - (8.0k) 16868266 203286494 ad4s1f freebsd-vinum (97G) 220154760 67108864 ad4s1g freebsd-swap (32G) 287263624 42836 - free - (20M) 287306460 16867969 ad4s1h freebsd-ufs (8.0G) 304174429 11747 - free - (5.8M) \u@fsck_ufs /dev/ad4s1a ** /dev/ad4s1a ** Last Mounted on /flash ** Phase 1 - Check Blocks and Sizes ** Phase 2 - Check Pathnames ** Phase 3 - Check Connectivity ** Phase 4 - Check Reference Counts ** Phase 5 - Check Cyl groups 223 files, 297376 used, 3786375 free (79 frags, 473287 blocks, 0.0% fragmentation) ***** FILE SYSTEM MARKED CLEAN *****
    Type the df command to check it is not already mounted then use the mount command to map it to /flash:
    \u@df Filesystem 1K-blocks Used Avail Capacity Mounted on /dev/md0 330094 321788 1706 99% / devfs 1 1 0 100% /dev \u@mount /dev/ad4s1a /flash
    Type the following to erase all configuration files:
    \u@cd /etc \u@for file in *; do > rm /nsconfig/$file 2> /dev/null > done \u@cd flash/nsconfig \u@rm ns.conf* ZebOS.conf rc.conf \u@cd ssl \u@GLOBIGNORE="ns-*" \u@rm *
  4. Reboot and check you can login with default credentials.

    Type the reboot command:
    \u@reboot reboot initiated by reboot with parent init Waiting (max 60 seconds) for system process `vnlru' to stop...done Waiting (max 60 seconds) for system process `bufdaemon' to stop...done Syncing disks, vnodes remaining...0 Waiting (max 60 seconds) for system process `syncer' to stop...0 done All buffers synced. Uptime: 5m45s usbus0: Controller shutdown uhub0: at usbus0, port 1, addr 1 (disconnected) ugen0.2: <vendor 0x8087> at usbus0 (disconnected) uhub2: at uhub0, port 1, addr 2 (disconnected) ugen0.3: <Winbond Electronics Corp> at usbus0 (disconnected) ums0: at uhub2, port 2, addr 3 (disconnected) ukbd0: at uhub2, port 2, addr 3 (disconnected) usbus0: Controller shutdown complete usbus1: Controller shutdown uhub1: at usbus1, port 1, addr 1 (disconnected) ugen1.2: <vendor 0x8087> at usbus1 (disconnected) uhub3: at uhub1, port 1, addr 2 (disconnected) usbus1: Controller shutdown complete
    Allow the system to boot up and for both the login:  and password:  prompt type nsroot then type the shell command to ensure access to it:
    !There is no ns.conf in the /nsconfig! Start Netscaler software NetScaler... grep: /nsconfig/ns.conf: No such file or directory [: -eq: unexpected operator nsstart: Tue May 24 02:56:15 EST 2022 : Creating default netscaler certificate for NetScaler internal communication nsstart: Tue May 24 02:56:15 EST 2022 : Creating the RSA root key nsstart: Tue May 24 02:56:16 EST 2022 : Creating the CSR for the root certificate nsstart: Tue May 24 02:56:16 EST 2022 : Create the Self-Signed Certificate root certificate nsstart: Tue May 24 02:56:16 EST 2022 : Creating the RSA key nsstart: Tue May 24 02:56:16 EST 2022 : Create the CSR for server cert nsstart: Tue May 24 02:56:16 EST 2022 : Create the Server Certificate This is NetScaler version NS10.5, build 56.15 The NetScaler configuration file, /nsconfig/ns.conf, does not exist or is invalid Written to /nsconfig/ns.conf: 'set ns config -IPAddress %s -netmask %s ' Written to /nsconfig/ns.conf: 'enable ns feature SP WL ' Written to /nsconfig/ns.conf: 'enable ns mode FR L3 Edge USNIP PMTUD ' Written to /nsconfig/ns.conf: 'set system user nsroot nsroot ' Written to /nsconfig/ns.conf: 'add route 0.0.0.0 0.0.0.0 %s ' Written to /nsconfig/ns.conf: 'add ssl certkey ns-server-certificate -cert ns-server.cert -key ns-server.key ' tput: no terminal type specified and no TERM environmental variable. The NetScaler configuration file /nsconfig/ns.conf does not exist; a new file containing default configuration has been be created. Proceeding with default configuration file. initial config source: ns.conf; version=NS10.5, build=56.15 license: {Platformid=2049, keyfeature1=0xd5f5cfff, keyfeature2=0x165b6, swfeature1=0x0, swfeature2=0x0, sslvpn_feature1=0x1f, sslvpn_feature2=0x5,sslvpn_max_licensed_users=0} layout: {num_nsppes=1, nsppe_location=/netscaler/nsppe} peconfig: {ip=192.168.100.1, netmask=255.255.0.0, num_pes=1, numNS-KERN nsppe_rendezvous: NSPPE-00 on CPU1 _sslchips=1, platforNS-KERN map_shared_mem_ioctl (cpu 1, NSPPE-00): Reserving 232 MB for shared memory type 0 m_lic=0x801, timezone=4294966696, dstflag=1, rss_key_type=0, rss_key=NULL} ifconfig: 0/1 inet 192.168.100.1 netmask 255.255.0.0 gateway: 192.168.0.1 NetScaler has started successfully Start additional daemons: May 24 02:56:33 … monit monit daemon at 1000 awakened . NetScaler initialization is still in progress; please wait 20 to 30 seconds before attempting to log in. login: nsroot Password: nsroot May 24 02:58:13 <auth.notice> ns login: ROOT LOGIN (nsroot) ON ttyu0 Copyright (c) 1992-2013 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. Done > shell Copyright (c) 1992-2013 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. root@ns#
    The web interface for managing the device should default to http://192.168.100.1
  5. Copy all the output from the session into your records.

    Right-click PuTTY's titlebar, from that dropdown menu click on "Copy All to Clipboard"
    Open the file of record certifying the deconfiguration of this device and use CTRL V to paste all the output from PuTTY into that file. Formatting the text with a fixed-width font helps it look more readable.
  6. End the session.

    Close PuTTy.