Date: Tue, 12 Mar 2013 13:24:36 -0700 From: Cody Ritts <cr@caltel.com> To: freebsd-fs@freebsd.org Subject: Re: Aligning MBR for ZFS boot help Message-ID: <513F8F04.60206@caltel.com> In-Reply-To: <20130312203745.A1130@besplex.bde.org> References: <513C1629.50501@caltel.com> <alpine.BSF.2.00.1303101006490.5989@wonkity.com> <513CD9AB.5080903@caltel.com> <alpine.BSF.2.00.1303101326530.7218@wonkity.com> <513CE369.4030303@caltel.com> <alpine.BSF.2.00.1303101349540.7637@wonkity.com> <1362951595.99445.2.camel@btw.pki2.com> <alpine.BSF.2.00.1303101807550.8481@wonkity.com> <CABXB=RTt-j0SGxktWMfLcgLAEN6Vi%2Bf=psBuN0jQaJthk_3cbw@mail.gmail.com> <513E1208.5020804@caltel.com> <20130312203745.A1130@besplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 3/12/13 3:25 AM, Bruce Evans wrote: >> Update -- >> >> fdisk WILL allow you to align without regards to drive geometry >> >> It can only be done in interactive mode: >> http://lists.freebsd.org/pipermail/freebsd-geom/2011-May/004780.html > > It can be set in all modes. At least according to the man page: In interactive mode, you can simply set the start and size of your partition be done with it and boot away. If you then export that config file, and re-run it, you are back to being aligned to CHS. I would imagine that adjusting your CHS ~correctly~ in the config file will allow you to to do it, but I have not found myself motivated to really learn about adjusting those values. I will have to pick that up someday I suppose. For informational purposes here is 1) partition w/ offset 2) show results 3) export/import config 4) show results with adjusted offset > root@:/root # fdisk -i ada0 > Do you want to change our idea of what BIOS thinks ? [n] > Do you want to change it? [n] y > Supply a decimal value for "sysid (165=FreeBSD)" [165] > Supply a decimal value for "start" [63] 4096 > Supply a decimal value for "size" [125045361] 125041328 > Correct this automatically? [n] > Explicitly specify beg/end address ? [n] > Are we happy with this entry? [n] y > Do you want to change it? [n] > Do you want to change it? [n] > Do you want to change it? [n] > Do you want to change the active partition? [n] > Should we write new partition table? [n] y > > root@:/root # gpart show ada0 > => 63 125045361 ada0 MBR (59G) > 63 4033 - free - (2M) > 4096 125041328 1 freebsd [active] (59G) > > root@:/root # fdisk -p ada0 > # /dev/ada0 > g c124053 h16 s63 > p 1 0xa5 4096 125041328 > a 1 > > root@:/root # fdisk -p ada0 > command > > root@:/root # fdisk -f command ada0 > ******* Working on device /dev/ada0 ******* > fdisk: WARNING line 2: number of cylinders (124053) may be out-of-range > (must be within 1-1024 for normal BIOS operation, unless the entire disk > is dedicated to FreeBSD) > fdisk: WARNING: adjusting start offset of partition 1 > from 4096 to 4158, to fall on a head boundary > fdisk: WARNING: adjusting size of partition 1 from 125041328 to 125041266 > to end on a cylinder boundary > > root@:/root # fdisk -p ada0 > # /dev/ada0 > g c124053 h16 s63 > p 1 0xa5 4158 125041266 > a 1 > > root@:/root # gpart show ada0 > => 63 125045361 ada0 MBR (59G) > 63 4095 - free - (2M) > 4158 125041266 1 freebsd [active] (59G) Thanks, Cody
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?513F8F04.60206>