Install FreeBSD *from* an internal drive *to* another internal drive

I know that this is hardly a typical installation method, but I don't have any thumb drives or burnable CD/DVD-ROMs handy. I do however have a stack of old hard drives, so decided to try installing from one of them. I did try to 'dd' a couple of the FreeBSD install images (the DVD and memstick ISOs) directly onto an internal disk and then attempt to boot from that drive. My only reward was the word 'GRUB' in the upper left hand corner of my screen.

Is there another install image that is amenable to booting directly off of a hard drive? I've tried writing directly to the device, as well as partition 1 but always get 'GRUB'. Am I doing this wrong, or is it just impossible?
 
I think the memstick image *is* the correct one. There's a recent post here from someone doing, essentially, just this on an OVHCloud dedicated private server by copying the memstick image to one of the internal ssds and booting from that to perform the install. You will have to ensure the mainboard boots from the drive you've copied the image to, and not one of the other drives on the system. This may require wiping/erasing them first if there's no way to specify the correct boot drive.

(I'm guessing grub was installed on one of the other drives and that's the one the system is trying to boot from)
 
Reset the MBR on the drive, typically using dd.

Something like dd if=/dev/zero of=/dev/sdX bs=512 count=1
 
  • Like
Reactions: drr
cracauer@ It's a multiboot system, including two Linux distros and Windows. Perhaps it's failing to boot FreeBSD and then misguidedly trying to boot off one of the GRUB enabled drives. Disabling all drives except the one with the FreeBSD installer might net some more information.

RypPn Good plan, I'll try that next. Though I would've thought dd'ing to /dev/sdb would have zapped the MBR as well.
 
At this point I would like to see the actual dd command. And a diagram of all drives and OSes.

If Grub is just printing GRUB and then hangs that is a sign that Grub's "root filesystem" (which is /boot) is not present or corrupted.
 
Agree with Cracauer: This is likely user error. I've done the install with two disk drives: take the install image, uncompressed it if compressed, and dd it onto a whole disk drive (not on a partition). Connect that extra disk drive to the computer, and configure the BIOS to boot from it and not from other drives. In the process, leave the target disk connected; for safety, it might be good to disconnect all other disks.
 
I would include the output of 'lsblk' but I have changed the disk configuration/layout multiple times trying to troubleshoot this, so I cannot provide an accurate disk/partition map & layout.

As mentioned, the drive layout has changed such that /dev/sdc is now the drive I am attempting to use to install FreeBSD. fdisk is indicating a potential issue with the drive, noted below.


sudo fdisk -l /dev/sdc
GPT PMBR size mismatch (8082903 != 1250261614) will be corrected by write.
The backup GPT table is not on the end of the device.
Disk /dev/sdc: 596.17 GiB, 640133946880 bytes, 1250261615 sectors
Disk model: WDC WD6400AAKS-0
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[HIGHLIGHT]
Disklabel type: gpt
[/HIGHLIGHT]
Disk identifier: B1F5F8FB-0FF7-469A-9E3B-18001CF8CED6

Device Start End Sectors Size Type
/dev/sdc1 64 8056683 8056620 3.8G Microsoft basic data
/dev/sdc2 8056684 8082239 25556 12.5M EFI System
/dev/sdc3 8082240 8082839 600 300K Microsoft basic data

Since this system is purely BIOS, and the image used is GPT, it makes sense that it would have issues booting. This definitely seemed wrong, so I noted what lowkeyloki and RypPn said and zeroed out the boot sector and then used dd to put the memstick image on the target drive. This worked, and I was able to install FreeBSD to an SSD. After booting, I was able to install the Nvidia driver, Xwindows and Firefox.

I now have a very basic graphical environment, but am struggling with a few other issues (console spam, audio setup, etc.) If I can't figure them out, I'll be back with another thread.
 
I know that this is hardly a typical installation method, but I don't have any thumb drives or burnable CD/DVD-ROMs handy. […]
To the contrary, I think it’s today’s typical installation method on ancient hardware: Old BIOS firmware does not probe USB ports for bootable media, and the era of preparing optical disc media is over (“What were the necessary commands for burning a CD again? Forget it, I’ll dd(1) me a hard drive.”).​
[…] Am I doing this wrong, or is it just impossible?
As ralphbsz already suggested, you need to (temporarily) modify the BIOS’ media probe order (“boot sequence”), it’s as simple as that. Your installation media should appear at the top. Slightly more modern BIOS firmware gives you the option of a one‑time override (hit F12 on startup).​
[…] I've tried writing directly to the device, as well as partition 1 […]
You write to the entire block device. For the BIOS there were only bootable drives, never “bootable partitions” (a notion unknown to the BIOS). Of course you could take the GRUB detour, but why do you hate yourself?​
[…] Since this system is purely BIOS, and the image used is GPT, it makes sense that it would have issues booting. […]
Actually the memstick installation media have a PMBR, a “protective” master boot record. Its only purpose is backward compatibility (to hop forward to a bootable GPT partition).​
 
Back
Top