Solved [10.0-RC5] Post-Install Partition detection problems Dell XPS 13

Hello all,

I've spent the last week trying to sort this one out, and I finally decided to defer to the forums for help. I have a Dell XPS 13 with a BIOS that only understands MBR. My SSD is a 4k aligned SSD. I am attempting to have a ZFS root partition with a dedicated swap partition, as recommended. Here are the commands that I have been using to set up the MBR and the slices.

Code:
# gpart create -s mbr ada0
# gpart add -t freebsd -b 2048 -a 4k ada0
# gpart create -s bsd ada0s1

From there, I've used multiple combinations of a single ZFS, a boot UFS, etc. My current setup was done by

Code:
# gpart add -t freebsd-ufs -s 1G ada0s1
# gpart add -t freebsd-swap -a 4k ada0s1
# gpart add -t freebsd-zfs -a 4k ada0s1
# gpart bootcode -b /boot/mbr ada0
# gpart bootcode -b /boot/boot ada0s1
# gpart set -a active -i 1 ada0

I've tried boot0, just a ZFS boot using the method described on the wiki (writing the first 512 bytes of zfsboot to the slice, then the rest after a seek=1024), all kinds of things.

(I should mention I've done the gnop hack to get ZFS to align properly.)

So here's the problem:

Inside the install disk, everything is peachy. I can see the ada0 MBR, the slice, and everything inside it. When I boot INTO the system, ada0 has no geometry. Which is bizarre, because the system boots just fine. But it can't find the swap partition, right now it can't even find the boot partition (I have to load every module I need before booting into it). I can MAKE the system running see the partitions by recreating the MBR with gpart, and then - exactly - recreating the freebsd FreeBSD slice, and presto everything shows up just fine. But on each and every boot up the geometry vanishes. I've tried using fdisk, disklabel, gpart, doing the cylinder math, I cannot get it to detect the partitions IF the drive is MBR formatted. For giggles, I MBR formatted a USB stick, moved boot over there, GPT partitioned the SSD, and all the GPT partitions were detected.

So the long and short of it:

I can create a slice, proper partitions, successfully install, and (somewhat) successfully boot. However, in the new system, all the geometry I hand typed is not detected. Which means swap doesn't load, right now the UFS boot partition doesn't auto load..

I'm stumped. Any ideas?

I just want an MBR based freebsd FreeBSD system that boots from ZFS and has a dedicated swap and is 4k aligned. I'm slowly starting to lose hair. :\

I've been through handbooks, wiki's, and a few other websites (I was playing with GELI for a bit), and more than a few Google searches. But I have no issues reading through documentation if anyone has suggestions.
 
Re: [10.0-RC5] Post-Install Partition detection problems

Please show us the output of gpart show ada0 and gpart show ada0s1. Here is the output of my MBR system, which uses the same basic set up as yours:
Code:
root:/root# gpart show ada0
=>       63  976773105  ada0  MBR  (466G)
         63  976773105     1  freebsd  [active]  (466G)

root:/root# gpart show ada0s1
=>        0  976773105  ada0s1  BSD  (466G)
          0  943218736       1  freebsd-zfs  (450G)
  943218736   33554369       2  freebsd-swap  (16G)
I had a problem with swap when I first installed my ZFS on root system that was related to the use of the disk_id to name the disks. If the output of the zpool status zroot command shows the disk_id being used for the disk name, include the following statement in your /boot/loader.conf:
Code:
kern.geom.label.disk_ident.enable=0
This will force the use of the more "friendly" ada0s1a and ada0s1b names for the disks, which BTW will then match /etc/fstab and which should clear up your swap issue.
 
Re: [10.0-RC5] Post-Install Partition detection problems

pryoidain said:
I've spent the last week trying to sort this one out, and I finally decided to defer to the forums for help. I have a Dell XPS 13 with a BIOS that only understands MBR. My SSD is a 4k aligned SSD. I am attempting to have a ZFS root partition with a dedicated swap partition, as recommended. Here are the commands that I have been using to set up the MBR and the slices.

By "a BIOS that only understands MBR", do you mean that it is a poorly-written UEFI BIOS that fails with GPT, or just that it is not UEFI?

The reason I ask is that GPT does not need BIOS support, it pretends to be MBR and boots on MBR systems. It is much simpler than the BSDlabel-inside-an-MBR legacy partitioning.
 
Re: [10.0-RC5] Post-Install Partition detection problems

Solved. See below. Thank you to trh411. I've included all my outputs anyways just incase anyone else runs into this issue.

trh411 said:
Please show us the output of gpart show ada0 and gpart show ada0s1. Here is the output of my MBR system, which uses the same basic set up as yours:

Inside the Live environment of the FreeBSD memstick, here's what I get (This time around I was using the UFS /boot idea):
Code:
# gpart show ada0
=>        63    234366492    ada0    MBR    (112G
          63         2016             - free - (1.0M)
        2079    234364473        1    freebsd    [active]    (112G)
   234266552            3             - free -  (1.5K)
# gpart show ada0s1
=>          0    234364473    ada0s1    BSD    (112G)
            0      2097152         1    freebsd-ufs    (1.0G)
      2097152            1               - free - (512B)
      2097153      8388608         2    freebsd-swap (4.0G)
     10485761    223878704         3    freebsd-zfs    (107G)
    234364465            8              - free -    (4.0K)

(Side Note: if anyone is wondering about the odd disk size, I have cut a section of the SSD into an HPA for overprovisioning.)

However, once inside the installed environment:
Code:
# gpart show ada0
gpart: No such geom: ada0

Oh holy crap. It is using disk ids. Let me modify loader.conf

BOOM! That was it. Thank you SO much. This should be able to work if I go back to a pure ZFS volume too right?

wblock@ said:
pryoidain said:
I've spent the last week trying to sort this one out, and I finally decided to defer to the forums for help. I have a Dell XPS 13 with a BIOS that only understands MBR. My SSD is a 4k aligned SSD. I am attempting to have a ZFS root partition with a dedicated swap partition, as recommended. Here are the commands that I have been using to set up the MBR and the slices.

By "a BIOS that only understands MBR", do you mean that it is a poorly-written UEFI BIOS that fails with GPT, or just that it is not UEFI?

The reason I ask is that GPT does not need BIOS support, it pretends to be MBR and boots on MBR systems. It is much simpler than the BSDlabel-inside-an-MBR legacy partitioning.

It's just a plain ol' BIOS. I've tried several different GPT installation methods but I've never been able to get it to boot. Finally after a lot of searching around I found an answer over on linux-questions that simply stated Dell does not support GPT. I've done the marking it as active bit, all the little tricks I've found scattered. If there's a good comprehensive guide for GPT on a legacy system, by all means I'll switch in a heartbeat. I just need this thing to boot :p
 
Re: [10.0-RC5] Post-Install Partition detection problems

Glad to hear you resolved your issue.
pryoidain said:
This should be able to work if I go back to a pure ZFS volume too right?
I'm not sure what you mean by "pure ZFS volume", but it should work regardless of the partition setup or filesystem.
 
Re: [10.0-RC5] Post-Install Partition detection problems

trh411 said:
Glad to hear you resolved your issue.
pryoidain said:
This should be able to work if I go back to a pure ZFS volume too right?
I'm not sure what you mean by "pure ZFS volume", but it should work regardless of the partition setup or filesystem.

Just meant dropping the UFS boot. Thank you again mate, I'm really thrilled at the moment. Cheers.
 
Re: [10.0-RC5] Post-Install Partition detection problems

pryoidain said:
It's just a plain ol' BIOS. I've tried several different GPT installation methods but I've never been able to get it to boot. Finally after a lot of searching around I found an answer over on linux-questions that simply stated Dell does not support GPT. I've done the marking it as active bit, all the little tricks I've found scattered. If there's a good comprehensive guide for GPT on a legacy system, by all means I'll switch in a heartbeat. I just need this thing to boot :p

The installer uses GPT by default. If that setup did not work, then that particular Dell BIOS is flawed. BIOS systems don't need to support GPT, but they do need to not make assumptions about the disk based on partition layout.

The instructions in Disk Setup On FreeBSD show setting up both GPT and MBR/BSDlabel.
 
Re: [SOLVED][10.0-RC5] Post-Install Partition detection prob

Yeah, it's flawed then. For anyone who does any searches it is a Dell XPS 13 with the A08 Bios Revision.
 
Back
Top