Re: bsdlabel offset



On Fri, Mar 14, 2008 at 11:40:55AM +0100, Tektonaut wrote:

Hi,

following bsdllabel output caught my attention:

# size offset fstype [fsize bsize bps/cpg]
a: 2097152 0 4.2BSD 2048 16384 28552
b: 4194304 2097152 swap
c: 312576642 0 unused 0 0 # "raw" part, don't
edit
d: 33554432 6291456 4.2BSD 2048 16384 28552
...

I created this disk with sade or sysinstall. What I'm not sure
about is that partition 'a' has an offset of 0. With an 8k big
/boot/boot I would guess offset should be 16block large.

But since the disk is booting, some boot1 loader ist located at
sector 0 (from the beginning of this slice). How is it assured,
that the first block will never be overwritten? Where is boot1
located, where boot2?

Comparing the first sector with boot and boot1 differs already
at the first char. (and there were no updates so far)

That sector 0 lies outside of the slice block 0. What you are
seeing is not an absolute disk offset, but the offset in to the slice.

It is possible to create it otherwise but isn't done that
way by default. Nowdays, actually a whole track is held
out, instead of just sector 0 and that is where some of the
fancier MBRs such as GRUB get their extra space to work.
But, the standard FreeBSD MBR sticks to the official standard
of just one sector - which is why it is so plain vanilla.

////jerry



Little bemused regards,
Adam

--
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"
_______________________________________________
freebsd-questions@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: using bsdlabel
    ... It's a 4.5 G disk. ... you can't run bsdlabel on a mounted and active slice. ... specify the offset for the first slice and then * after that for offset. ...
    (freebsd-questions)
  • Re: a new hard-drive in a 2y/o laptop
    ... The MBR is in sector 0 of the disk; ... FreeBSD boot manager, or something else if using grub. ... on a disk with default MBR, except there'd be the slice data in the MBR ...
    (freebsd-questions)
  • Re: gmirror failed with error 19.
    ... The only way to fix this - recreate slice. ...  I've partioned and labeled the disk with sysinstallfrom ... As noted, GEOM wants the final sector on the disk for its metadata, ...
    (freebsd-current)
  • Re: bsdlabel offset
    ... I created this disk with sade or sysinstall. ... /boot/boot I would guess offset should be 16block large. ... Comparing the first sector with boot and boot1 differs already ...
    (freebsd-questions)
  • Re: bsdlabel offset
    ... I created this disk with sade or sysinstall. ... /boot/boot I would guess offset should be 16block large. ... Comparing the first sector with boot and boot1 differs already ...
    (freebsd-questions)