UFS How to migrate installed FreeBSD from HDD to SSD?

Look at ada1. It's also MBR only. But it has two BSD slices INSIDE ada1 -- adas1b for swap and adas1a for a UFS file system.
There is no place for swap on your new SSD. You have used the entire ada0 drive for a UFS file system.
 
Look at ada1. It's also MBR only. But it has two BSD slices INSIDE ada1 -- adas1b for swap and adas1a for a UFS file system.
There is no place for swap on your new SSD. You have used the entire ada0 drive for a UFS file system.
I forgot to say that I changed the format to GPT.
Should I use swap? I've read in many articles and forums that using swap is not needed for powerfull hardwares. I didn't enable about 40 GB of SSD storage that I can add new things like swap as needed.
 
Thanks grahamperrin I'm currently transferring files to SSD with tar(1).
I'm still very inexperienced in FreeBSD and activating SSD was very difficult for me and I'm really afraid to change it now because I want to try my operating system on it as soon as possible. But thank you, I will definitely add the swap at the first opportunity.
It seems that the correct use of FreeBSD requires a lot of study. I intend to read these books in order:
1- Absolute FreeBSD, 3rd Edition: The Complete Guide to FreeBSD 3rd Edition
2-Design and Implementation of the FreeBSD Operating System, The 2nd Edition
3-Advanced Programming in the UNIX Environment, 3rd Edition 3rd Edition
4-Operating Systems: Three Easy Pieces 1.00 Edition
5-Operating System Concepts 10th Edition
But I'm still at the beginning of the first book.
Thanks for your explanation and help and sorry about my mistakes...
 
Hi again dear friends,
In the last step, I transferred all files to SSD But I got "missing bootloader" error message. I did this: gpart add -t freebsd-boot -l gpboot -b 40 -s 512K ada0 and after reset system a dash (-) sign was displayed.
I decided to reinstall FreeBSD on the SSD.

This is my last message in this post and I don't bother you anymore.
Thanks again for your helps 🌺
 
Hi again dear friends,
In the last step, I transferred all files to SSD But I got "missing bootloader" error message. I did this: gpart add -t freebsd-boot -l gpboot -b 40 -s 512K ada0 and after reset system a dash (-) sign was displayed.
I decided to reinstall FreeBSD on the SSD.

This is my last message in this post and I don't bother you anymore.
Thanks again for your helps 🌺
The next time you decide to do this crazy thing (I've done that myself a number of times :))), you start with a plan.
I would follow in this order:
1. Check your old disk and see how much space is used/left. Will your SSD give you enough space?
2. Check the existing partition table to see which partition/slice uses how much space.
However , you can create a NEW partition table on your SSD -- a more simple one. You may even use only one / (root) partition of the size that would accomodate all your files. I've done that, it works all right.
Though for certain reasons it IS recommended to have /usr, /home, /usr/local, /var etc partitions... But your system can very well work without them. Well, you can read your documentation to learn more about this (good idea).
My idea is, one goal at a time :) Now your goal is to transfer that old system to the new disk instead of doing reinstallation. Why make it more painful?...
3. OK! Once you've decided on the above, use FreeBSD installation media to do initial partitioning of your SSD. You either use slices (install program will suggest that) or just one root partition / (in a sense more simple). Finally, instead of using slices you can use partitions of the recommended size.
You will ALWAYS be able to see your disk's partition table later by gpart show command (from any shell prompt, not root).
Of course, you will need to get used to the installation program's partitioning tool to make it do what YOU want instead of the defaults.
4. Exit the install program and drop to sh prompt. Mount your SSD partitions on the / of your SSD (if you decide to partition).
5. Mount your old HDD on its /.
6. Copy over all the contents from your HDD / to y our SSD / (where all the previously created partitions are mounted). This operation will actually copy all the contents.
7. Install the bootcode the way manual says.
8. IMPORTANT: edit your SSD /etc/fstab to reflect the partitioning of SSD.
9. Edit your SSD's /boot/loader.conf to set the needed variables (like vfs.root.mountfrom=ufs:/dev/adaNpMsX) That shows at boot time where to mount root from.

That would, more or less, get you ready to boot. Unless I"ve forgotten something :)
 
No bother at all but I did worry about you blindly following instructions.
Having the FreeBSD book can make all the difference.
Thanks. That's true. When I installed FreeBSD, I will read the handbook carefully from the beginning. Next time I will not do anything without sufficient knowledge.
 
Back
Top