Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor II
2,221 Views

Make partition larger on Windows

My SD card of 16 GB contains a partition of 49.2 MB and I want to make it larger. I found /thread/46019?start=0&tstart=0 this but it's on Linux. I'm using eglibc.

EDIT: On Linux

If you have access to another Linux computer, you can use the following steps to resize the filesystem:

Assuming that SD card is mounted under /media/sdcard:

1. Run a file system check (fsck) first:

fsck.ext3 -f /media/sdcard/image-full-clanton.ext3

2. Run resize2fs to resize the file system. The second argument (409600 in the example) specifies the new filesystem size in kilobytes:

resize2fs /media/sdcard/image-full-clanton.ext3 409600

How do you make this partition larger on Windows (step by step instructions)?

Tags (1)
25 Replies
Highlighted
Honored Contributor I
25 Views

Hi BretchW,

I don't recall the details, it's an OS issue and I did it much time ago. You should delete partitions and leave just one partition, which I made with the Win disk management tool, IIRC.

This is the kind of screen you should see:

I think I saved the sequence of screens somewhere, but I do not have them at hand. I'll post as soon as I find them.

HTH,

Fernando.

Highlighted
New Contributor II
25 Views

This is what I had before inserting the SD card:

This is the disk manager when the SD card from the Intel Galileo is inserted.

So I have to delete the 13,52 GB which isn't assigned? Is there a step I have to do next?

0 Kudos
Highlighted
Honored Contributor I
25 Views

BrechtW wrote:

This is what I had before inserting the SD card:

This is the disk manager when the SD card from the Intel Galileo is inserted.

So I have to delete the 13,52 GB which isn't assigned? Is there a step I have to do next?

I don't know if I did is the most elegant and/or efficient way, but here is what I did:

1) Take a look at what you have already installed in the current partition and make a "back up" or make a review in order to reconstruct at least your current installation. I did not have much at this step, but maybe you already made a lot of changes you'll have to do again.

2) Delete every current partition. In your case, you have three partitions to delete.

3) Create a new partition and assign it all the available space.

4) Format the new partition in FAT32

After these steps the SD card should have a big partition with all the SD card available space in it.

HTH,

Fernando

0 Kudos
Highlighted
New Contributor II
25 Views

I was using a brand new SD card and I followed https://software.intel.com/en-us/get-started-galileo-windows-step1 this tutorial. I think in this process these partitions were created.

Doing the steps FGT mentioned and then follow the tutorial again with my back-up image, will result in the same as before I think.

0 Kudos
Highlighted
Honored Contributor I
25 Views

BrechtW wrote:

I was using a brand new SD card and I followed https://software.intel.com/en-us/get-started-galileo-windows-step1 this tutorial. I think in this process these partitions were created.

Doing the steps FGT mentioned and then follow the tutorial again with my back-up image, will result in the same as before I think.

No, the tutorial you refer to works on already created partitions, more specifically:

"

Write the image to your micro SD card

This section contains steps to write the image to your micro SD card.

"

is about writing the image, and an image is wrote only in a created partition (i.e. the one the Win32DiskImager finds in the SD card)

HTH,

Fernando.

0 Kudos
Highlighted
Honored Contributor I
25 Views

FGT wrote:

BrechtW wrote:

I was using a brand new SD card and I followed https://software.intel.com/en-us/get-started-galileo-windows-step1 this tutorial. I think in this process these partitions were created.

Doing the steps FGT mentioned and then follow the tutorial again with my back-up image, will result in the same as before I think.

No, the tutorial you refer to works on already created partitions, more specifically:

"

Write the image to your micro SD card

This section contains steps to write the image to your micro SD card.

"

is about writing the image, and an image is wrote only in a created partition (i.e. the one the Win32DiskImager finds in the SD card)

HTH,

Fernando.

Replying to myself just to confirm that at least in a quick search I did not find any indication of Win32DiskImager creating any partition, but using the ones that it finds already created in the SD card.

HTH,

Fernando.

0 Kudos
Highlighted
Employee
25 Views

Hi BrechtW,

Have you been able to change the partitions on Windows?

Regards,

Charlie

0 Kudos
Highlighted
New Contributor II
25 Views

I didn't try it yet. If you make an image, you make a bit by bit copy. If you write this to a formatted card , will this be the same as before including patitions?

0 Kudos
Highlighted
New Contributor I
25 Views

No, it will be exactly what is when you use a fresh blank card. I even D/Led a (free) partitioning package and it could not change the partition table at all. (Actually, I can move the ext3 partition around, but cannot resize it, or the FAT32 partition.) The Win32DiskImager writes images -- that includes partitioning on the microSD card. Resizing the FAT32 partition would give the XDK more room, but not the ext3 one -- that is the one that you need to increase, not the FAT32 one.

The answer here, I believe -- will be found on the Galileo 2 itself -- in other words -- it requires a Linux based solution. There needs to be a Linux partition on the card -- I don't see how making the entire card a FAT32 partition will work and it takes away a huge portion of Linux capability.

So, I have some Linux documentation and I am trying to suss this myself.

Windows Disk Manager is pretty much useless for this, in my opinion. Any solution must also make changes to /etc/fstab -- else the device won't boot.

0 Kudos
Highlighted
Honored Contributor I
25 Views

jinzai wrote:

No, it will be exactly what is when you use a fresh blank card. I even D/Led a (free) partitioning package and it could not change the partition table at all. (Actually, I can move the ext3 partition around, but cannot resize it, or the FAT32 partition.) The Win32DiskImager writes images -- that includes partitioning on the microSD card. Resizing the FAT32 partition would give the XDK more room, but not the ext3 one -- that is the one that you need to increase, not the FAT32 one.

The answer here, I believe -- will be found on the Galileo 2 itself -- in other words -- it requires a Linux based solution. There needs to be a Linux partition on the card -- I don't see how making the entire card a FAT32 partition will work and it takes away a huge portion of Linux capability.

So, I have some Linux documentation and I am trying to suss this myself.

Windows Disk Manager is pretty much useless for this, in my opinion. Any solution must also make changes to /etc/fstab -- else the device won't boot.

I do not understand... maybe I'm missing something... I did this some months before and I saved some screens, I'm sure I did not do any thing in Linux.

After this process I just followed the Intel documentation, i.e. I copied the image.

HTH,

Fernando.

0 Kudos
Highlighted
Honored Contributor I
25 Views

Replaying again just to confirm that I've used Win32DiskImager on a card which looks like this

and it worked.

HTH,

Fernando.

0 Kudos
Highlighted
New Contributor I
25 Views

Ah, I see....you did not actually write the *image* then...you copied the folder(s), -- that is different. That leaves you with no Linux partition, however.

I am curious -- are you using this as an Arduino compatible system, then? Or can you use the Intel XDK and say, node.js?

I am using node.js and without a Linux (ext3) partition -- it won't work.

Thanks for the screen shots, though -- very helpful, just not for my case, apparently. I will use a 32GB card to see if I can get this working.

0 Kudos
Highlighted
Honored Contributor I
25 Views

jinzai wrote:

Ah, I see....you did not actually write the *image* then...you copied the folder(s), -- that is different. That leaves you with no Linux partition, however.

How do you know that? Maybe I did not explain properly...

When I wrote

"After this process I just followed the Intel documentation, i.e. I copied the image."

I meant:

Write the image to your micro SD card

according to the Intel documentation, using Win32DiskImager. Maybe you still think, as you wrote in a previous post:

"The Win32DiskImager writes images -- that includes partitioning on the microSD card"

which is hardly true, but I don't have enough time to explain.

I am using node.js and without a Linux (ext3) partition -- it won't work.

Did you already try it or you are guessing?

Fernando.

0 Kudos
Highlighted
Honored Contributor I
25 Views

Replying to myself just to fix an error:

FGT wrote:

Maybe you still think, as you wrote in a previous post:

"The Win32DiskImager writes images -- that includes partitioning on the microSD card"

which is hardly true, but I don't have enough time to explain.

I am using node.js and without a Linux (ext3) partition -- it won't work.

Did you already try it or you are guessing?

Fernando.

I had a little time to experiment, and it seems to be that after using Win32DiskImager there is always a 50MB partition as well as a 1.27 GB partition. I think that the 1.27 partition is the ext3 one. This seems to be "consistent" with the requirement defined by Intel of using a card of at least 2 GB.

BR,

Fernando.

0 Kudos
Highlighted
New Contributor II
25 Views

That's disappointing. So there is no real advantage in using a card larger than 2GB?

0 Kudos
Highlighted
Honored Contributor I
25 Views

BrechtW wrote:

That's disappointing. So there is no real advantage in using a card larger than 2GB?

Not exactly, but I think it would require some extra work...

I think the procedure in the Intel documentation is just for startup, i.e. the Galileo will boot up and run fine... If you want to take advantage of the extra SD card space I think there are some alternatives, which imply extra work:

a) Make a new ext3 partition in the unused SD card space, mount and use it.

b) Resize the existing ext3 partition so that it includes the unused SD card space.

I've not made any one of them. If I experiment and get some result I'll let you know.

Fernando.

0 Kudos
Highlighted
Employee
25 Views

Hi BrechtW,

Were you able to use FGT suggestion and resize the partition? Let us know your results.

Sergio

0 Kudos
Highlighted
New Contributor I
25 Views

No, I never guess...and as you can see, it does write the partition table -- now, anyway. (Perhaps that changed, who knows?)

So, I went back to my original plan, which is to use the Galileo itself to effect this disk reclamation -- without changing the distro or adding anything at all -- I like my device stock and running node.js. So...

I used the Linux command line to create another primary Linux partition after the two that the system creates. The process is fairly straight forward, actually.

Use fdisk and create a new partition using defaults. (Basically, enter fdisk and the relevant command is simply "n".) This will be a primary partition, beginning at the first free sector and taking up the remainder of the disk. It will be a Linux (ext3) partition. Make sure to write it to the disk before exiting. fdisk commands can be printed by typing "m". Partitions are listed with the "p" command. After writing it, there will be a red warning printed. You can ignore this and reboot Galileo by typing "/sbin/reboot" at the command prompt.

Wait for the XDK to ask you to reconnect and do so. Next, you should use "mke2fs -j /dev/mmcblk0p3" to create a file system on the new partition. Reboot when that completes...it takes some time!

Next, edit /etc/fstab -- I used vi, because -- it is all I had instructions for...I added this line, right after the first line...

/dev/mmcblk0p3 /Galileo auto defaults 0 2

One more reboot and the new partition is available -- mine is about 6GB, because I used an 8GB card to begin with....

I made a text file, named it "testFile" and opened it in my node.js program using the path "/Galileo/testFile".

This space is not available to the XDK, as far as I know -- I think that is what the FAT32 partition is for. ;-)

0 Kudos
Highlighted
New Contributor II
25 Views

Is this the steps I need to take (I now have a second SD card with a fresh image)?

fdisk n

How do I write it to the disk?

/sbin/reboot

mke2fs -j /dev/mmcblk0p3

/sbin/reboot

edit /etc/fstab

 

/dev/mmcblk0p3 /Galileo auto defaults 0 2

/sbin/reboot

My main goal is to install scipy. Will there be enough free space now?

0 Kudos