stylx
Posts: 49
Joined: Thu Oct 25, 2012 10:06 pm

Making a 29gb SDcard using a 32gb SDcard for Risc os(SOLVED)

Tue Nov 24, 2015 1:21 pm

I have found a way to use risc os on a 32 gb SDcard giving you 30 gb of usable free space all in one partition. here how

create a normal risc os sd card.
boot it, then go to utilities and open !HForm.
Run it. Now swap the sdcard over with your 32 gb sdcard in your pi
select to partition sdfs card 0
this will format the 32 gb sd card and make it bootable.
when !Hform say's click to exit swap over your sdcard with the risc os one
from here in linux get gparted and create a 48Mib fat 16 partition and make it bootable and label it PiBoot and exit
load up risc os
now plug back in the 32gb sdcard and access it by by clicking the sd:0 on the task bar and open a window and plug back in the risc os sdcard
now each directory from the root one at a time to the 32gb sdcard
note if you adjust the filer memory in the tasks to half and Next to half you will have fewer disc swaps
now when thats all done
get two card reader and plug then into a linux box , with gparted delete the old dos partition create a 48Mib fat 16 partition on the 32 gb sdcard
gparted won't register the risco os partition and now adjust the flags and make the partition bootable and label it PiBoot.
mount the partition and then copy the contents of the orignal risc os sd card to new PiBoot partition on the 32 gb sdcard.
when finished plug the 32 gb sdcard in into the pi and boot
risc os will complain and ask to insert RISCOSpi sdcard at this point click on okay and the name the disk RISCOSpi.
that the job done you now have a 30GB SDcard
Last edited by stylx on Fri Dec 11, 2015 6:19 am, edited 2 times in total.

dfeugey
Posts: 119
Joined: Mon Nov 03, 2014 2:38 pm
Location: France
Contact: Website

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Tue Nov 24, 2015 7:12 pm

when !Hform say's click to exit swap over your sdcard with the risc os one
Hu, no. With your solution, there is an overlap between SDFS partition and DOS partition. When you'll fill the SDFS partition, the DOS one will be corrupted.
  1. Create a Ramdisc and copy !HForm to it. Leave Pinboard, dismount the system disc and insert the 32 GB card.
  • Format a part of the disc with HForm.
  • Make a FAT16 partition on the end of the disc, on the other part of the disc.
Then, no problem.
RISC OS FR - All RISC OS, in french (but not only)
http://www.riscos.fr/

stylx
Posts: 49
Joined: Thu Oct 25, 2012 10:06 pm

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Tue Nov 24, 2015 7:33 pm

I know , but it works !

stylx
Posts: 49
Joined: Thu Oct 25, 2012 10:06 pm

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Tue Nov 24, 2015 7:41 pm

also if you partition with !HForm and then create the dos partition at the start of the disc then copy files this corrupts the dos partition delete the partition and then recreate it and then copy the contents of the fat partition from the risc os sdcard to the new card this work's, I know this because I done it

dfeugey
Posts: 119
Joined: Mon Nov 03, 2014 2:38 pm
Location: France
Contact: Website

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Wed Nov 25, 2015 7:24 am

also if you partition with !HForm and then create the dos partition at the start of the disc then copy files this corrupts the dos partition delete the partition and then recreate it and then copy the contents of the fat partition from the risc os sdcard to the new card this work's, I know this because I done it
Of course it works, since RISC OS puts data from center of the disc to the edge. But try to fill the RISC OS partition, and you'll corrupt you DOS partition, each time. You must make a SDFS partition on part of the disc, then use the remaining space for your DOS partition, that must be at the end of the disc.

You could technically make an overlap between DOS and SDFS partitions. It's what SystemDisc does. But it also creates a file on the SDFS partition that maps the position of the DOS partition. So no risk for SDFS to write in this space.
RISC OS FR - All RISC OS, in french (but not only)
http://www.riscos.fr/

stylx
Posts: 49
Joined: Thu Oct 25, 2012 10:06 pm

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Wed Nov 25, 2015 7:40 am

I not sure you could be right . But wouldn't the original RISC os sdcard have this file already in place , as the partition I created is a clone in size of the original partition ie 48Mib And is in affect a overlay as I created the original filecore across the complete partition and then overlayed the dos partition on top?
but will do further testing to see if your right
Last edited by stylx on Wed Nov 25, 2015 10:50 am, edited 1 time in total.

stylx
Posts: 49
Joined: Thu Oct 25, 2012 10:06 pm

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Wed Nov 25, 2015 10:28 am

Okay used more than 2 gb on the new disc which is more than original RISC os sdcard and it has,nt corrupted the fat 16 paritition.
Is dfeugey saying that the fat 16 partition is moving , or is the file filecore moving out wards,I not quiet sure what he is saying could some one give me a 101 on SDFS file system and explain

stylx
Posts: 49
Joined: Thu Oct 25, 2012 10:06 pm

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Wed Nov 25, 2015 12:35 pm

Has anybody tried this yet. Please post a responds

dfeugey
Posts: 119
Joined: Mon Nov 03, 2014 2:38 pm
Location: France
Contact: Website

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Wed Nov 25, 2015 8:42 pm

I not sure you could be right . But wouldn't the original RISC os sdcard have this file already in place
Yes, it is. But it now possibly points to another place of the SD Card. It's the main functionality of SystemDisc to make a DOS partition and the file that points to it. An existing DOS file will not point to a new DOS partition.

A good way to test your setup is to put files on the 'imagefile' (the DOS file) and to look under Linux if the files are present on the real partition.
Okay used more than 2 gb on the new disc which is more than original RISC os sdcard and it has,nt corrupted the fat 16 paritition.

Is dfeugey saying that the fat 16 partition is moving , or is the file filecore moving out wards,I not quiet sure what he is saying could some one give me a 101 on SDFS file system and explain
You made this:

Code: Select all

SD Card              : **********************************************
DOS Partition        : **
SDFS Partition       : **********************************************
You write 2 GB here  :                    **********
(should be center to edge in RISC OS)
So of course, you did not corrupt the DOS partition. To see if you're lucky (if the old DOS file still maps to the right place of disc), you must fill the SDFS partition completely. To the last byte. When you'll know :)

The good way to do it is to format the disc with HForm, but not completely, then to make a DOS partition at the end of the disc. Like this:

Code: Select all

SD Card              : **********************************************
DOS Partition        :                                             **
SDFS Partition       : ********************************************
No overlap, no problem, no need for the DOS file in the RISC OS partition.
RISC OS FR - All RISC OS, in french (but not only)
http://www.riscos.fr/

stylx
Posts: 49
Joined: Thu Oct 25, 2012 10:06 pm

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Wed Nov 25, 2015 9:16 pm

couldn't you just give me the name of the file and edit it in hex editor

dfeugey
Posts: 119
Joined: Mon Nov 03, 2014 2:38 pm
Location: France
Contact: Website

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Thu Nov 26, 2015 7:00 am

Sorry, I'm not sure to understand your question. The file that points to the DOS partition is in !Boot.
To make a new DOS partition with the right size is not enough to be pointed by an old DOS file overlay. It should be exactly at the same position on disc too because the file does not point to the partition, but to the partition's position.

Code: Select all

SDFS                          : ************************************
Old position of DOS partition :               ***
New position of DOS partition : ***
File points to :              :               ***
And bing, no overlap anymore. So if you put 2 GB of data you get this.

Code: Select all

SD Card                       : ************************************
DOS partition                 : ***
SDFS                          :            ###***###
No problem. But if you put 30 GB of data you get this

Code: Select all

SD Card                       : ************************************
DOS partition                 : ???
SDFS                          : ###############***##################
And your DOS partition will be rewritten.
Of course, you can be lucky and the new DOS partition could be at the right place.

Please note that when you copy the content of the SDFS partition to a new disc, the DOS file will have a new position on the new disc, as it's a regular file. And this position is unpredictable. You need !SystemDisc to create the file (again) at the right position and to make it pointing to the right space of the card. If not, the part of the SDFS partition that overlaps the DOS partition will not be protected from future writes.

That's why we all buy !SystemDisc :)
RISC OS FR - All RISC OS, in french (but not only)
http://www.riscos.fr/

moochris
Posts: 3
Joined: Sat Nov 07, 2015 4:08 pm

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Thu Nov 26, 2015 12:20 pm

My advice is also to buy !SystemDisc

It's only £14 and you can easily create boot discs of any size.

stylx
Posts: 49
Joined: Thu Oct 25, 2012 10:06 pm

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Thu Nov 26, 2015 10:01 pm

question. if the dos partition didn't align then surely i couldn't access the files in the dos partition from risc os.
ie from !boot.Loader dir
as i can access the config/txt file and alter it surely the partition must align and the original pointer file valid?
or i'd just get back garbage from the file?

stylx
Posts: 49
Joined: Thu Oct 25, 2012 10:06 pm

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Thu Nov 26, 2015 11:13 pm

Sorry to ramble but here's a another to look at it. the dos partition is a clone of the original 48Mib it would there fore have the same sector size as the original so there fore the same address as the original as I copy the !boot directory which you say is the pointer file it would point to exactly the same place and would not be over written as the address is hard coded into !boot dir or file the pointer file storage size may be different but the fat 16 partition would would always have the same address as the original so the pointer file should always point to the same place.
Plus I really like to know how things work and I do this just for fun

stylx
Posts: 49
Joined: Thu Oct 25, 2012 10:06 pm

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Fri Nov 27, 2015 5:36 am

Another point. When you format a 2gb disc the sector byte size is 512 bytes by default and 4096 bytes when you format a 30gb because of this the files should never get over written. the files on the larger filecore on have more room to play with. or am I totally missing the point?

dfeugey
Posts: 119
Joined: Mon Nov 03, 2014 2:38 pm
Location: France
Contact: Website

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Fri Nov 27, 2015 6:49 am

question. if the dos partition didn't align then surely i couldn't access the files in the dos partition from risc os.
ie from !boot.Loader dir. as i can access the config/txt file and alter it surely the partition must align and the original pointer file valid?
I asked you to verify if you make a modification to Loader, is it visible from the real DOS partition with a PC and vice versa.
What you see inside Loader is perhaps NOT the DOS partition if both are not aligned any more on disc.
or i'd just get back garbage from the file?
If it's not aligned to the real DOS partition, it's still working and visible as a DOS image file system. But what you write on it will not be reflected on the real partition. From RISC OS, you don't access a partition, but a file. The trick is that the file is formated in FAT16, and aligned with a real DOS partition.
Sorry to ramble but here's a another to look at it. the dos partition is a clone of the original 48Mib it would there fore have the same sector size as the original so there fore the same address as the original
Biiiiip. Wrong. Same size, but not same position.
as I copy the !boot directory which you say is the pointer file it would point to exactly the same place and would not be over written as the address is hard coded into !boot dir or file the pointer file storage size may be different but the fat 16 partition would would always have the same address as the original so the pointer file should always point to the same place.
Plus I really like to know how things work and I do this just for fun
First, you DOS partition is perhaps not at the same place. It can be at the end of the disc, the middle, the beginning. Did you check the position on the original SD Card image?

Second, my fault, Loader does not point to the DOS partition place. IT IS at the DOS partition place. An image file system formatted in FAT16 is basically the copy of the content of a real partition, so, if it's at the same place as a real partition, then, what you'll write on one will be visible on the other. A very clever trick :)

When you copied Loader from one SD to one another, RISC OS copied it as a file, and probably put it at a very different place of the new disc.
Another point. When you format a 2gb disc the sector byte size is 512 bytes by default and 4096 bytes when you format a 30gb because of this the files should never get over written. the files on the larger filecore on have more room to play with. or am I totally missing the point?
There is more wasted space with small files. That's almost all. See sector byte as cluster size.
RISC OS FR - All RISC OS, in french (but not only)
http://www.riscos.fr/

stylx
Posts: 49
Joined: Thu Oct 25, 2012 10:06 pm

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Fri Nov 27, 2015 7:15 am

As to the fat 16 placement I put it in the same place as I found it on the original RISC os sd card, the start position on the RISC os sdcard was 10 Bytes and does it reflect in both file and partition I will check later.

stylx
Posts: 49
Joined: Thu Oct 25, 2012 10:06 pm

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Fri Nov 27, 2015 1:08 pm

Okay your right the file don't align,But I have just deleted the loader directory from the sdcard and yet it still boot's okay what is the point of the loader directory and has I pointed out before that the sector/ cluster size is greater you shouldn't over write the dos partition by filling up the filecore ? or is it that file core grow or push file outward's , sorry but need imformation.

dfeugey
Posts: 119
Joined: Mon Nov 03, 2014 2:38 pm
Location: France
Contact: Website

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Sat Nov 28, 2015 1:48 pm

to the fat 16 placement I put it in the same place as I found it on the original RISC os sd card, the start position on the RISC os sdcard was 10 Bytes and does it reflect in both file and partition I will check later.
The FAT16 partition position yes, but not the position of the Loader file.
Okay your right the file don't align,But I have just deleted the loader directory from the sdcard and yet it still boot's okay what is the point of the loader directory and has I pointed out before that the sector/ cluster size is greater you shouldn't over write the dos partition by filling up the filecore ? or is it that file core grow or push file outward's , sorry but need imformation.
The point is to protect the space used by the FAT16 partion.

Sector / cluster size has nothing to do here. You should use HForm with a lower number of CYLINDERS than the maximum to leave room at the end of the disc, then to make the DOS partition at the end of the disc, in the free space (beware, Linux and RISC OS does use the same disc geometry). Here, your partition should be corrupted when you'll fill between 50% and 100% of the 30 GB SDFS filesytem.

https://en.wikipedia.org/wiki/Data_cluster
RISC OS FR - All RISC OS, in french (but not only)
http://www.riscos.fr/

stylx
Posts: 49
Joined: Thu Oct 25, 2012 10:06 pm

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Mon Nov 30, 2015 12:18 pm

Thank you for information , will try to make an sd card using non over lapping partition when I get a free moment . Also do I need to include the loader directory in !boot as won't be used?

dfeugey
Posts: 119
Joined: Mon Nov 03, 2014 2:38 pm
Location: France
Contact: Website

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Tue Dec 01, 2015 6:45 am

No, it's no use to copy it to new card.
RISC OS FR - All RISC OS, in french (but not only)
http://www.riscos.fr/

stylx
Posts: 49
Joined: Thu Oct 25, 2012 10:06 pm

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Mon Dec 07, 2015 5:25 am

Sorry for the wait had no Internet!
Ok here goes
Fire up !HForm and partition your 32 gb sdcard and select new shape when it ask for the number of heads select the default -1 ie if it is 206 enter 205 and then keep the other parameter the same make bootable and long file names etc . This should give you. A 29gb sdcard ,then copy the contents of the RISC os. Sdcard to your new sdcard, adjust the filer in tasks to minimise disc swaps once done fire up Linux machine and create a fat16 partition at the end of the drive I make mine 48Mib and this make it easy to calculate the start address ie subtract 48 from the end address and this is your partition start address make bootable and label PiBoot and copy the content of the RISC os fat 16 partition to your new partition.
Then insert into pi and reboot and name the disc RISCOSpi and then reboot then enter the !boot directory ie shift and mouse click and delete the loader directory as this is no longer in use.
That it you should now have a 29gb RISC os sdcard.
I would like to thank dfeugey for all his help and if he has any addition advice to give.

dfeugey
Posts: 119
Joined: Mon Nov 03, 2014 2:38 pm
Location: France
Contact: Website

Re: making a 30gb SDcard using a 32gb SDcard for Risc os

Mon Dec 07, 2015 6:25 am

You're welcome :)
Nota: for security reasons, it's probably better to adjust the cylinders parameter than the head parameter. But both should work anyway...
RISC OS FR - All RISC OS, in french (but not only)
http://www.riscos.fr/

stylx
Posts: 49
Joined: Thu Oct 25, 2012 10:06 pm

Re: Making a 29gb SDcard using a 32gb SDcard for Risc os(SOL

Fri Dec 11, 2015 6:37 am

Ok next I'm gonna try a 64gb sdcard!!!
when calculating cluster size should I use 512 or 4096 in the calculations?

dfeugey
Posts: 119
Joined: Mon Nov 03, 2014 2:38 pm
Location: France
Contact: Website

Re: Making a 29gb SDcard using a 32gb SDcard for Risc os(SOL

Mon Dec 14, 2015 7:01 am

Just let RISC OS choose the right one and use this value for all your maths things.
Anyway, disc geometry is not the same under RISC OS and Linux. So the best is to make calculation on both with total size in mind.
Nota: last time I tried, the Pi did have serious issues with 64GB cards.
RISC OS FR - All RISC OS, in french (but not only)
http://www.riscos.fr/

Return to “RISCOS”