Hi Nahum Shalman thank you very much for your help,
I think I got the right way to align the disk. following is my new disk table: * Id Act Bhead Bsect Bcyl Ehead Esect Ecyl Rsect Numsect 12 128 0 0 0 0 0 0 256 3891200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 and when mkfs use 16k, it will align all things I think The change is here: https://github.com/joyent/smartos-live/blob/master/tools/build_iso#L187 from: echo "y" | pfexec mkfs -F pcfs -o fat=32 ${bi_lofidev/lofi/rlofi}:c to: echo "y" | pfexec mkfs -F pcfs -o fat=32,spc=32 ${bi_lofidev/lofi/rlofi}:c best wishes Tony On 1/11/16 23:49, Nahum Shalman wrote: > On 01/09/2016 06:21 AM, ZHU XIAN WEN wrote: >> hello Nahum Shalman, >> >> this is Tony, I read the disk table of usb_fdisk_table starting from 63 >> sector, it is not alignment, may I know what's the tool you used to >> generate the 2 GB disk table, actually, it is not aligned for 4k, how to >> align it? if I need a 8G usb, how to do it. >> >> * Id Act Bhead Bsect Bcyl Ehead Esect Ecyl Rsect >> Numsect >> 12 128 9 34 0 34 63 243 600 >> 3905400 >> 0 0 0 0 0 0 0 0 0 0 >> 0 0 0 0 0 0 0 0 0 0 >> 0 0 0 0 0 0 0 0 0 0 >> >> thank you very much >> >> best wishes > > Hi Tony, > > If I recall correctly I think I just created a 2000MB file (slightly > smaller than 2GB to protect against people who might have gotten "2GB" > USB sticks that were slightly smaller than 2048MB) and then used that > as a raw disk for running SmartOS under QEMU. > > I think I then just used the standard illumos tools to partition the > disk from within the VM, then dumped out that partition table after > mounting the image as a lofi device. > Unfortunately it's been so long since I did it that I've forgotten > precisely how I did it. > > It might be worth revisiting that partition table to align it properly > for 4k block sizes along with testing the change proposed in > https://github.com/joyent/smartos-live/issues/528 > > I'm hoping others on the mailing list might have some ideas. Ideally > if someone has a physical 2GB device that advertises itself as using > 4k blocks, pointing the tools at that device might help generate a > better partition table, etc. > > -Nahum ------------------------------------------- smartos-discuss Archives: https://www.listbox.com/member/archive/184463/=now RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00 Modify Your Subscription: https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb Powered by Listbox: http://www.listbox.com
