# Nanobsd Problems



## embeddedbob (Apr 21, 2010)

Im having a hard time getting nanbsd to boot.

I have an Intel atom 270 ITX board with a compact flash card. Most folk seem to use nanobsd on a system where console access is via the serial port but I will be using the normal vga/usb keyboard. 

After setting the bootloader (NANO_BOOTLOADER) to be /boot/boot0 (instead of /boot/bootsio), the drive to be ad4 (NANO_DRIVE) I get the first boot loader but no matter what I to do, all I get is the bell char output i.e. '#' after this.

I *dont* have 'customize_cmd cust_comconsole' in my config.

If anyone can point me in the direction of why this is happening or why the bell char is output, I would be very grateful. 

Is it failing to find the second bootloader? Im using the standard option for a SanDisk 4G compact flash card which is specified.



Config:


```
CONF_BUILD='
NO_KLDLOAD=YES
NO_NETGRAPH=YES
NO_PAM=YES
'

CONF_INSTALL='
NO_CVS=YES
NO_FORTRAN=YES
NO_HTML=YES
NO_LPR=YES
NO_MAN=YES
NO_SENDMAIL=YES
NO_SHAREDOCS=YES
NO_EXAMPLES=YES
NO_INSTALLLIB=YES
NO_CALENDAR=YES
NO_MISC=YES
NO_SHARE=YES
'

CONF_WORLD='
NO_MODULES=YES
NO_KERBEROS=YES
NO_GAMES=YES
NO_RESCUE=YES
NO_LOCALES=YES
NO_INFO=YES
'

FlashDevice SanDisk 4G

customize_cmd cust_install_files
customize_cmd cust_allow_ssh_root
```


----------



## aragon (Apr 21, 2010)

Sounds like it isn't able to chainload the next boot loader, yup.

What version of FreeBSD are you using?


----------



## embeddedbob (Apr 21, 2010)

Hi,

Im running 8.0 RELEASE.


----------



## aragon (Apr 21, 2010)

The stock nanobsd has a number of issues.  It might be failing silently as it likes to do.  Try apply my patch:

http://www.freebsd.org/cgi/query-pr.cgi?pr=misc/136889


----------



## mix_room (Apr 22, 2010)

Is it the same problem that I had? 
http://forums.freebsd.org/showthread.php?t=13367

Did you check that the console is active in /etc/ttys?


----------



## embeddedbob (Apr 22, 2010)

Hi, I looked at your issue but ttyv0 is on. 

Aragon, ill try again with your patch but the image on CF does mount on my other machine and I can see that it looks pretty intact. Ive got some time tonight to look into it...

Little frustrating that I seem to be having so many problems when it works first time for other, ah well, such is much of computing


----------



## embeddedbob (Apr 22, 2010)

Obviously the first boot stage, boot0 is installed in the first 63 sectors as I get the menu, but its aftet this that things fall over so looking at the first slice using 'gpart show ad6s1':


```
=> 0 7900641 ad6s1 BSD (3.8G)
   0      16       - Free - (8.0K)
  16 7900625     1 !0 (3.8G)
```

The 16 sectors at the start of the slice is normal according to bsdlabel(8)

I presume '!0' means the value that would determine the partition type i.e. freebsd-ufs, is null. I presume this isnt correct?


----------



## aragon (Apr 23, 2010)

Yea, that should show the file system type and should be freebsd-ufs.  Mine, however, shows the same as yours and is working.

Could you paste a "gpart show ad6" please?


----------



## embeddedbob (Apr 24, 2010)

Heres the disk info. 


```
$ gpart show ad6
=>     63  8027649  ad6  MBR  (3.8G)
       63  7900641    1  freebsd  [active]  (3.8G)
  7900704   102816    3  freebsd  (50M)
  8003520    24192       - free -  (12M)


$ gpart show ad6s1
=>      0  7900641  ad6s1  BSD  (3.8G)
        0       16         - free -  (8.0K)
       16  7900625      1  freebsd-ufs  (3.8G)

$ gpart show ad6s3
gpart: No such geom: ad6s3.
```

Slice 1 OS and Slice 3 config (?)


----------



## aragon (Apr 24, 2010)

Yea, slice 3 is for persistent configuration.  There should actually be a slice 2 the same size as slice 1 as well.  The idea is to switch between slices when performing upgrades.  This is how mine looks:


```
=>     63  8027649  ad0  MBR  (3.8G)
       63   525105    1  freebsd  (256M)
   525168       63       - free -  (32K)
   525231   525105    2  freebsd  [active]  (256M)
  1050336    33264    3  freebsd  (16M)
  1083600    13104       - free -  (6.4M)
  1096704  2112768    4  freebsd  (1.0G)
  3209472  4818240       - free -  (2.3G)

=>     0  525105  ad0s1  BSD  (256M)
       0      16         - free -  (8.0K)
      16  525089      1  !0  (256M)

=>     0  525105  ad0s2  BSD  (256M)
       0      16         - free -  (8.0K)
      16  525089      1  !0  (256M)

=>      0  2112768  ad0s4  BSD  (1.0G)
        0      256         - free -  (128K)
      256  1056256      1  freebsd-ufs  (516M)
  1056512  1056256      2  freebsd-ufs  (516M)
```

Only other thing that might be wrong is the drive geometry setting.  Do you have a FlashDevice directive in your nanobsd config?  Is it correct?


----------

