Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    How do I know wich nanobsd slice is currently used?

    Scheduled Pinned Locked Moved General pfSense Questions
    11 Posts 3 Posters 6.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • E
      Efonnes
      last edited by

      I think /dev/ufs/pfsense0 is slice 1 and /dev/ufs/pfsense1 is slice 2, but I'm not completely sure of this.  Other than that, in the webConfigurator you should be able to see which is currently set by going to Diagnostics -> NanoBSD.

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        You can tell from Diagnostics > NanoBSD, or by the output of:

        boot0cfg -v /dev/ad0
        

        The "default selection" line is the slice you booted.

        The previous poster was correct, slice "1" is pfsense0 and slice "2" is pfsense1.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • D
          dominik
          last edited by

          Thank you for replying.
          Is there a way to choose on the boot promt (before: /boot.config: -h  ) which slice to boot?

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            There might be, not sure what it is offhand though. It may be too late at that point, since the slice selection is done at the F1/F2 prompt.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • E
              Efonnes
              last edited by

              When it lists the slices at bootup, just press 1 or 2 to select the one you want to boot (note that it will not show confirmation of your choice here).  There is no need to press enter or any other key after the number.

              1 Reply Last reply Reply Quote 0
              • D
                dominik
                last edited by

                [1.2.3-RELEASE] [root@fsg-serv2.fsg.e-technik.uni-kassel.de]/root(1): mount     
                /dev/ufs/pfsense1 on / (ufs, local, read-only)                                  
                devfs on /dev (devfs, local)                                                    
                /dev/md0 on /var/tmp (ufs, local)                                               
                /dev/md1 on /var (ufs, local)                                                   
                /dev/ufs/cf on /cf (ufs, local, read-only)                                      
                devfs on /var/dhcpd/dev (devfs, local)                                          
                [1.2.3-RELEASE] [root@fsg-serv2.fsg.e-technik.uni-kassel.de]/root(2): boot0cfg -
                v  /dev/ad0                                                                     
                #   flag     start chs   type       end chs       offset         size           
                1   0x80      0:  1: 1   0xa5    758: 15:63           63      3861585           
                2   0x00    759:  1: 1   0xa5    493: 15:63      3861711      3861585           
                3   0x00    494:  0: 1   0xa5    595: 15:63      7723296       102816           
                
                version=1.0  drive=0x80  mask=0x3  ticks=182  bell=# (0x23)                     
                options=packet,update,nosetdrv                                                  
                default_selection=F1 (Slice 1)                                          
                
                

                WebGui shows as default slections:

                
                Bootupslice ad0s1
                Destination slice: ad0s1 -> ad0s2
                
                

                setting Bootupslice in webgui to ad0s2 results in

                
                Warning: fopen(/tmp/pfsense1/etc/fstab): failed to open stream: No such file or directory in /etc/inc/pfsense-utils.inc on line 1160 Warning: fwrite(): supplied argument is not a valid stream resource in /etc/inc/pfsense-utils.inc on line 1161 Warning: fclose(): supplied argument is not a valid stream resource in /etc/inc/pfsense-utils.inc on line 1162 
                
                

                and console says:

                
                [1.2.3-RELEASE] [root@fsg-serv2.fsg.e-technik.uni-kassel.de]/root(3): boot0cfg -
                v /dev/ad0                                                                      
                #   flag     start chs   type       end chs       offset         size           
                1   0x00      0:  1: 1   0xa5    758: 15:63           63      3861585           
                2   0x80    759:  1: 1   0xa5    493: 15:63      3861711      3861585           
                3   0x00    494:  0: 1   0xa5    595: 15:63      7723296       102816           
                
                version=1.0  drive=0x80  mask=0x3  ticks=182  bell=# (0x23)                     
                options=packet,update,nosetdrv                                                  
                default_selection=F2 (Slice 2)                                       
                
                

                next reboot says:

                
                Boot: 2
                /boot/config-h
                ...
                ad0: 3825MB <sandisk sdcfx3-4096="" hdx="" 5.00="">at ata0-master PIO4                  
                WARNING: Expected rawoffset 0, found 3861711                                    
                WARNING: Expected rawoffset 0, found 3861711                                    
                Trying to mount root from ufs:/dev/ufs/pfsense1            
                ...
                [1.2.3-RELEASE] [root@fsg-serv2.fsg.e-technik.uni-kassel.de]/root(1): mount     
                /dev/ufs/pfsense1 on / (ufs, local, read-only)                                  
                devfs on /dev (devfs, local)                                                    
                /dev/md0 on /var/tmp (ufs, local)                                               
                /dev/md1 on /var (ufs, local)                                                   
                /dev/ufs/cf on /cf (ufs, local, read-only)                                      
                devfs on /var/dhcpd/dev (devfs, local)                         
                [1.2.3-RELEASE] [root@fsg-serv2.fsg.e-technik.uni-kassel.de]/root(3): boot0cfg -
                v /dev/ad0                                                                      
                #   flag     start chs   type       end chs       offset         size           
                1   0x00      0:  1: 1   0xa5    758: 15:63           63      3861585           
                2   0x80    759:  1: 1   0xa5    493: 15:63      3861711      3861585           
                3   0x00    494:  0: 1   0xa5    595: 15:63      7723296       102816           
                
                version=1.0  drive=0x80  mask=0x3  ticks=182  bell=# (0x23)                     
                options=packet,update,nosetdrv                                                  
                default_selection=F2 (Slice 2)</sandisk> 
                

                If I try to set bootup slice in webgui to ad0s1, the gui responses:

                
                Warning: fopen(/tmp/pfsense0/etc/fstab): failed to open stream: No such file or directory in /etc/inc/pfsense-utils.inc on line 1160 Warning: fwrite(): supplied argument is not a valid stream resource in /etc/inc/pfsense-utils.inc on line 1161 Warning: fclose(): supplied argument is not a valid stream resource in /etc/inc/pfsense-utils.inc on line 1162 
                
                

                Console:

                
                [1.2.3-RELEASE] [root@fsg-serv2.fsg.e-technik.uni-kassel.de]/root(4): boot0cfg -
                v /dev/ad0                                                                      
                #   flag     start chs   type       end chs       offset         size           
                1   0x80      0:  1: 1   0xa5    758: 15:63           63      3861585           
                2   0x00    759:  1: 1   0xa5    493: 15:63      3861711      3861585           
                3   0x00    494:  0: 1   0xa5    595: 15:63      7723296       102816           
                
                version=1.0  drive=0x80  mask=0x3  ticks=182  bell=# (0x23)                     
                options=packet,update,nosetdrv                                                  
                default_selection=F1 (Slice 1) 
                
                

                after nex reboot, console says

                
                Boot: 1
                /boot/config-h   
                ...
                ad0: 3825MB <sandisk sdcfx3-4096="" hdx="" 5.00="">at ata0-master PIO4                  
                WARNING: Expected rawoffset 0, found 3861711                                    
                WARNING: Expected rawoffset 0, found 3861711                                    
                Trying to mount root from ufs:/dev/ufs/pfsense1                                 
                Setting up embedded specific environment... done.</sandisk> 
                

                So it is always using /dev/ufs/pfsense1, independently of my settings.
                Is the the correct behavior?

                1 Reply Last reply Reply Quote 0
                • E
                  Efonnes
                  last edited by

                  It sounds like you are using or upgraded from an older version than 1.2.3 release.  I had the same issue at some time.  You will probably need to reflash your card with the 1.2.3 release (or anything newer).

                  1 Reply Last reply Reply Quote 0
                  • D
                    dominik
                    last edited by

                    It sounds like you are using or upgraded from an older version than 1.2.3 release.

                    no, it is freshly flashed.
                    But the behavior of my box is unexpected ?

                    1 Reply Last reply Reply Quote 0
                    • E
                      Efonnes
                      last edited by

                      I'm not sure of the exact cause, but I did have this same issue when I had originally flashed the CF card with 1.2.3 RC3 and then upgraded to 1.2.3 release without reflashing.  It also prevented me from doing further in-place upgrades, because they would always fail for the same reason that switching slices would fail in the web interface.

                      1 Reply Last reply Reply Quote 0
                      • D
                        dominik
                        last edited by

                        I tested an other CF-Card (2GB instead of 4GB), and nanobsd is working like expected: on boot, I can change interactively which slice to boot, mount shows /dev/ufs/pfsense0 and pfsense1 for slice 1 and 2, and I can change the bootup slice in Webgui without errors.

                        Thank you for your comments.

                        Up to last week I knew that pfsense is great. Now I know additionally that this forum is great, too.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.