Solved Booting issue with two hard disk

Hi, I use FreeBSD 11.2-RELEASE.
Initially, I installed an SSD disk with dual boot: Windows 10 and FreeBSD.

Partition layout is:

Code:
# gpart show
=>       63  468862065  ada0  MBR  (224G)
         63       1985        - free -  (993K)
       2048    1124352     1  ntfs  (549M)
    1126400  262934528     2  ntfs  (125G)
  264060928  204801199     3  freebsd  [active]  (98G)
  468862127          1        - free -  (512B)

=>        0  204801199  ada0s3  BSD  (98G)
          0  201326592       1  freebsd-ufs  (96G)
  201326592    3474606       2  freebsd-swap  (1.7G)
  204801198          1          - free -  (512B)

After a while, I got a second (SATA) disk, and I installed Linux on it, but first I removed SSD from motherboard.

Now everything is ok if I connect just one disk at time.
If I have both disks attached, I see this in boot manager:

Code:
F1   Win
F3   FreeBSD
F5   Drive 1

F6   PXE

If I select F3, I am able to reach boot loader, but I cannot mount root partition, I got errors like:

Code:
Trying to mount root from ufs:/dev/ada0s3a [rw]...
Roout mount waiting for: usbus6
mountroot: waiting for device /dev/ada0s3a...
Mounting from ufs:/dev/ada0s3a failed with error 19

From console's messages, I noticed that ada0 is now SATA disk and ada1 SSD, hence the error.
I need some advice to fix this (I mean: be able to boot every OS wih both disks connected to motherboard :)

Thank you!
 
Label your root filesystem and mount by label (glabel(8)), instead by device/partition. To do that boot from FreeBSD installation media, enter shell, use tunefs(8) to label filesystem with tunefs -L bsdrootfs /dev/ada0s3a, mount your root file system and replace /dev/ada0s3a in /etc/fstab with /dev/ufs/bsdrootfs.
 
Label your root filesystem and mount by label (glabel(8)), instead by device/partition. To do that boot from FreeBSD installation media, enter shell, use tunefs(8) to label filesystem with tunefs -L bsdrootfs /dev/ada0s3a, mount your root file system and replace /dev/ada0s3a in /etc/fstab with /dev/ufs/bsdrootfs.

Worked like a charm, thank you very much!
 
Back
Top