Re: CFR: backup GPT header support in pmbr and loader(8) (Re:

看板FB_current作者時間13年前 (2012/06/15 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串6/6 (看更多)
On Thu, 14 Jun 2012, Andrey V. Elsukov wrote: > On 14.06.2012 17:08, Olivier Smedts wrote: >> 2012/6/14 Andrey V. Elsukov <ae@freebsd.org>: >>> Also, our PMBR image doesn't contain any partition entries and >>> writing it to the disk with dd(1) makes the system unbootable. >>> What you think if we will add one partition entry to the PMBR image? >>> I modified your patch (the last hunk added) and it is attached. >> >> Isn't it gpart(8)'s job to write the proper boot code from the pmbr >> image without damaging the partition table ? >> >> ie. "gpart bootcode -b /boot/pmbr ada0" instead of using dd. > > gpart(8) works only when GPT's geom exists, when PMBR is damaged > GEOM_PART_GPT can't detect GPT and thus you can't use it. So the idea is that you could dd this to the first block of any given drive and at least have one active partition marked, even if the start or end is not necessarily correct? That could be useful. However, an empty partition table is clearly empty, but a program won't be able to tell whether a pre-filled partition table is real or not. (Aside from whether to do it: the "partition table" comment is now on the second entry, and it would be nice to have some comments to identify the fields on the new static entry, like 0x80 # active, 0x00 # head, and so on.) _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1FsYRUjF (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1FsYRUjF (FB_current)