freebsd / gpt boot

Rolf G Nielsen lazlar at lazlarlyricon.com
Mon Dec 14 00:57:05 UTC 2009


Adam Jacob Muller wrote:
> On Dec 13, 2009, at 7:45 PM, Rolf G Nielsen wrote:
> 
>> Adam Jacob Muller wrote:
>>> On Dec 13, 2009, at 6:35 PM, Rolf G Nielsen wrote:
>>>> Adam Jacob Muller wrote:
>>>>> Hi Rolf,
>>>>> I am using the "gpt boot" command right after calling "gpart create" which should combine the add/bootcode.
>>>> Sorry, but I can't help you there. I moved to GUID partitions when upgrading to 8.0, and 8.0 doesn't have the gpt command (at least my install doesn't), thus I'm not familiar with it.
>>> Interesting, I hadn't realized that gpt was removed in 8.0 and replaced with gpart, I just redid everything I was doing using "gpart" instead of "gpt" and unfortunately I have the same result.
>>>>> Things do look right from a "gpart show"
>>>>> # gpart show
>>>>> =>         34  19529727933  mfid0  GPT  (9.1T)
>>>>>          34          128      1  freebsd-boot  (64K)
>>>>>         162      1048576      2  freebsd-swap  (512M)
>>>>>     1048738  19528679229      3  freebsd-ufs  (9.1T)
>>>>> This does not work though,
>>>>>> gpart set -a active -i 1 da0
>>>>> # gpart set -a active -i 1 mfid0
>>>>> gpart: attrib 'active': Device not configured
>>>> I've never actually tried it myself, because it worked for me without it. I just took it from a tutorial I read after I had made the switch. I didn't bother to keep the address, but I stumbled upon it when reading about booting from ZFS.
>>>>
>>>>> -Adam
>>>> Anyway, I saw someone else had replied saying that there recently was a thread about this. I hope you find it, and that it will help you.
>>> unfortunately that thread is really not really relevant beyond generic having a few pointers to generic install-howtos.
>>>> Good Luck!
>>>>
>>>> Rolf Nielsen
>>>>
>>>>> On Dec 13, 2009, at 5:21 PM, Rolf G Nielsen wrote:
>>>>>> Adam Jacob Muller wrote:
>>>>>>> Hi,
>>>>>>> I'm trying to setup a system with a very large RAID array (total ~10TB), I would ideally like to have the system boot directly off that 10TB array, so i'm trying to get the system setup with GPT but running into an issue.
>>>>>>> The initial pre-loader (boot0 I think? -- i'm not sure what this is called) is unable to find loader at /boot/loader nor can it load /boot/kernel/kernel
>>>>>> Is the partitioning done correctly (have you created a small boot partition, 15 sectors is enough for booting from ufs, but the tutorials I've found deal mainly with booting from zfs and they recommend 128 sectors to make future bootcode changes easier)?
>>>>>>
>>>>>> gpart add -b 34 -s 128 -t freebsd-boot -i 1 da0
>>>>>>
>>>>>> Have you embedded the correct boot code?
>>>>>>
>>>>>> gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0
>>>>>> (for booting from ufs).
>>>>>>
>>>>>> or
>>>>>>
>>>>>> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0
>>>>>> (for booting from zfs).
>>>>>>
>>>>>> You may also need to set it active by
>>>>>>
>>>>>> gpart set -a active -i 1 da0
>>>>>>
>>>>>> And of course, substitute your arrays device node for da0 in my examples.
>>>>>>
>>>>>>> Copying /boot/loader to /loader allows me to enter /loader at the "boot:" prompt and the loader will load, however, its unable to load the kernel.
>>>>>>> If I do an "ls" at the loader prompt I can see boot listed as a directory (with a "d" before it)
>>>>>>> Trying to do "ls boot" inexplicably it says "boot: not a directory"
>>>>>>> re-applying my /boot/loader.conf settings (for some reason vfs.root.mountfrom=ufs:/dev/label/root is required, or else I get a mountroot>) and then:
>>>>>>> load /kernel
>>>>>>> boot
>>>>>>> does work, and lets the system boot normally and everything is as expected (/boot is a directory etc).
>>>>>>> Anyone have any ideas about either of these things (the vfs.root.mountfrom is minor i guess but i'm curious if they are related?)
>>>>>>> Thanks in advance,
>>>>>>> -Adam
>>>>>>> _______________________________________________
>>>>>>> freebsd-stable at freebsd.org mailing list
>>>>>>> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
>>>>>>> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
>> Just a thought. Do you have options GEOM_PART_GPT in your kernel? It's a longshot, as without it you probably wouldn't get as far as you do. It's included in the 8.0 GENERIC kernel, but in case you have a custom kernel whose config you imported from a previous version, it may be worth checking.
> 
> 
> Yes, it is in there, but I don't see that affecting the boot0 or loader..
> 
> -Adam
> 
> 
> 

You're right. Shouldn't affect anything before the kernel. Like I said, 
a longshot. I'm out of ideas. Hope you solve it.

Rolf

P.S. I just realised I'd been omitting the list in my replies. Apologies.


More information about the freebsd-stable mailing list