# help! show missing OS when booting from memstick



## youxiaojie (Sep 27, 2021)

I dd freebsd 13 memstick install image to usb disk, and boot a stone-age machine(xeon 2800dp, 4G ddr 1, server work chip set, usb 1.0 lsi53c1020 scsi disk), and show missing operation system. why?
ps. this usb disk could boot amd ryzen 1600x with asus b350 plus motherboard. but errors:
ubt0: ubt_bulk_read_callback:1103: bulk-in transfer failed:USB_ERR_STALLED.


----------



## tingo (Sep 28, 2021)

"ubt0" is a bluetooth device, probably not related to the boot error.
Xeon 2800 exists in both a 32-bit and a 64-bit variant. Are you sure that yours is 64-bit? If not, it will not boot the amd64 image.
Things to try: - a different usb port (if possible), - a different usb stick


----------



## SirDice (Sep 28, 2021)

Were USB 1.0 machines capable of booting from a USB stick or HD? I can't remember. You might need to find a CD-ROM device and burn an ISO image to get it to boot.

Another way would be to take the LSI SCSI card and SCSI disk out, put it in a more modern machine. Use that to install FreeBSD on the SCSI disk and move the card and drive back to the old Xeon machine. But looking at the specs of the LSI 53c1020 card it's a PCI-X card, not sure if that will work in a standard PCI slot (it's been a really long time ago).


----------



## tingo (Sep 30, 2021)

If the machine in question has a working CD-ROM drive, and the OP suspects that the BIOS can't boot from a usb stick, check out Plop Boot Manager. It allows any machine to boot from usb.


----------



## D-FENS (Sep 30, 2021)

Also, there is the option to boot from network via PXE. Most old machines should be able to do it, I have done it on a Toshiba Satellite from 2001 with 512 MB memory.
This option is relatively difficult to set up but in my case it was the only option because the CD-ROM was broken.
Also, when using PXE on some setups the RAM size could be a problem (as in my case) because the installation is first transferred to a RAMdisk, but with 4GB the FreeBSD installation should load just fine.


----------



## grahamperrin@ (Oct 2, 2021)

SirDice said:


> Were USB 1.0 machines capable of booting from a USB stick or HD? I can't remember. …



Not a definite answer, but I believe so.

I'm almost certain that at least once, I booted a computer (probably a Mac) from the USB hub that was integral to a very old Apple keyboard (or a very old keyboard with a Mac layout), and the boot was excruciatingly slow, which caused me to look up the spec of the keyboard.

*Afterthought*: sorry, that's probably _not_ an answer. It might have been a USB 1.0 keyboard attached to a 2.0 or greater port in the computer.


----------



## youxiaojie (Oct 10, 2021)

I am sure, the usb 1.0 could boot windows pe(recovery envriment, syslinux as bootloader) and reconized as hdd in bios, wired! and I put the hdd out and installed with modern machine.


----------



## youxiaojie (Oct 10, 2021)

roccobaroccoSC said:


> Also, there is the option to boot from network via PXE. Most old machines should be able to do it, I have done it on a Toshiba Satellite from 2001 with 512 MB memory.
> This option is relatively difficult to set up but in my case it was the only option because the CD-ROM was broken.
> Also, when using PXE on some setups the RAM size could be a problem (as in my case) because the installation is first transferred to a RAMdisk, but with 4GB the FreeBSD installation should load just fine.


what file do I need?


----------



## Phishfry (Oct 10, 2021)

One problem when installing from a FreeBSD USB Memstick onto a USB stick is drive assignments.
When you boot up off the FreeBSD memstick installer it uses the first available USB drive assignment.
With no other USB drives installed this drive will be called da0 and can be found at /dev/da0 using `ls /dev`

So now lets assume you add a second USB stick to the mix. This will now get the drive assignment of da1.
Now when you install FreeBSD onto da1 everything goes fine. But when you finish and reboot it will not boot?
Why?
Because when you installed FreeBSD onto this USB stick it was labeled da1 but now with only one usb stick inserted it is labeled da0.
So the fix is to modify /etc/fstab and point it to da0 instead of da1.
When you installed FreeBSD onto da1 the installer uses that for the /etc/fstab settings.
The installer has a post install shell that works perfect for modifying /etc/fstab.
Another option is to boot up off memstick installer and use LiveCD to modify /mnt/etc/fstab

Lastly the way around all this hassle is to use a *disk label* when in the disk partition phase of the installer.


----------



## youxiaojie (Oct 10, 2021)

Phishfry said:


> Lastly the way around all this hassle is to use a *disk label* when in the disk partition phase of the installer.


how to use disk label instead /dev/da0? thanks. I am a newer from linux to bsd because the linux has some problem with my old hardware, kernel panic frequently.


----------



## Phishfry (Oct 10, 2021)

youxiaojie said:


> how to use disk label instead /dev/da0?


There are multitudes of ways to label disks in FreeBSD. glabel is used by tunefs and is what the installer would use.
Problem is you should not be mounted when setting label so boot up off memstick installer and use LiveCD mode.
From there run tunefs on the FreeBSD USB stick setting a label.








						Chapter 20. GEOM: Modular Disk Transformation Framework
					

In FreeBSD, the GEOM framework permits access and control to classes, such as Master Boot Records and BSD labels, through the use of providers, or the disk devices in /dev.




					docs.freebsd.org
				




Truthfully with a single disk modifying /etc/fstab is what I do.


----------



## sidetone (Oct 11, 2021)

youxiaojie said:


> how to use disk label instead /dev/da0?





			FreeBSD Labeled Filesystems
		


It's easier to not add a label to the root partition, but it can be done by rebooting into single user mode.


----------



## D-FENS (Oct 11, 2021)

youxiaojie said:


> what file do I need?


Booting via PXE requires you to set up a TFTP and DHCP server first. It's a bit complicated. Here is a guide I found randomly: https://virtualisationworks.wordpress.com/2017/10/20/network-booting-freebsd/


----------



## grahamperrin@ (Oct 11, 2021)

sidetone said:


> FreeBSD Labeled Filesystems



Is it possible to apply a label to a FreeBSD ZFS partition (type code a504), _after_ creation of the partion? 

For the two partitions below, I vaguely recall labelling at time of creation because I could not find a way to apply a label afterwards. 


```
root@mowa219-gjp4-8570p-freebsd:~ # gpart show -l da0
=>      34  60437425  da0  GPT  (29G)
        34  60437425    1  cache-august  (29G)

root@mowa219-gjp4-8570p-freebsd:~ # gpart show -l da1
=>      34  32358333  da1  GPT  (15G)
        34      2014       - free -  (1.0M)
      2048  32356319    1  duracell  (15G)

root@mowa219-gjp4-8570p-freebsd:~ # zpool iostat -v
                      capacity     operations     bandwidth
pool                alloc   free   read  write   read  write
------------------  -----  -----  -----  -----  -----  -----
august               250G   662G     34     20   741K   422K
  ada0p3.eli         250G   662G     34     20   741K   422K
cache                   -      -      -      -      -      -
  gpt/cache-august  13.6G  15.2G     12      0   557K  88.6K
  gpt/duracell      13.9G  1.55G     11      0   422K  92.2K
------------------  -----  -----  -----  -----  -----  -----
root@mowa219-gjp4-8570p-freebsd:~ #
```


----------



## Tieks (Oct 11, 2021)

grahamperrin said:


> Is it possible to apply a label to a FreeBSD ZFS partition (type code a504), _after_ creation of the partion?


See gpart(). Afaik you can even use `gpart modify -i <part. index> -l <new label>` on a mounted partition.


----------



## Phishfry (Oct 11, 2021)

That don't sound very wise to change the label of a a mounted partition. Possible yes, wise no.
Heck you could probably label it via tunefs while live. I wouldn't.
Some people disconnect power before working on energized systems. Some don't.


----------



## grahamperrin@ (Oct 11, 2021)

Phishfry said:


> … probably label it via tunefs while live. …



Nope, at least not with UFS in FreeBSD 12.2-RELEASE-p7:


----------



## grahamperrin@ (Oct 11, 2021)

gpart(8) works, thanks Tieks. 

I did try it a few weeks ago, without success, I probably used the wrong syntax.


----------



## Tieks (Oct 11, 2021)

Phishfry said:


> That don't sound very wise to change the label of a a mounted partition.


I figured gpart would give me an error when it didn't like that. Nope, it just worked (on a GPT disk).



Phishfry said:


> Some people disconnect power before working on energized systems. Some don't.


When you `shutdown -p now` the led's go out and the fans stop working, but the power supply is still on. A 5 volt line is needed for things like wake on LAN. Most people don't know that.
If you have to work on your hardware you have to unplug the power cord.


----------

