Solved Dual boot, invalid argument during partition creation

Hi,
I would like to install FreeBSD beside Windows 10.
I reserved about 30 GB for FreeBSD on my SSD hard disk (256 GB total).
My hd scheme is MBR.
Currently I have 3 partitions:

1 - (500 MB), reserved for Windows OS
2 - (194 GB), Windows OS
3 - (480 MB), some other Windows stuff

I created a BSD slice for the remaining disk part.
I would like to use ZFS.
When I try to add new partition, I get "invalid argument" error.
Same if I try to add freebsd-boot (512KB) partition (is it necessary?)
It seems I am only able to create ufs filesystem.
I would like understand my mistake.
Do you confirm that there is no way to automatically create ZFS layout on free space, through bsdinstall, anyway?
Thank you
 
I created a BSD slice for the remaining disk part.
Please be more specific, what does this even mean?

See, the problem here is that I know what this is supposed to mean but considering that you're having problems I cannot assume that you do as well. For all I know we're talking about completely different things here.

As such; how did you do this? What command(s) did you use to set this up?
 
Hi, sorry for my delay.

This is my partition layout:

Code:
=>       63  468862065  ada1  MBR  (224G)
         63       1985        - free -  (993K)
       2048    1024000     1  ntfs  [active]  (500M)
    1026048  407589961     2  ntfs  (194G)
  408616009        951        - free -  (476K)
  408616960     983040     3  !39   (480M)
  409600000   58720256     4  freebsd   (28G)
  468320256     541872        - free - (265M)

If I try to add (through bsdinstall) a freebsd-boot partition with 512KB size, I get "Invalid argument".
If I try to add ufs file system (whole slice 4), I get no error.

Thank you
 
You can‘t create more then 4 partions on an MBR scheme.

Is there any specific reason you are using MBR and not GPT? I guess from the size this must be an SSD right?
 
For the record the easiest (and safest) way to approach this. Is to install Windows last.It's covered in the FreeBSD Handbook. The upside to doing it this way. Is that the NT boot loader will become your boot menu, and add FreeBSD to the list. I don't suppose you have any other media you could back your Windows installations to, and then just let FreeBSD create a GPT partition, and allow you to slice it up however you want. Then use Windows restore/recovery process to put itself back on the media?
You can still accomplish all this the direction you've already started. I just thought I'd mention this, in case it sounded feasible to you. :)

HTH

--Chris
 
Using MBR is a good thing here because it will help with co-existence between FreeBSD and Windows. However, it also changes a few things where BSD's partitioning scheme is concerned.

If I try to add (through bsdinstall) a freebsd-boot partition with 512KB size, I get "Invalid argument".
For specific setups like these I strongly suggest not using frontends such as bsdinstall but instead drop down to a commandline, use gpart directly and you should be well on your way.

Alas... it's been a while since I messed with MBR but if I'm not mistaken then you don't need freebsd-boot, see also gpart(8):

Code:
     freebsd-boot               A FreeBSD partition dedicated to bootstrap
                                code.  The scheme-specific type is
                                "!83bd6b9d-7f41-11dc-be0b-001560b84f0f" for
                                GPT.
Notice how it only mentions GPT?

What you will need is a partition of type freebsd which will then contain several slices ("extended partitions"?) to contain the actual filesystem and data. You should already be able to look into this (based on your current setup) with a rescue environment.

If you use gpart show ada1 you get to see the above. But because the freebsd partition most likely contains slices you should be able to see those by using gpart show ada1s4.

That would also be the storage you'd eventually boot from.
 
IIRC Windows 10 supported GPT partitions. I'll have to test this. I haven't (personally) bothered with testing a copy of Windows, since 7.
Off to find a copy of Win10...

--Chris
 
You can‘t create more then 4 partions on an MBR scheme.

Is there any specific reason you are using MBR and not GPT? I guess from the size this must be an SSD right?

Hi,
maybe I don't understand very well. My goal is to add a FREEBSD slice (n. 4) and a few partitions inside that slice.
It should be possible, don't you agree?

Thank you
 
For example, on another machine, I have dual boot with Windows XP and FreeBSD:

Code:
# gpart show
=>       63  625142385  ada0  MBR  (298G)
         63   71675841     1  ntfs  (34G)
   71675904  448505856     3  ntfs  (214G)
  520181760  104857600     2  freebsd  [active]  (50G)
  625039360     103088        - free -  (50M)

=>        0  104857600  ada0s2  BSD  (50G)
          0  102760448       1  freebsd-ufs  (49G)
  102760448    2097151       2  freebsd-swap  (1.0G)
  104857599          1          - free -  (512B)
 
For the record the easiest (and safest) way to approach this. Is to install Windows last.It's covered in the FreeBSD Handbook. The upside to doing it this way. Is that the NT boot loader will become your boot menu, and add FreeBSD to the list. I don't suppose you have any other media you could back your Windows installations to, and then just let FreeBSD create a GPT partition, and allow you to slice it up however you want. Then use Windows restore/recovery process to put itself back on the media?
You can still accomplish all this the direction you've already started. I just thought I'd mention this, in case it sounded feasible to you. :)

HTH

--Chris

Hi Chris. Did you mean: wipe out Windows, change partition scheme from MBR to GPT, install FreeBSD and the reinstall Windows?
Thank you
 
Code:
     freebsd-boot               A FreeBSD partition dedicated to bootstrap
                                code.  The scheme-specific type is
                                "!83bd6b9d-7f41-11dc-be0b-001560b84f0f" for
                                GPT.
Notice how it only mentions GPT?

Hi ShelLuser, ok, right, thankyou!


What you will need is a partition of type freebsd which will then contain several slices ("extended partitions"?) to contain the actual filesystem and data. You should already be able to look into this (based on your current setup) with a rescue environment.

If you use gpart show ada1 you get to see the above. But because the freebsd partition most likely contains slices you should be able to see those by using gpart show ada1s4.

That would also be the storage you'd eventually boot from.

Yes, I just created 3 partitions (/home, / and swap), all went fine.
Thank you again, I really appreciate your courtesy.
 
Back
Top