General Discussion General discussion on...anything!

Reply
 
Thread Tools Display Modes
  (#11) Old
swartzer swartzer is offline
Junior Member
 
Posts: 8
Join Date: May 2009
Location: Oregon, USA
Default 05-28-2009, 01:19 AM

Do any of you know whether the partitioning tool in the Ubuntu 9.04 installer knows about partition alignment? I just accepted the defaults, so I have a swap partition and a root partition (in ext3) but I don't know how to get the exact block numbers or sizes. I'm still kind of a Linux newb, unfortunately.

Also, if my partitions aren't aligned, is there any way to repartition without completely wiping the drive? I'm checking on Ubuntu's forums too.


Black Mini 9 | A05 | Ubuntu 9.04 NR | 2GB RAM | 16GB SSD | US Intl Keyboard
"Wherever you go, there you are."
Reply With Quote
  (#12) Old
reflex reflex is offline
Guru
 
reflex's Avatar
 
Posts: 1,997
Join Date: Apr 2009
Default 05-28-2009, 03:01 AM

Quote:
Originally Posted by swartzer View Post
Do any of you know whether the partitioning tool in the Ubuntu 9.04 installer knows about partition alignment? I just accepted the defaults, so I have a swap partition and a root partition (in ext3) but I don't know how to get the exact block numbers or sizes. I'm still kind of a Linux newb, unfortunately.

Also, if my partitions aren't aligned, is there any way to repartition without completely wiping the drive? I'm checking on Ubuntu's forums too.
As far as alignment, I think the default partition program is completely ignorant.


If you want to check partition alignment, the most precise way is with "sudo fdisk -lu" in a terminal. That command runs the "fdisk" partitioning program with super-user rights (sudo), asking it to generate a listing of partitions ("l") using 512 byte sectors as the units ("u").

Then take the "start" value for the partition you're interested in, and compute the remainder when divided by the alignment you want.

For example: if your partition starts at sector 63 and you want 4KiB (8 sector) alignment, then to check it, type "echo $(( 63 % 8 ))" in a terminal. If you get a 0, then it's aligned how you want it. My example fails the test with a 7.

"$(( ))" is how you access the bash shell's built-in math functions and "%" computes the remainder. "echo" displays the result.


As for aligning partitions without re-installing, it'll be possible, but difficult. It'll be easier to start from scratch, and I wouldn't bother with a swap partition if you do start over.


Mini 9 | Intel 5100 Wifi | Ubuntu 10.04 Netbook
Mini 1012 | SSD | Intel 6200 Wifi | Ubuntu 11.10 64bit
Reply With Quote
  (#13) Old
mfruit mfruit is offline
Senior Member
 
Posts: 291
Join Date: Apr 2009
Default 05-28-2009, 08:03 PM

Quote:
Originally Posted by mfruit View Post

My SSD is configured like this:

Partition 1:
First 64
Last 26635769
Total 26635706

Partition 2:
First 26635770
Last 60179489
Total 33543720

Partition 1 is aligned but after doing some quick math, it doesn't seem like partition 2 is aligned.
Ended up backing everything up and repartitioning/restoring.

New partition scheme:

Partition 1:
First 64
Last 25165887
Total 25165824

Partition 2:
First 25167872
Last 60186623
Total 35018752

Both partitions are now aligned.

Can't say that there is a huge difference in OSX but perhaps due to the placebo effect, it does feel snappier under the new scheme.
Reply With Quote
Reply

« Any Dell desktops good hackintoshes? | anyone have an outlet coupon I can use »
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Copyright © 2008-2016 MyDellMini.com.