1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cannot boot after moving FreeBSD to another disk

Discussion in 'Installing and Upgrading FreeBSD' started by bboldi, May 8, 2012.

  1. bboldi

    bboldi New Member

    Messages:
    4
    Thanks Received:
    0
    I'm fairly new in FreeBSD, but I already love it :) Actually I love it so much, that I have decided to move it to my SSD drive where Windows7 used to be. I have formatted the drive, created two partitions FS and Swap, then dump/restore'd it from the HDD to SSD, made the partition bootable (sysinstall/fdisk) and changed fstab to match the new disk name, but I cannot boot from the device. When I'm trying to boot FreeBSD from SSD I get:

    Code:
    Invalid Partition
    No /boot/loader
    
    FreeBSD/x86 boot
    Default: 0:ad(0,a)/boot/kernel/kernel
    boot:
    invalid partition
    No /boot/kernel/kernel


    Please tell me what can be the problem - any tip is much appreciated!
     
  2. tingo

    tingo Member

    Messages:
    986
    Thanks Received:
    97
    Tip: you have moved to another drive. This drive has a different number and name than the first one. You need to update your FreeBSD installation so it knows the name of the drive to boot from, and you also need to update /etc/fstab, most likely.
     
    bboldi thanks for this.
  3. bboldi

    bboldi New Member

    Messages:
    4
    Thanks Received:
    0
    Thanks you @tingo! Can you please tell me what do you mean by "updating FreeBSD installation" concretely? Because I have been experimenting with a lot of stuff after the insal, and non of them helped... THANKS!
     
  4. tingo

    tingo Member

    Messages:
    986
    Thanks Received:
    97
    bboldi thanks for this.
  5. bboldi

    bboldi New Member

    Messages:
    4
    Thanks Received:
    0
    @tingo Thanks :) Noted!
     
  6. bboldi

    bboldi New Member

    Messages:
    4
    Thanks Received:
    0
    Solved!

    The drive label needs to be 'a' if you want FreeBSD to boot from it. Mine was 'd' ... here is how you can solve this: my slice name was ada0s1. So I boot from LiceCD and enter bsdlabel -e ada0s1 change 'd' label to 'a'. Then
    Code:
    mkdir /mnt/ssd
    mount /dev/ada0s1a /mnt/ssd
    and then edit /mnt/ssd/etc/fstab and change the mount point of / to ada0s1a. That helped!