# Issue with installing FreeBSD 13.1 from memstick on Acer Aspire 5



## egoholic (Aug 2, 2022)

I'm very new to FreeBSD and trying to instal FreeBSD 13.1 as the only OS on my new Acer Aspire 5 (A515-45G-R57J) with memstick.

I used that instruction to create a bootable memstick: https://docs.freebsd.org/en/books/handbook/bsdinstall/#bsdinstall-usb on macos and downloaded the following image: FreeBSD-13.1-RELEASE-amd64-memstick.img.

When I tried to boot from the memstick, I got the following message:

```
Consoles: EFI console
    Reading loader env vars from /efi/freebsd/loader.env
FreeBSD/amd64 EFI loader, Revision 1.1

    Command line arguments: loader.efi
    EFI version: 2.70
    EFI Firmware: INSYDE Corp. (rev 24631.16648)
    Console: efi (0)
    Load Path: \EFI\BOOT\BOOTX64.EFI
    Load Device: PciRoot(0x0)/Pci(0x0,0x1)/Pci(0x0,0x3)/USB(0x5,0x0)/HD(1,MBR,0x00000000,0x7397800)/HD(1,MBR,0x00000000,0x801,0x10418)
    BootCurrent: 0001
    BootOrder: 2001 0000 2002 2003
    BootInfo Path:UsbWwid(0x951,0x1666,0x8,"408D5CB45FDAE611B9453134")/HD(1,MBR,0x00000000,0x7397800)/HD(1,MBR,0x00000000,0x801,0x10418)
Ignoring Boot0001: Only one DP found
Failed to find bootable partition
ERROR: cannot open /boot/lua/loader.lua: invalid argument.
```


```
OK show
```
 shows the following variables:


```
COLUMNS=240
LINES=67
autoboot_delay=NO
comconsole_pcidev=
comconsole_port=1016
comconsole_speed=9600
console=efi
currdev=
efi-version=2.70
hint.smbios.0.mem=0xca50b000
interpret=OK
prompt=${interpret}
screen.depth=32
screen.font=0x16
screen.height=1000
screen.width=1920
script.lang=lua
smbios.bios.reldate=09/06/2021
smbios.bios.vendor=INSYDE corp.
smbios.bios.version=V1.08
smbios.chassis.maker=Chassis Manufacturer
smbios.chassis.serial=Chassis Serial Number
smbios.chassis.tag=
smbios.chassis.type=Notebook
smbios.chassis.version=Chassis Version
smbios.memory.enabled=16777216
smbios.planar.location=Base Board Chassis Location
smbios.planar.maker=LN
smbios.planar.product=Calla_LC
smbios.planar.serial=<hidden>
smbios.planar.tag=Base Board Asset Tag
smbios.planar.version=V1.08
smbios.socket.enabled=1
smbios.socket.populated=1
smbios.system.family=Aspire 5
smbios.system.maker=Acer
smbios.system.product=Aspire A515-45G
smbios.system.serial=<hidden>
smbios.sku=0000000000000000
smbios.system.uuid=<hidden>
smbios.system.version=V1.08
smbios.version=3.3
teken.bg_color=0
teken.fg_color=7
twiddle_divisor=16
```

I read on the forum that to set currdev to the bootable device (memstick), so I did the following steps:
1.

```
OK lsdev
disk devices:
    disk0: 1000215216 X 512 blocks
        disk0p1: EFI
        disk0p2: DOS/Windows
    disk1: 121208832 X 512 blocks (removable)
        disk1s1: DOS/Windows
http: (unknown)
net devices:
    net0:
```

2. 
	
	



```
OK set currdev=disk1s1:
```

3. 
	
	



```
OK reboot
```


But that haven't helped me. What I did wrong?


----------



## tingo (Aug 2, 2022)

Don't do reboot here. Instead do boot-conf. Generic recipe:

```
unload
set currdev=<your boot device>
boot-conf
```
boot device works with and without the ':', example disk1p5 and disk1p5: both work.


----------



## egoholic (Aug 2, 2022)

tingo said:


> Don't do reboot here. Instead do boot-conf. Generic recipe:
> 
> ```
> unload
> ...


Thank you for your help. Unfortunately, I have no _boot-conf _command. Here is a list of commands that command _show_ presents to me:


copy_staging (copy taging)
staging_slop (set staging slop)
efi-autoresizecon (EFI auto-resize console)
gop (graphics output protocol)
uga (universal graphics adapter)
efi-seed-entropy (try to get entropy from the EFI RNG)
poweroff (power off the system)
reboot (reboot the system)
quit (exit the loader)
memmap (print memory map)
configuration (print configuration tables)
mode (change or display EFI text modes)
lsefi (list EFI habdles)
chain (chain load file)
netserver (change or display netserver URI)
loadfont (load console font from file)
grab_faults (grab faults)
ungrab_faults (ungrab faults)
fault (generate fault)
boot (boot a file or loaded kernel)
autoboot (boot automatically after a delay)
help (detailed help)
? (list commands)
show (show variable(s))
set (set a variable)
unset (unset a variable)
echo (echo arguments)
read (read input from the terminal)
more (show contents of a file)
lsdev (list all devices)
readtest (time a file read)
include (read commands from a file)
ls (list files)
load (load a kernel or module)
load_geli (load a geli key)
unload (unload all modules)
lsmod (list loaded modules)
pnpmatch (list matched modules based on pnpinfo)
pnpload (load matched modules based on pnpinfo)
pnpautoload (auto load modules based on pnpinfo)
nvstore (manage non-volatile data)
map-vdisk (map file as virtual disk)
unmap-vdisk (unmap virtual disk)
bcachestat (get disk block cache stats)
lszfs (list child datasets of a zfs dataset)
reloadbe (refresh the list of ZFS Boot Environments)
efi-show (print some or all EFI variables)
efi-set (set EFI variables)
efi-unset (delete/uset EFI variables)


----------



## T-Daemon (Aug 3, 2022)

egoholic said:


> ```
> OK lsdev
> disk devices:
> disk0: 1000215216 X 512 blocks
> ...


That doesn't look right. It should as below:

```
disk devices:
     ...
     disk1:  .....
       disk1s1: Unknown
       disk1s2: FreeBSD
         disk1s2a: FreeBSD UFS
```

Have you checked the checksum of the downloaded memstick image before writing on the USB stick? And have you made sure, when writing on the USB disk, to choose the disk, not a disk partition?


----------



## egoholic (Aug 3, 2022)

T-Daemon said:


> That doesn't look right. It should as below:
> 
> ```
> disk devices:
> ...



`shasum -a 512 ~/Desktop/FreeBSD-13.1-RELEASE-amd64-memstick.img 

96bf96628a566cb33d736315dfb56e3076ab0d757ad6c94fa2235866007f7726dc42ac2b81abd7810ae40a945220088605dbf387ebed7d688a9b80dec5253247  /Users/vladimirmelnick/Desktop/FreeBSD-13.1-RELEASE-amd64-memstick.img`

Sha512 from the FreeBSD site:

```
SHA512 (FreeBSD-13.1-RELEASE-amd64-memstick.img) = 96bf96628a566cb33d736315dfb56e3076ab0d757ad6c94fa2235866007f7726dc42ac2b81abd7810ae40a945220088605dbf387ebed7d688a9b80dec5253247
```

So the sha512 matches.
To create the boot memstick I did the following steps:

1. I cleaned up the memstick with macos Disk Utility





2. Then I unmounted the disk with:
`sudo diskutil umount /dev/disk2s1                                                     


Volume FreeBSD on disk2s1 unmounted`

3. Then I wrote the image using dd with:
`sudo dd if="FreeBSD-13.1-RELEASE-amd64-memstick.img" of="/dev/disk2s1" bs=1m conv=sync

1117+1 records in

1118+0 records out

1172307968 bytes transferred in 248.742854 secs (4712931 bytes/sec)`


----------



## T-Daemon (Aug 3, 2022)

egoholic said:


> 3. Then I wrote the image using dd with:
> 
> ```
> sudo dd if="FreeBSD-13.1-RELEASE-amd64-memstick.img" of="/dev/*disk2s1*" bs=1m conv=sync
> ```


That command is writing the FreeBSD image on a disk partition (disk2s1 - disk 2, slice 1). The image must be written on the disk itself /dev/disk2:

`dd if=FreeBSD-13.1-RELEASE-amd64-memstick.img of=/dev/disk2 bs=1m conv=sync`


----------



## egoholic (Aug 3, 2022)

T-Daemon said:


> That command is writing the FreeBSD image on a disk partition (disk2s1 - disk 2, slice 1). The image must be written on the disk itself /dev/disk2:
> 
> `dd if=FreeBSD-13.1-RELEASE-amd64-memstick.img of=/dev/disk2 bs=1m conv=sync`


Thank you! That helped me to install FreeBSD.


----------



## egoholic (Aug 3, 2022)

During the installation I've see only the ethernet interface setup, but nothing related to wireless networks. Am I right that the problem could be with wifi drivers? What the next steps to solve it? Wifi standard is: IEEE 802.11 a/b/g/n/ac/ax.


----------



## T-Daemon (Aug 3, 2022)

See Handbook, 32.3. Wireless Networking.

If command `sysctl net.wlan.devices` doesn't return a device, execute `pciconf -lv | grep -B3 network` and post the information about the wireless.


----------



## egoholic (Aug 3, 2022)

T-Daemon said:


> See Handbook, 32.3. Wireless Networking.
> 
> If command `sysctl net.wlan.devices` doesn't return a device, execute `pciconf -lv | grep -B3 network` and post the information about the wireless.


Thank you for your help. Here is my terminal session:


```
# sysctl net.wlan.devices
new.wlan.devices:

# pciconf -lv | grep -B3 network
re0@pci0:3:0:0: class=0x020000 rev=0x15 hdr=0x00 vendor=0x10ec device=0x8168 subvendor=0x1025 subdevice=0x152b
    vendor   = 'Realtek Semiconductor Co., Ltd.'
    device   = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller'
    class    = network
    subclass = ethernet
none1@pci0:4:0:0:    class=0x028000 rev=0x00 hdr=0x00 vendor=0x14c3 device=0x7961 subvendor=0x11ad subdevice=0x3802
    vendor   = 'MEDIATEK Corp.'
    class    = network
```


----------



## T-Daemon (Aug 4, 2022)

egoholic said:


> ```
> none1@pci0:4:0:0: class=0x028000 rev=0x00 hdr=0x00 vendor=0x14c3 *device*=0x*7961* subvendor=0x11ad subdevice=0x3802
> vendor = 'MEDIATEK Corp.'
> class = network
> ```


It looks like that particular MEDIATEK wireless is unsupported on FreeBSD. MT7961 runs on Linux with the mt7921e driver. In the FreeBSD source there is no trace of a mt79xx driver.

To get wireless on FreeBSD you need a supported internal PCI or external USB device.


----------



## egoholic (Aug 4, 2022)

T-Daemon said:


> It looks like that particular MEDIATEK wireless is unsupported on FreeBSD. MT7961 runs on Linux with the mt7921e driver. In the FreeBSD source there is no trace of a mt79xx driver.
> 
> To get wireless on FreeBSD you need a supported internal PCI or external USB device.


How I can check in a store with smartphone if particular USB wifi device will work fine with FreeBSD or I need to bring the notebook to the store and just test it? What the procedure for such a test, will a USB device be recognised by FreeBSD and automagicaly setted up, or I need to perform some setup in a terminal? Where I can fine such info? In the FreeBSD handbook I found only info about network devices setup during installation process.


----------



## elgrande (Aug 4, 2022)

egoholic said:


> How I can check in a store with smartphone if particular USB wifi device will work fine with FreeBSD or I need to bring the notebook to the store and just test it? What the procedure for such a test, will a USB device be recognised by FreeBSD and automagicaly setted up, or I need to perform some setup in a terminal? Where I can fine such info? In the FreeBSD handbook I found only info about network devices setup during installation process.


https://www.freebsd.org/releases/13.1R/hardware/ has a section '3.4. Wireless Network Interfaces', you could check against this to be safe.


----------



## T-Daemon (Aug 4, 2022)

Other supported wireless cards not mentioned in the 13.1-RELEASE hardware notes, like iwlwifi(4), can be viewed by searching the manual page databases: `apropos wireless`.

iwlwifi supported devices, full list.


----------



## Voltaire (Aug 4, 2022)

egoholic said:


> How I can check in a store with smartphone if particular USB wifi device will work fine with FreeBSD or I need to bring the notebook to the store and just test it? What the procedure for such a test, will a USB device be recognised by FreeBSD and automagicaly setted up, or I need to perform some setup in a terminal? Where I can fine such info? In the FreeBSD handbook I found only info about network devices setup during installation process.


What I always do is use a cheap WiFi range extender and then connect it to my desktop with a LAN (ethernet) cable. The advantage of an extender is that you have *faster and more reliable internet speeds* than with a USB dongle. This is an ideal solution for a _desktop_ system.

If you usually work in the same place with your notebook, it can also be an ideal solution for a notebook, if the notebook has an ethernet port. You should of course ensure that the WiFi extender you purchase has an ethernet output.

In my experience, NetBSD has excellent support for USB Wi-Fi dongles. FreeBSD should take a look at how NetBSD pulls this off.


----------



## T-Daemon (Aug 6, 2022)

T-Daemon said:


> To get wireless on FreeBSD you need a supported internal PCI or external USB device.


egoholic, another option, without the need of purchasing new hardware, could be net/wifibox-alpine (there is support for the MEDIATEK MT79xx). For details see wifibox(8) manual.

When installation from port, choose FLAVOR mediatek, when pkg, wifibox-alpine-mediatek.


----------

