LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 11-13-2009, 11:26 AM   #1
cybeijing
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Rep: Reputation: 0
If I use MBR on a 64bit Linux, do I still have 2TB limitation on booting partition?


As title. Thanks in advance!!

Patrick
 
Old 11-13-2009, 11:57 AM   #2
hal8000b
Member
 
Registered: Mar 2001
Location: UK
Distribution: Mint, Arch, Debian7
Posts: 194

Rep: Reputation: 23
Hi the 64bit you refer to is the CPU archietecture and nothing to do with the Master Boot Record (mbr)

The 2TB limitationm refers to windows only. Linux can see much larger drives depending on your file system.
Windows uses FAT's with linux the equivalent is inodes and depending on the choice of file system you can access up to
16TB on ReiserFS or 32TB on ext3

More info below


http://wiki.answers.com/Q/What_is_th..._size_on_Linux

Last edited by hal8000b; 11-13-2009 at 11:58 AM.
 
Old 11-13-2009, 12:13 PM   #3
cybeijing
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks hal8000b!

But there IS a limitation on the MBR partition. I agree with you for non-booting partition, Linux can manage way larger partitions.

From MBR WIKI
Quote:
By convention, there are exactly four primary partition table entries in the MBR Partition Table scheme, although some DOS operating systems did extend this to five (PTS-DOS)[16] or even eight (AST or NEC DOS)[17][18] entries. Both the partition length and partition start address are stored as 32-bit quantities. Because the block size is 512 bytes, this implies that neither the maximum size of a partition nor the maximum start address (both in bytes) can exceed 232 × 512 bytes, or 2 TiB.
 
Old 11-13-2009, 12:15 PM   #4
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
Why would you need such a huge MBR partition? Not even the root partition needs to be that big?
 
Old 11-13-2009, 12:19 PM   #5
cybeijing
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Original Poster
Rep: Reputation: 0
I am not implementing this huge partition for real. Just to want find out the possibility and how this works.
 
Old 11-13-2009, 12:23 PM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
There is no "MBR Partition". The MBR is defined as the 1st sector of the drive, and contains the initial boot code + the primary partition table.

From your first post, perhaps you mean the partition mounted at /boot. This can be as big as can any other Linux partition.

If we know what problem you are trying to solve, we might be more help.......
 
Old 11-13-2009, 01:20 PM   #7
cybeijing
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks again all guys for the reply.

Yes, MBR partition is not accurate. I should say the booting partition with bootstrap from MBR. However, I don't think the booting partition can be more than 2TB regularly, with MBR. If it can, GUID Partition Table will become meaningless.

Please read 'MBRs and disk partitioning' section of MBR WIKI (http://en.wikipedia.org/wiki/Master_boot_record) if you don't believe me.

My question is on a 64bit Linux, the statement of 2TB limitation on the WIKI still stand true?
 
Old 11-13-2009, 02:34 PM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Quote:
Originally Posted by cybeijing View Post

My question is on a 64bit Linux, the statement of 2TB limitation on the WIKI still stand true?
Why do I think that Hal8000b already answered this?......
 
Old 11-13-2009, 03:22 PM   #9
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by cybeijing View Post
My question is on a 64bit Linux, the statement of 2TB limitation on the WIKI still stand true?

Yes, the limitation still stands. As hal8000b said, 32bit or 64bit kernel is not relevant to the issue.

However, hal8000b's second statement is incorrect. The limitation is not windows only. It's a limitation of the partition table itself which as you have already quoted is limited by a 32bit value used for the LBAs. On a 512 byte per block disk you have an effective limit of 2TB of addressable (within the partition table) disk blocks.

If you want to exceed 2TB then you need to initialise the disk with a GPT format partition table and define your partitions within that. You'll also need to have GPT support enabled within your kernel, which some distros don't have.
 
Old 11-13-2009, 03:58 PM   #10
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
To determine what you can boot and what you can't boot there are only two relevant pieces: your boot record (whether it's an mbr or anything else) and your bootloader.

By the time grub or anything else loads, linux is not loaded, windows is not loaded, foobarOS is not loaded, so none of them has any saying in what's happening at the moment. It's nothing to do with the OS bitness nor with the fs, because the boot record to start with is fs agnostic, it's outside the partition and outside the OS. Once the OS has booted it will take on managing your partitions, and the fs drivers are the ones that will determine the maximum size of a given fs, the mbr has nothing to do here, it's just used at boot time.
 
Old 11-13-2009, 04:35 PM   #11
ramram29
Member
 
Registered: Jul 2003
Location: Miami, Florida, USA
Distribution: Debian
Posts: 848
Blog Entries: 1

Rep: Reputation: 47
The MBR partition here I think refers to the /boot partition, which should be no greater than 100MB. It is recommneded that the /boot partition be setup apart by itself from all the other partitions, including the root partition, especially if you use LVMs. It is also easier to recover from a bad disk if this partition is setup by itself.
 
Old 11-13-2009, 04:38 PM   #12
cybeijing
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks GazL and i92guboj for by far the most informative explanations!

For those of you confused on this issue reading the MBR wiki and another redhat KB (http://kbase.redhat.com/faq/docs/DOC-16981) would be helpful.

Last edited by cybeijing; 11-13-2009 at 04:54 PM.
 
Old 11-13-2009, 05:17 PM   #13
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
cybeijing, you are welcome.

For those still confused about the issue, as I said above, 64 or 32 bits linux is irrelevant. This is the boot manager (usually grub or lilo) land. The OS is not loaded, you still haven't chosen one from the menu, so it can't interfere in any way at all.

Again, what is bootable and what is not only depends on your boot record and the boot loader you use. Period.

In any case, the grub tools are always compiled as a 32 bits binaries, regardless if you use a 64 bit Linux, they simply have not been ported to 64 bits. Irrelevant as well, since it wouldn't make a difference as long as you continue using an MBR-based boot record system. The MBR has a finite space (512 bytes), and that the key to understand what this thread is about. Only 64 of these 512 bytes are devoted to the partition table, and in that space simply there's no space for numbers that are bigger than 2^32.

In these 64 bit boxes we have 16 bytes for each partition. From these 16 bytes, the first 8 are used for a few different things, the last 8 are used this way: 4 bytes (32 bits) to define the offset where the partition starts, and 4 bytes (32 bits) to define how big the partition is. The size is in sectors, which is the minimum unit that a drive handles. Unlike ram, HD's are simply not able to do byte-by-byte indirections, either you read a sector or you don't. Either you write a sector or you don't. But you can't pick half of it, or a single byte, at hardware level.

A sector is 512 bytes, so this means that the max offset you can use in the mbr is (2^32)*512 bytes, which is also the max size for a given partition as per the MBR specifications. So, the most extreme case that an MBR can handle would be a partition that starts at 2TB-1byte position and that is 2TB big. Nothing can change this, no matter what OS or architecture you use, as long as you keep using an MBR model.

If you use a different boot record system that can hold bigger numbers then that's another story, but then the whole point is moot because we would not be speaking about MBR at all, which is what these thread is about.

And again again again: this is the boot loader land. This has absolutely nothing at all to do with the capacity of your SO to handle bigger partitions while running. Your OS has drivers, big drivers, and a big kernel. Grub, unlike Linux, is not a whole OS, and has limited capabilities.

Last edited by i92guboj; 11-13-2009 at 05:21 PM.
 
Old 11-13-2009, 05:41 PM   #14
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Quote:
Originally Posted by i92guboj View Post
Once the OS has booted it will take on managing your partitions, and the fs drivers are the ones that will determine the maximum size of a given fs, the mbr has nothing to do here, it's just used at boot time.
Just to expand on what i92' has said. Although he's quite correct and you'll get the kernel started (assuming the bootloader can access it), it won't be able to detect any partitions that go above the 2TB mark unless you use a GPT partition table, so you'll have a running kernel, but no access to the filesystems on them as the block devices for them will be missing.

We had this issue come to light in the slackware distro forum a few weeks back when someone was trying to use a partitioned RAID array and not all the partitions were showing up in the dmesg.

Have a look here if you're interested in seeing how the error manifests itself.

edit:

Just want to add that, that example was for extended partitions (which are a little weird as they are chained one from another). A primary starting at 2TB - 1 block as i92' describes above might act differently.

Last edited by GazL; 11-13-2009 at 06:02 PM.
 
Old 11-13-2009, 06:06 PM   #15
i92guboj
Gentoo support team
 
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 4,083

Rep: Reputation: 405Reputation: 405Reputation: 405Reputation: 405Reputation: 405
Thanks GazL, I'll be checking that thread, interesting stuff.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
howto dump partition table that larger than 2TB? edenCC Linux - Server 3 02-23-2009 11:28 AM
Dual-booting: GRUB on the /boot partition instead of the MBR doesn't work for me jem Linux - Newbie 3 11-26-2008 09:38 AM
Raid 5, >2TB, GPT, Grub, booting, mounting root dtdionne Linux - Software 6 12-18-2007 05:37 AM
LXer: Linux Storage: Creating a Partition Size Larger than 2TB LXer Syndicated Linux News 0 11-06-2007 07:00 PM
32bit and 64bit linux file size limitation Swakoo Linux - General 2 09-05-2007 07:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration