Re: boundend less than total sectors — amd64, install70.iso, new HDD

2021-11-17 Thread Theo de Raadt
Stuart Henderson  wrote:

> > If that's the case, you have to reinstall on GPT.
> 
> But that isn't, if the disk is just used for OpenBSD and boot is close enough
> to the start of the disk (i.e. root partition isn't too far in) then setting
> the full disk with 'b' is enough, OpenBSD uses its own disklabel and doesn't
> need the entire disk to be shown in the fdisk partition

The command is

> b *




Re: boundend less than total sectors — amd64, install70.iso, new HDD

2021-11-17 Thread Łukasz Moskała
Dnia 17 listopada 2021 23:58:21 CET, Stuart Henderson 
 napisał/a:
>On 2021-11-17, Łukasz Moskała  wrote:
>>
>>
>> Dnia 17 listopada 2021 23:13:19 CET, u...@mailo.com napisał/a:
>>>Questions recap:
>>>1. Is it `OpenBSD` tools' fault or is it the HDD's fault,
>>>so should I replace the HDD under warranty?
>>>2. Can I rest assured that my install will work fine?
>>>
>>>After unpackaging a newly bought HDD,
>>>S.M.A.R.T. was checked — all new and OK,
>>>then `Hard Disk Sentinel` from under `Windows` —
>>>write-read test, random order, random data — all OK.
>>>
>>>Afterwards, `OpenBSD` was installed from `install70.iso` DVD
>>>after failing to boot `install70.img` from USB, issue asked here:
>>>https://marc.info/?t=16364002931=1=2
>>>In the installed `OpenBSD` I noticed that almost half of the disk
>>>was unused, so I booted into installer again and found with
>>>`disklabel -h wd0`:
>>>
>>>total sectors: 7814037168 # total bytes: 3.6T
>>>boundend: 4294956960
>>>
>>>Heck, how and why?
>>>
>>>http://man.openbsd.org/disklabel#b
>>>Set OpenBSD disk boundaries. This option tells disklabel which parts of
>>>the disk it is allowed to modify. This option is probably only useful
>>>for ports with fdisk(8) partition tables where the ending sector in the
>>>MBR is incorrect. The user may enter ‘*’ at the “Size” prompt to
>>>indicate the entire size of the disk (minus the starting sector). This
>>>is useful for disks where the fdisk partition table is incapable of
>>>storing the real size. Note: data may become corrupted if boundaries are
>>>extended such that they overlap with other resident operating systems.
>>>
>>>"This option is probably only useful for ports with fdisk(8) partition
>>>tables where the ending sector in the MBR is incorrect."
>>>1. Ports of `OpenBSD` to a certain hardware platform
>>>or which ports are spoken about?
>>>2. If my reading is correct, it should be some edge case, but
>>>the issue is on `amd64` — the most mainstream platform,
>>>7.0 — the most recent release
>>>and a new hard disk.
>>>
>>>I resorted to `b` of `disklabel` twice:
>>>on creating the encrypted device and on partitioning it,
>>>thus got full size used,
>>>but `fdisk -v wd0` still insists on "4294956960 Sectors"
>>>instead of 7814037168;
>>>and `fdisk -v sd4` still insists on "4294852800 Sectors"
>>>instead of 7814036576.
>>>
>>>Questions:
>>>1. What exactly is wrong: `OpenBSD`'s tools or the hard disk or what?
>>>Since it is a newly bought HDD, should I apply for warranty?
>>>2. Having set `boundend` manually, should I expect a robust operation,
>>>or might that nuisance pop up later on and interfere?
>>>
>>>Thanks
>>>
>>>
>>
>> Are you using MBR or GPT?
>> MBR has 2TiB size limit, so it kind of sounds like your issue.
>
>That's correct
>
>> If that's the case, you have to reinstall on GPT.
>
>But that isn't, if the disk is just used for OpenBSD and boot is close enough
>to the start of the disk (i.e. root partition isn't too far in) then setting
>the full disk with 'b' is enough, OpenBSD uses its own disklabel and doesn't
>need the entire disk to be shown in the fdisk partition
>
>
>

Thank you both Stuart Henderson and Crystal Kolipe for correcting me.
--
Łukasz Moskała



Re: boundend less than total sectors — amd64, install70.iso, new HDD

2021-11-17 Thread Stuart Henderson
On 2021-11-17, Łukasz Moskała  wrote:
>
>
> Dnia 17 listopada 2021 23:13:19 CET, u...@mailo.com napisał/a:
>>Questions recap:
>>1. Is it `OpenBSD` tools' fault or is it the HDD's fault,
>>so should I replace the HDD under warranty?
>>2. Can I rest assured that my install will work fine?
>>
>>After unpackaging a newly bought HDD,
>>S.M.A.R.T. was checked — all new and OK,
>>then `Hard Disk Sentinel` from under `Windows` —
>>write-read test, random order, random data — all OK.
>>
>>Afterwards, `OpenBSD` was installed from `install70.iso` DVD
>>after failing to boot `install70.img` from USB, issue asked here:
>>https://marc.info/?t=16364002931=1=2
>>In the installed `OpenBSD` I noticed that almost half of the disk
>>was unused, so I booted into installer again and found with
>>`disklabel -h wd0`:
>>
>>total sectors: 7814037168 # total bytes: 3.6T
>>boundend: 4294956960
>>
>>Heck, how and why?
>>
>>http://man.openbsd.org/disklabel#b
>>Set OpenBSD disk boundaries. This option tells disklabel which parts of
>>the disk it is allowed to modify. This option is probably only useful
>>for ports with fdisk(8) partition tables where the ending sector in the
>>MBR is incorrect. The user may enter ‘*’ at the “Size” prompt to
>>indicate the entire size of the disk (minus the starting sector). This
>>is useful for disks where the fdisk partition table is incapable of
>>storing the real size. Note: data may become corrupted if boundaries are
>>extended such that they overlap with other resident operating systems.
>>
>>"This option is probably only useful for ports with fdisk(8) partition
>>tables where the ending sector in the MBR is incorrect."
>>1. Ports of `OpenBSD` to a certain hardware platform
>>or which ports are spoken about?
>>2. If my reading is correct, it should be some edge case, but
>>the issue is on `amd64` — the most mainstream platform,
>>7.0 — the most recent release
>>and a new hard disk.
>>
>>I resorted to `b` of `disklabel` twice:
>>on creating the encrypted device and on partitioning it,
>>thus got full size used,
>>but `fdisk -v wd0` still insists on "4294956960 Sectors"
>>instead of 7814037168;
>>and `fdisk -v sd4` still insists on "4294852800 Sectors"
>>instead of 7814036576.
>>
>>Questions:
>>1. What exactly is wrong: `OpenBSD`'s tools or the hard disk or what?
>>Since it is a newly bought HDD, should I apply for warranty?
>>2. Having set `boundend` manually, should I expect a robust operation,
>>or might that nuisance pop up later on and interfere?
>>
>>Thanks
>>
>>
>
> Are you using MBR or GPT?
> MBR has 2TiB size limit, so it kind of sounds like your issue.

That's correct

> If that's the case, you have to reinstall on GPT.

But that isn't, if the disk is just used for OpenBSD and boot is close enough
to the start of the disk (i.e. root partition isn't too far in) then setting
the full disk with 'b' is enough, OpenBSD uses its own disklabel and doesn't
need the entire disk to be shown in the fdisk partition



-- 
Please keep replies on the mailing list.



Re: boundend less than total sectors ??? amd64, install70.iso, new HDD

2021-11-17 Thread Crystal Kolipe
> Are you using MBR or GPT?
> MBR has 2TiB size limit, so it kind of sounds like your issue. If that's the
> case, you have to reinstall on GPT.

No you don't.  At least not if you're using the disk exclusively with OpenBSD
or you know for sure that any other operating systems that touch it will
co-operate.

For disks larger than 2 Tb, you can create an fdisk partition spanning the
first 2 Tb, then just adjust the bounds within the disklabel to use the
whole capacity of the disk.

If you don't need to boot from the disk, you could probably get away with
not creating fdisk partitions at all, and just creating a disklabel on the
raw volume.  However, there are various caveats doing this, some of which
may not be obvious.



Re: boundend less than total sectors — amd64, install70.iso, new HDD

2021-11-17 Thread Łukasz Moskała



Dnia 17 listopada 2021 23:13:19 CET, u...@mailo.com napisał/a:
>Questions recap:
>1. Is it `OpenBSD` tools' fault or is it the HDD's fault,
>so should I replace the HDD under warranty?
>2. Can I rest assured that my install will work fine?
>
>After unpackaging a newly bought HDD,
>S.M.A.R.T. was checked — all new and OK,
>then `Hard Disk Sentinel` from under `Windows` —
>write-read test, random order, random data — all OK.
>
>Afterwards, `OpenBSD` was installed from `install70.iso` DVD
>after failing to boot `install70.img` from USB, issue asked here:
>https://marc.info/?t=16364002931=1=2
>In the installed `OpenBSD` I noticed that almost half of the disk
>was unused, so I booted into installer again and found with
>`disklabel -h wd0`:
>
>total sectors: 7814037168 # total bytes: 3.6T
>boundend: 4294956960
>
>Heck, how and why?
>
>http://man.openbsd.org/disklabel#b
>Set OpenBSD disk boundaries. This option tells disklabel which parts of
>the disk it is allowed to modify. This option is probably only useful
>for ports with fdisk(8) partition tables where the ending sector in the
>MBR is incorrect. The user may enter ‘*’ at the “Size” prompt to
>indicate the entire size of the disk (minus the starting sector). This
>is useful for disks where the fdisk partition table is incapable of
>storing the real size. Note: data may become corrupted if boundaries are
>extended such that they overlap with other resident operating systems.
>
>"This option is probably only useful for ports with fdisk(8) partition
>tables where the ending sector in the MBR is incorrect."
>1. Ports of `OpenBSD` to a certain hardware platform
>or which ports are spoken about?
>2. If my reading is correct, it should be some edge case, but
>the issue is on `amd64` — the most mainstream platform,
>7.0 — the most recent release
>and a new hard disk.
>
>I resorted to `b` of `disklabel` twice:
>on creating the encrypted device and on partitioning it,
>thus got full size used,
>but `fdisk -v wd0` still insists on "4294956960 Sectors"
>instead of 7814037168;
>and `fdisk -v sd4` still insists on "4294852800 Sectors"
>instead of 7814036576.
>
>Questions:
>1. What exactly is wrong: `OpenBSD`'s tools or the hard disk or what?
>Since it is a newly bought HDD, should I apply for warranty?
>2. Having set `boundend` manually, should I expect a robust operation,
>or might that nuisance pop up later on and interfere?
>
>Thanks
>
>

Are you using MBR or GPT?
MBR has 2TiB size limit, so it kind of sounds like your issue. If that's the 
case, you have to reinstall on GPT.

Kind regards
--
Łukasz Moskała



boundend less than total sectors — amd64, install70.iso, new HDD

2021-11-17 Thread uxer
Questions recap:
1. Is it `OpenBSD` tools' fault or is it the HDD's fault,
so should I replace the HDD under warranty?
2. Can I rest assured that my install will work fine?

After unpackaging a newly bought HDD,
S.M.A.R.T. was checked — all new and OK,
then `Hard Disk Sentinel` from under `Windows` —
write-read test, random order, random data — all OK.

Afterwards, `OpenBSD` was installed from `install70.iso` DVD
after failing to boot `install70.img` from USB, issue asked here:
https://marc.info/?t=16364002931=1=2
In the installed `OpenBSD` I noticed that almost half of the disk
was unused, so I booted into installer again and found with
`disklabel -h wd0`:

total sectors: 7814037168 # total bytes: 3.6T
boundend: 4294956960

Heck, how and why?

http://man.openbsd.org/disklabel#b
Set OpenBSD disk boundaries. This option tells disklabel which parts of
the disk it is allowed to modify. This option is probably only useful
for ports with fdisk(8) partition tables where the ending sector in the
MBR is incorrect. The user may enter ‘*’ at the “Size” prompt to
indicate the entire size of the disk (minus the starting sector). This
is useful for disks where the fdisk partition table is incapable of
storing the real size. Note: data may become corrupted if boundaries are
extended such that they overlap with other resident operating systems.

"This option is probably only useful for ports with fdisk(8) partition
tables where the ending sector in the MBR is incorrect."
1. Ports of `OpenBSD` to a certain hardware platform
or which ports are spoken about?
2. If my reading is correct, it should be some edge case, but
the issue is on `amd64` — the most mainstream platform,
7.0 — the most recent release
and a new hard disk.

I resorted to `b` of `disklabel` twice:
on creating the encrypted device and on partitioning it,
thus got full size used,
but `fdisk -v wd0` still insists on "4294956960 Sectors"
instead of 7814037168;
and `fdisk -v sd4` still insists on "4294852800 Sectors"
instead of 7814036576.

Questions:
1. What exactly is wrong: `OpenBSD`'s tools or the hard disk or what?
Since it is a newly bought HDD, should I apply for warranty?
2. Having set `boundend` manually, should I expect a robust operation,
or might that nuisance pop up later on and interfere?

Thanks