As a test I've made a USB image using the suggested fdisk table and also using the change in #528 (referenced below). It certainly boots when used as a virtual disk in a VM, but if anyone would like to do some performance testing of it on a real USB stick and report back, that would be great.

If people are happy with those changes I'll open up a pull request to get this stuff upstream.

The image is here (built using a CI tarball so use on a test machine not production):
http://us-east.manta.joyent.com/nahamu/public/smartos/platform-20160112T175701Z-4k-align-16k-cluster.usb.bz2

-Nahum

On 01/11/2016 10:49 AM, 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

Reply via email to