Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: ketank on October 01, 2018, 09:53:57 AM

Title: Disk partition - 3 partitions
Post by: ketank on October 01, 2018, 09:53:57 AM
Hi,
I have piCore 9.0.3 installed and am trying to partition the memory card in 3 partitions
1, FAT partition
2. For /home
3. Static partition - this will not be backed up and will contain static files and transaction data in nosql

I have tried this many times but when I add the 3rd partition, memory card crashes and all 3 partitions are deleted.
I am using a 4GB memory card so trying to make 1GB + 3GB partitions which should leave lots of free space on the card.

Kindly guide how to go about this partitioning. 

 
Title: Re: Disk partition - 3 partitions
Post by: Rich on October 01, 2018, 10:04:21 AM
Hi ketank
Quote
I am using a 4GB memory card so trying to make 1GB + 3GB partitions which should leave lots of free space on the card.
1GB + 3GB = 4GB leaving no free space on the card for your 3rd partition.
Title: Re: Disk partition - 3 partitions
Post by: ketank on October 01, 2018, 11:02:02 AM
Sorry. My bad - 1GB + 2 GB
Title: Re: Disk partition - 3 partitions
Post by: Paul_123 on October 01, 2018, 01:05:15 PM
I do this all the time.....   I just made 8 partitions for some testing the other day using an extended partition.

When you add the last partition in fdisk, before you write the partition and quite, can print the partition table and post it here?
Title: Re: Disk partition - 3 partitions
Post by: core-user on October 01, 2018, 02:29:38 PM
I think you just need to create the partitions before installing, pointing the boot process to use another partition for your /home.
Title: Re: Disk partition - 3 partitions
Post by: ketank on October 03, 2018, 08:44:56 AM
Hi,
Thank you for response. I am not sure but it worked after changing the SD card.
Thank you for your support.
Title: Re: Disk partition - 3 partitions
Post by: ketank on October 03, 2018, 09:45:41 AM
Hi,
I thought I had success but looks like something is still not ok.

the final partition table -
Code: [Select]
Device       Boot StartCHS    EndCHS        StartLBA     EndLBA    Sectors  Size Id Type
/dev/mmcblk0p1    4,0,1       37,63,32          8192      77823      69632 34.0M  c Win95 FAT32 (LBA)
Partition 1 does not end on cylinder boundary
/dev/mmcblk0p2    38,0,1      1014,36,1        77824    2077824    2000001  976M 83 Linux
Partition 2 does not end on cylinder boundary
/dev/mmcblk0p3    1014,36,2   1023,63,32     2077825    5984075    3906251 1907M 83 Linux
Partition 3 does not end on cylinder boundary

Questions -
1. how to I make it mount automatically
2. when I try to mount manually I get following error -
Code: [Select]
[  353.108040] F2FS-fs (mmcblk0p3): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[  353.108059] F2FS-fs (mmcblk0p3): Can't find valid F2FS filesystem in 1th superblock
[  353.108724] F2FS-fs (mmcblk0p3): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[  353.108737] F2FS-fs (mmcblk0p3): Can't find valid F2FS filesystem in 2th superblock
[  353.108787] F2FS-fs (mmcblk0p3): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[  353.108797] F2FS-fs (mmcblk0p3): Can't find valid F2FS filesystem in 1th superblock
[  353.108809] F2FS-fs (mmcblk0p3): Magic Mismatch, valid(0xf2f52010) - read(0x0)
[  353.108816] F2FS-fs (mmcblk0p3): Can't find valid F2FS filesystem in 2th superblock

Not sure how to proceed forward.

    [EDIT]: Added code tags.  Rich
Title: Re: Disk partition - 3 partitions
Post by: Paul_123 on October 03, 2018, 11:25:47 AM
I've been doing testing with f2fs, it is really not very stable.   There are real no speed gains either for normal linux use.

I would just use EXT3/4.    XFS seems to work fairly well too.
Title: Re: Disk partition - 3 partitions
Post by: bmarkus on October 04, 2018, 01:13:44 AM
I've been doing testing with f2fs, it is really not very stable.   There are real no speed gains either for normal linux use.

I would just use EXT3/4.    XFS seems to work fairly well too.

What do you mean not very stable?
Title: Re: Disk partition - 3 partitions
Post by: ketank on October 04, 2018, 05:11:43 AM
Hi,

Reformated as ext3 and working fine now.
Thank you for your support.
Title: Re: Disk partition - 3 partitions
Post by: TimJ on October 04, 2018, 05:47:21 AM
Another partitioning question.

I write piCore to a sdcard on my PC using Ubuntu 18.04, and whilst there use gparted to increase the partition size and add any extras partitions, but if I then try to use fsck on the Pi i just get this.

Code: [Select]
tc@box:~$ sudo fsck /mnt/mmcblk0
fsck (busybox 1.28.4)
fsck: fsck.auto: No such file or directory
tc@box:~$

Not a major problem as I just put the card back in the PC. But wondering what was the cause?

Tim
Title: Re: Disk partition - 3 partitions
Post by: curaga on October 04, 2018, 01:41:11 PM
That is the device, not the partition.
Title: Re: Disk partition - 3 partitions
Post by: Paul_123 on October 04, 2018, 10:39:52 PM
Bela,

Stable might not be the right choice of words, but I've had a number of cases when testing f2fs, where a file system was "successfully" created, but the drive would not mount......   the exact problem the OP had.   It seemed to be dependent on the size of the partition created.

Once a partition was mounted, it did seem to work okay, but my unofficial benchmark tests showed times varied by about 90 seconds on a 7min test  (I ran tests 5 times)   ext4 was much more consistent on the same test. 

Paul
Title: Re: Disk partition - 3 partitions
Post by: bmarkus on October 05, 2018, 03:34:02 AM
Hi Paul

thanks. By default I'm using ext4. In piCore10 base btrfs kernel module is also included. It is stable and reliable. btrfs partition mounts slower than ext4fs but performance is good.
Title: Re: Disk partition - 3 partitions
Post by: Paul_123 on October 05, 2018, 06:19:32 PM
I did btrfs testing too. 

-Mounts slow as you noted
-Modules are extremely large.
-btrfs-progs packages has extra dependencies.
-Smallest partition with separate data and metadata regions is ~115MB.  (Doesn't make it a good candidate for the tce partition)
-Average performance was similar to ext4.   Some test runs were much faster and some runs were slower.
-The self healing is interesting.....but not sure that is of much value in a read-only file system.

xfs was not a clear winner either.
Title: Re: Disk partition - 3 partitions
Post by: Greg Erskine on October 05, 2018, 06:34:03 PM
As a side note, I recently read ext2 is more suitable for SD cards "AND" USB drives??. I know that it doesn't means it correct.

On a mainly readonly system it seemed to make sense to me.
Title: Re: Disk partition - 3 partitions
Post by: bmarkus on October 06, 2018, 03:01:10 AM
I was not happy with xfs, so left btrfs in the base but probably will drop modules.