Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Mar 2014 17:00:28 +0000
From:      Paul Thornton <prt@prt.org>
To:        freebsd-hackers@freebsd.org
Subject:   Changes between 9.1 and 9.2 affecting boot/loader/gpt discs
Message-ID:  <532B1EAC.8040407@prt.org>

next in thread | raw e-mail | index | archive | help
Hi all

I have a slightly strange booting issue.  We use Mac Minis internally 
for some servers and have an automated FreeBSD install for these - and 
so I'm quite familiar with a lot of the hoops that need jumping through 
to make this all work OK.  We've been doing this since 8.3 without any 
issues.

Our current OS was/is 9.1-RELEASE (amd64) and I was doing some tests to 
update our installer to install 10.0.  However, I quickly found these 
10.0 machines wouldn't boot; so tested with 9.2 which also shows the 
same problem.

The boot process does an MBR-based boot with GPT partitions; and all of 
this works fine for me with 8.x and 9.1.

With 9.2 it gets as far as loading the loader, and then stops unable to 
load the kernel.  A bit of investigation shows that 'lsdev' only 
displays the physical discs here, but doesn't show any partitions.  So 
that kind of explains the kernel not loading.

See: http://www.prt.org/temp/92boot.png

On a 9.1 installed machine, it boots OK - and if the boot process is 
interrupted at this point, 'lsdev' shows the logical GPT entries fine 
(including the one it is about to load the kernel from).

See: http://www.prt.org/temp/91boot.png

(Apologies for pictures, making it boot to a USB serial console is a 
level of pain I don't want to put myself through).

If I then put a USB stick in with a 9.2 memstick image on it, and allow 
the same 9.2 installed machine (that won't boot itself) to boot to a 
live FS from USB, it boots fine and I can see all of the GPT partitions 
on the disc that it refuses to boot itself from.

I've checked the sources for the loader and they are identical between 
9.1 and 9.2 - however something must be different here.  Can anyone 
think of something that changed post 9.1-RELEASE that might be breaking 
this?

Here is a 'gpart show' from a working 9.1 machine after installation:

> =>       34  976773101  ada0  GPT  (465G)
>          34          6        - free -  (3.0k)
>          40     409600     1  efi  (200M)
>      409640  974724960     2  freebsd-ufs  (464G)
>   975134600    1638535        - free -  (800M)
>
> =>        0  974724960  ada0p2  BSD  (464G)
>           0    4194304       1  freebsd-ufs  (2.0G)
>     4194304    8388608       2  freebsd-swap  (4.0G)
>    12582912   33554432       4  freebsd-ufs  (16G)
>    46137344    2097152       5  freebsd-ufs  (1.0G)
>    48234496  926490464       6  freebsd-ufs  (441G)


Here is a 'gpart show' from the 9.2 machine after successfully booting 
it from a 9.2 memstick:

> =>       34  976773101  ada0  GPT  (465G)
>          34          6        - free -  (3.0k)
>          40     409600     1  efi  (200M)
>      409640  974724960     2  freebsd-ufs  (464G)
>   975134600        200        - free -  (100k)
>   975134800    1638320     3  freebsd-ufs  (800M)
>   976773120         15        - free -  (7.5k)
>
> =>        0  974724960  ada0p2  BSD  (464G)
>           0    4194304       1  freebsd-ufs  (2.0G)
>     4194304    8388608       2  freebsd-swap  (4.0G)
>    12582912   33554432       4  freebsd-ufs  (16G)
>    46137344    2097152       5  freebsd-ufs  (1.0G)
>    48234496  926490464       6  freebsd-ufs  (441G)
>
> =>      0  1638320  ada0p3  BSD  (800M)
>         0  1619793       1  freebsd-ufs  (790M)
>   1619793    18527          - free -  (9.0M)
>
> =>        0  974724960  gptid/c1a23650-ed26-4f60-bb3f-b2ec4c766fae  BSD  (464G)
>           0    4194304                                           1  freebsd-ufs  (2.0G)
>     4194304    8388608                                           2  freebsd-swap  (4.0G)
>    12582912   33554432                                           4  freebsd-ufs  (16G)
>    46137344    2097152                                           5  freebsd-ufs  (1.0G)
>    48234496  926490464                                           6  freebsd-ufs  (441G)
>
> =>      0  1638320  gptid/1437a1fc-3253-480c-8195-9f39cbced235  BSD  (800M)
>         0  1619793                                           1  freebsd-ufs  (790M)
>   1619793    18527                                              - free -  (9.0M)
>
> =>       0  31309824  da0  BSD  (15G)
>          0   1168848    1  freebsd-ufs  (570M)
>    1168848  30140976       - free -  (14G)

The ada0p3a partition is our installer image; it is only showing on this 
installation as the machine never completed the install and tidied that 
up afterwards.  And da0 is the memstick, of course.

All pointers and suggestions will be very gratefully accepted, this has 
been tying me in knots for the past few weeks.

Paul.

-- 
Paul Thornton



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?532B1EAC.8040407>