Tiny Core Linux

Tiny Core Base => TCB Talk => Topic started by: gojirasan on September 16, 2012, 03:18:48 PM

Title: 3TB+ HDD support?
Post by: gojirasan on September 16, 2012, 03:18:48 PM
Is there any way to get tinycore to fully recognize 3TB+ GPT drives? Back when I was using 2.x microcore64 none of my large drives were recognized and that is the only reason I have stopped using tc as my main linux distro. But I still really like tinycore and would like to be able to use it as my lean 'n mean, fast booting distro. I don't mind having to use 32 bit extensions or having to compile my own 64 bit ones, but I do need my large drives to be recognized. Any suggestions?
Title: Re: 3TB+ HDD support?
Post by: Rich on September 16, 2012, 06:21:41 PM
Hi gojirasan
After Googling GPT drive to find out what that was, I did a little poking around and found the following:
1. CONFIG_EFI_PARTITION=y   is set int the kernel config file.
2. The repository has gdisk.tcz with a description of GPT fdisk.
3. The GParted utility has a GPT option under Device->Create Partition Table->Advanced
4. The grub2 extension includes  usr/local/lib/grub/i386-pc/gptsync.mod  and  usr/local/lib/grub/i386-pc/part_gpt.mod

Whether that is enough to fully recognize your drives, I don't know.
Title: Re: 3TB+ HDD support?
Post by: gojirasan on September 16, 2012, 06:56:37 PM
I'm not trying to boot to these 3TB drives. My motherboard doesn't support GPT booting anyway. It's not EFI. I just want their full size to be recognized in tinycore64. So I don't think a GPT fdisk, gparted, or grub2 will help me. The usual reason that large drives (greater than 2.1TB) are not recognized by 32 bit OSes is addressing. 32 bits is not enough to address all of the sectors on a drive larger than about 2.1TB. At least with normal 512 byte sectors. But I thought since the 64 bit version of tinycore is supposed to have a 64 bit kernel that that would be enough to address them. Unfortunately I don't know enough about Linux architecture in general or tinycore architecture in particular to know why it does not seem to work.

The CONFIG_EFI_PARTITION=y option sounds like a promising lead. I wonder if it means that I have to recompile the kernel. I'll start looking into that. Thanks, Rich.
Title: Re: 3TB+ HDD support?
Post by: Rich on September 16, 2012, 07:07:07 PM
Hi gojirasan
Quote
The CONFIG_EFI_PARTITION=y option sounds like a promising lead. I wonder if it means that I have to recompile the kernel. I'll start looking into that.
You don't need to recompile, that is already compiled in. CONFIG_LBDAF=y is also compiled in which should
allow the kernel to recognize devices over 2Tbytes in size. You may also have to do something special when
formatting the drive.
Title: Re: 3TB+ HDD support?
Post by: gojirasan on September 16, 2012, 07:21:32 PM
So both options are already set to 'y' by default? The drives were already formatted in Windows. They are NTFS. The last time I tried this was with an older version of the kernel. I just assumed that it was due to the fact that 64 bit Tinycore was not 'truly' 64 bit. In some way that I didn't understand. It sounds like the current version is at least supposed to recognize my drives. I'm going to do a fresh 64 bit reinstall and see if they are recognized.
Title: Re: 3TB+ HDD support?
Post by: Rich on September 16, 2012, 07:29:39 PM
Hi gojirasan
Yes, both options are set to yes in the current kernel. 32 versus 64 bit kernels have nothing to do with it. If the kernel
needs to use a 64 bit value for something it will, even on a 32 bit machine, even when compiled as a 32 bit
executable.
Title: Re: 3TB+ HDD support?
Post by: gojirasan on September 16, 2012, 07:59:13 PM
Now I feel stupid. It looks like I had this silly idea that you needed a 64 bit OS to implement 64 bit Logical Block Addressing, but after some googling I see that that doesn't seem to be the case at all and that 32 bit distros have supported 64 bit LBA for quite a while now. The only issue seems to be whether a particular OS supports GPT versus MBR only. The 2.199 limit is just a limitation to the MBR system. Even Microsoft has GPT support for every 32 bit OS after 32 bit XP. Now I wonder if whatever problem I had with tinycore not recognizing my drives before had nothing to do with GPT support. Tinycore has probably had GPT support for ages.
Title: Re: 3TB+ HDD support?
Post by: Juanito on September 16, 2012, 08:19:58 PM
Tinycore has probably had GPT support for ages.

I am able to boot both my current machines from gpt partitions using tinycore - neither partition is > 2tb though...
Title: Re: 3TB+ HDD support?
Post by: curaga on September 17, 2012, 09:06:01 AM
According to my logs, GPT support was added in TC 3.0, so right after you tried it seems ;)
Title: Re: 3TB+ HDD support?
Post by: coreplayer2 on September 17, 2012, 12:40:32 PM
I have an 8TB partition for storage of High Definition video which is GPT and is readable by all my systems, additionally after adding RAID support in TC I found I was able to access the media from a test TC system
Title: Re: 3TB+ HDD support?
Post by: gojirasan on September 19, 2012, 10:34:42 AM
I just wanted to reply to say that my 3 TB drives seem to be recognized just fine. Fdisk complains at boot time though which is a slight annoyance. I'm not sure why fdisk is running at that point.
Title: Re: 3TB+ HDD support?
Post by: Rich on September 19, 2012, 12:52:28 PM
Hi gojirasan
Quote
I'm not sure why fdisk is running at that point.
The /etc/tc-config script calls the /usr/sbin/rebuildfstab script which uses  fdisk -l  to get a list of devices.
Title: Re: 3TB+ HDD support?
Post by: Tiago Araujo da Costa on April 29, 2020, 12:04:57 PM
Try edit /usr/sbin/rebuildfstab, delete the string "fdisk -l" and write:

sed -r "s/ +/ /g;/sd../!d;s/(([^ ]*) ){4}(.*)/\3/;s/^/\/dev\//" /proc/partitions

Save is file.
The problem is edit core.gz or corepure64.gz where is /usr/sbin/rebuildfstab file