From: H. Peter Anvin on
I think if you use the DOS compat option to create the legacy partitions only, you should be fine.

"Tejun Heo" <tj(a)kernel.org> wrote:

>Hello,
>
>On 03/12/2010 01:34 AM, Greg Freemyer wrote:
>> I do think the linux partitioners should provide a way to force a
>> cylinder alignment. Tejun, I would like to see your doc describe how
>> to force a win2k compatible partition layout.
>
>I suppose I can play with fdisk and list it as an example but if
>anyone knows better/proper way to force certain partitions to legacy
>alignment while leaving others properly aligned, I'll be happy to
>include it.
>
>Thanks.
>
>--
>tejun

--
Sent from my mobile phone, pardon any lack of formatting.
From: Michal Soltys on
Tejun Heo wrote:
>
> I was thinking about testing XP booting this weekend but really want
> to avoid it, so thanks a lot for the info. I'll update the doc
> accordingly but can you please enlighten me on how it works and what's
> broken in detail? So, XP should be fine with any alignment?
>
> Thanks.
>

Sorry for late reply.

s/sp2/sp3 - although it shouldn't make a difference from sp2 onwards.

Anyway - the tests I did were because of weird laptop, where I shrinked
whole win7 stuff and having no primary partitions left to use, I tested
my usual windows xp installation I deploy with ntfsclone. Originally
that XP were installed from installation disk merged with sp3 (or how
it's usually called in windows world - slipstreamed). Of course,
windows xp itself will not present any options to install itself into
logical partition in the usual way - but during later deployment it's not
a problem to put it where one's want.

It's possible that this wouldn't work, if windows were installed first
from pre-sp2 media, and then service pack was installed (in such case,
ntldr in C:\ is not updated afaik). It's also possible, that "brute-force"
copied pre-sp2 or win2k to a partition made with either - a) xp sp2+'s disk
manager or b) mkfs.ntfs and with updated most recent ntldr - would boot as
well (the partition requirement is due to potential differences between the code
in bootsector, or more precisely - $Boot - first 8KiB of ntfs partition).

Obvious requirements besides the above (ntldr, perhaps $Boot as well) are:

- mentioned "hidden sectors" (must be manually adjusted, recent syslinux's
chain.c32 has option to do it automatically)
- adjusted boot.ini (to point to new partition, eventually other windowish
stuff as necessary)

As you can see, there're many "if"s and combinations here that I didn't test.

On a related note - ironically, while I had 0 problems making it work
through syslinux (both regular chaining and through direct ntldr loading) -
I couldn't make win7's bootmgr (bcd, bcdedit ....) do it properly. Oh well.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: H. Peter Anvin on
On 03/10/2010 01:14 AM, Denys Vlasenko wrote:
>
> 63s/255h is more or less "standard" now.
>
> Alignment issues can be solved by picking a good multiple of
> _heads_ or _cylinders_:
>
> For first partition, pick the start at 8th head:
>
> cyl 0 head 1 sector 1: LBA sector 63) - bad
> cyl 0 head 8 sector 1: LBA sector 8*63) - good (4k aligned)
>
> For any other partition, pick start cylinder which is a multiple of 8:
>
> cyl 8*x head 0 sector 1: LBA sector 8*x*255*63 - good (4k aligned)
>
> This will actually work well for *any* geometry, not only for 63s/255h.

Yes, but it does squat for a flash disk that wants, say, 256K alignment.

-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Denys Vlasenko on
On Monday 15 March 2010 02:21, H. Peter Anvin wrote:
> On 03/10/2010 01:14 AM, Denys Vlasenko wrote:
> >
> > 63s/255h is more or less "standard" now.
> >
> > Alignment issues can be solved by picking a good multiple of
> > _heads_ or _cylinders_:
> >
> > For first partition, pick the start at 8th head:
> >
> > cyl 0 head 1 sector 1: LBA sector 63) - bad
> > cyl 0 head 8 sector 1: LBA sector 8*63) - good (4k aligned)
> >
> > For any other partition, pick start cylinder which is a multiple of 8:
> >
> > cyl 8*x head 0 sector 1: LBA sector 8*x*255*63 - good (4k aligned)
> >
> > This will actually work well for *any* geometry, not only for 63s/255h.
>
> Yes, but it does squat for a flash disk that wants, say, 256K alignment.

4K makes sense. 256K not so much.

256K alignment is hard to swallow for a lot of reasons anyway.
Unless the filesystem packs small files into blocks a-la reiserfs,
256K block filesystems will be very inefficient for a typical
storage scenarios.

It looks like flash storage manufacturers just have to bite
the bullet and develop smarter algorithms that combine wear
leveling, block remapping and such and make their internal
preference for huge continuous aligned writes nearly invisible
from the outside - just like hard disks which do not expose
their zoned recording, variable sector counts etc.

Such algorithms aren't trivial, but they are possible.
Whoever will incorporate them in their products,
delivers a significantly better user experience.

I just played with ubuntu installation on an usb stick.
Yes, it works. Soft of. Write performance is abysmal.
I would pay x2 or x3 for the same sized stick if it
would perform better.

--
vda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Greg Freemyer on
> I just played with ubuntu installation on an usb stick.
> Yes, it works. Soft of. Write performance is abysmal.
> I would pay x2 or x3 for the same sized stick if it
> would perform better.

In general USB sticks don't offer the same performance as SSDs.

You can find sticks with both USB and eSata. I'd hope those offer
better performance.

You should read some performance reviews. I'm sure you can find a few
sticks that are much better than what you get from a vanilla usb
stick.

Greg
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/