Thread: Do I really need to recompile ORBit2?

  1. #31
    Registered User
    Join Date
    Aug 2008
    Posts
    129
    After failing to boot from a burned DVD-RW, I finally got a new disk from Canonical. Reviewing the conversation, I'd like some clarification...
    • I've decided that I'm using a separate /home partition, but does it really help anything to have two if the usernames are different?
    • When should extended versus primary partitions be used?


    Thanks.

  2. #32
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Jesdisciple View Post
    When should extended versus primary partitions be used?
    You cannot boot an extended partition, so don't put / there.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  3. #33
    Registered User
    Join Date
    Aug 2008
    Posts
    129
    According to https://help.ubuntu.com/community/SwapFaq the swap partition should be at least 999MB (my RAM) because I do sometimes hibernate, so here's my new arrangement:
    80GB
    home (ext4): 10
    Ubuntu 1 (ext4): 21 + 2.1 = 23.1
    Ubuntu 2 (ext4): 21 + 2.1 = 23.1
    Windows XP (NTFS): 21 + 1.4 = 22.4
    shared data (NTFS):0.4
    swap (ext4): 1
    I tried to accomplish this in fdisk, but I'm confused with the cylinders. Must each whole cylinder be assigned to one partition? The sum of the cylinders is less than 80GB; where did the rest go?
    Code:
    Command (m for help): p
    
    Disk /dev/sda: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xf404143b
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        9355    75144006   83  Linux
    /dev/sda2            9356        9729     3004155    5  Extended
    /dev/sda5            9356        9729     3004123+  82  Linux swap / Solaris
    Thanks.
    Last edited by Jesdisciple; 05-17-2009 at 06:11 PM.

  4. #34
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Jesdisciple View Post
    I tried to accomplish this in fdisk, but I'm confused with the cylinders. Must each whole cylinder be assigned to one partition? The sum of the cylinders is less than 80GB; where did the rest go?
    It will use the cylinder boundaries, yes. As to that second question, I think you have misinterpreted something -- the fdisk output in your post is not missing anything.

    [edit] a few of megs (less than 0.1%) is normal, i guess matsp's got the explanation. I think "80 GigaBytes" is a fair approximation by the manufacturer.
    Last edited by MK27; 05-17-2009 at 06:55 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  5. #35
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    You have 78148161 blocks, 1KB each -> 80023716864 bytes. That means you are "missing" 2644992 bytes. Which I'm pretty sure you won't notice.

    The difference PROBABLY comes from the difference between ACTUAL sector/head/cylinders and the BIOS-friendly 63/255/16065 CHS numbers. This must be used because of bitfields in the BIOS not allowing more than 63 sectors - bad design, the BIOS should just be given a sector number for which 512 byte block the disk is supposed to read, rather than the BIOS needing to be given the sector, head, cylinder numbers - the BIOS should be doing that conversion. But so be it.

    --
    Mats
    Last edited by matsp; 05-17-2009 at 06:49 PM.
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  6. #36
    Registered User
    Join Date
    Aug 2008
    Posts
    129
    Quote Originally Posted by MK27 View Post
    It will use the cylinder boundaries, yes.
    Then that means I have to calculate the number of cylinders from that of MB, right? Either I'm being dense about the conversion factor or something's messed up in fdisk. EDIT: Yup, I was being dense. I'll explain in my next post.
    9729 cylinders (1 cylinder = 8225280 / 1024 ^ 3 = 0.007660389 GB).
    home (ext4): 10 / 80 / 0.007660389 = 16.317709192
    Ubuntu 1 (ext4): (21 + 2.1 = 23.1) / 80 / 0.007660389 = 37.693908497
    Ubuntu 2 (ext4): (21 + 2.1 = 23.1) / 80 / 0.007660389 = 37.693908497
    Windows XP (NTFS): (21 + 1.4 = 22.4) / 80 / 0.007660389 = 36.551668845
    shared data (NTFS): 0.4 / 80 / 0.007660389 = 0.652708368
    swap (ext4): 1 / 80 / 0.007660389 = 1.631770919
    Quote Originally Posted by MK27 View Post
    As to that second question, I think you have misinterpreted something -- the fdisk output in your post is not missing anything.
    9729 cylinders with 8225280 bytes each:
    9729 * 8225280 = 80023749120
    80026361856 - 80023749120 = 2612736
    Last edited by Jesdisciple; 05-17-2009 at 07:14 PM.

  7. #37
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    That is still less than one in 10000 bytes on your disk. And I think it's as I explained above (you got a slightly different number than I did, but it's close enough).

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  8. #38
    Registered User
    Join Date
    Aug 2008
    Posts
    129
    mats: Yeah, I was still typing when you posted. Anyway, here's a correction for the first section of my previous post. Does the index of each bootable partition matter? Should the home partition be moved down so I can boot?

    And I just remembered another question; I'll ask it here so it's seen. How do I choose to use NTFS versus ext4?

    80 GB, 9729 cylinders

    sizes
    home (ext4): 10 / 80 * 9729 = 1216.125 ~= 1216
    Ubuntu 1 (ext4): (21 + 2.1 = 23.1) / 80 * 9729 = 2809.24875 ~= 2809
    Ubuntu 2 (ext4): (21 + 2.1 = 23.1) / 80 * 9729 = 2809.24875 ~= 2809
    Windows XP (NTFS): (21 + 1.4 = 22.4) / 80 * 9729 = 2724.12 ~= 2725
    shared data (NTFS): 0.4 / 80 * 9729 = 48.645 ~= 49
    swap (ext4): 1 / 80 * 9729 = 121.6125 ~= 121

    ranges
    home (ext4): 1 - 1216
    Ubuntu 1 (ext4): 1217 - 4025
    Ubuntu 2 (ext4): 4026 - 6834
    Windows XP (NTFS): 6835 - 9559
    shared data (NTFS): 9560 - 9608
    swap (ext4): 9609 - 9729

  9. #39
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    You don't have to do math for this. I believe fdisk allows you to input in Gb -- but again, the table produced will adhere to cylinder boundaries and hence if you ask for 20.0 Gb, you will get something pretty close to that.

    You can play around with fdisk, you know. Create the table and change it -- nothing is done until you choose "w".

    I've never used NTFS with linux.
    Last edited by MK27; 05-17-2009 at 07:41 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  10. #40
    Registered User
    Join Date
    Aug 2008
    Posts
    129
    I can't find any way to input Gb/GB; the closest I see is the 'u' command which uses sectors instead of cylinders.

    The fdisk 'l' (lower L) command hints that NTFS is possible, but I don't see any companion commands...

  11. #41
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Jesdisciple View Post
    I can't find any way to input Gb/GB; the closest I see is the 'u' command which uses sectors instead of cylinders.

    The fdisk 'l' (lower L) command hints that NTFS is possible, but I don't see any companion commands...
    You haven't even tried to add an entry yet. Go ahead. It does not write *anything* to disk unless you choose 'w'. You can make up a whole table then quit, and it will be like fdisk never happened.

    When you create a partition, you choose a starting sector. Always use the default, unless you want to leave a gap for some reason. Which you don't. Then you can choose the ending sector, but specified in +Gb.

    u is just for changing the display units of the table, not for selecting the units of your input.

    After you create a partition (but before you 'w'rite the table to disk) you can change a partition type ('t'). That is how you set the type. But you have to create a table entry first.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  12. #42
    Registered User
    Join Date
    Aug 2008
    Posts
    129
    I forgot and wrote without changing types; I'll just run it again when Ubuntu is installed so I don't have to remember when I install Windows. I'll try to post an update tomorrow.

    Thanks!

  13. #43
    Registered User
    Join Date
    Aug 2008
    Posts
    129
    Never mind about waiting till tomorrow... When I tried to extract my archive with tar -xpPf it gave errors about insufficient space in the device. EDIT: Does it matter that the archive was at / and included /home (so the contents would have crossed partitions)?
    Command (m for help): p

    Disk /dev/sda: 80.0 GB, 80026361856 bytes
    255 heads, 63 sectors/track, 9729 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0x00025eb6

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 2809 22563261 83 Linux
    /dev/sda2 2810 5618 22563292+ 83 Linux
    /dev/sda3 5619 8343 21888562+ 83 Linux
    /dev/sda4 8344 9729 11133045 5 Extended
    /dev/sda5 8344 9559 9767488+ 83 Linux
    /dev/sda6 9560 9681 979933+ 82 Linux swap / Solaris
    /dev/sda7 9682 9729 385528+ 83 Linux
    I also had a strange spell where neither the Ubuntu Forums nor these would log me in; Firefox simply didn't change the page. Both communities run on vBulletin.
    Last edited by Jesdisciple; 05-18-2009 at 12:25 AM.

Popular pages Recent additions subscribe to a feed