Formatting SD Card creates two partitions


#1

What is the problem?
I've formatted my SD card as FAT32 using Windows Disk Management and placed the OctoPi image on it via Etcher. When it's done I have two drive letters assigned to the same SD card. When I look at it in Disk Management , it shows three partitions: The primary as FAT32, 43 MB, the second at 1.97 GB (Healthy, primary partition) and the third, 27.70 GB, unallocated. Should I have on one partition that spans the entire SD? Will I be able to access the rest of the SD?

What did you already try to solve it?
Reformatted multiple times.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)
SanDisk Ultra 32 GB
Disk image: 2018-04-18-octopi-stretch-lite-0.15.1


#2

As far as I remeber the actual version of octopi will expand the file system on first startup.
If not so you can ssh into the runing octo pi, there is a option in raspi-config where you can expand the file system.


#3

As far as I understand it... Only been messing around with mine for the past few days myself.

Once you've placed the octopi image onto the sdcard and fired it up in the pi... octopi will automatically expand the file system to make use of all the available disk.

Are you following the how2 on the download page?

Which should leave you with two partitions...

  1. approx 43mb
  2. The rest of the available disk as the second

#4

There is no need to format the SD card before installing OctoPi.
I install the OctoPi with Win32DiskImager to the fresh SD card and insert it to the RasPi.
Installing a disk image to a medium (in this case the SD card) deletes all formatting anyhow.
After startup I login via SSH to the RasPi and expand the disk structure within raspi-config.
There you also can set your WiFi parameters, and can switch on or off the RasPi camera.
After that settings I go to the web front end and set up OctoPrint


#5

GParted USB stick for Windows. Dunno bout that techie stuff Ewald just went through but I format and partition only with me stick. 8))


#6

@3l3phant: Just a note why you got 3 partitions after installing OctoPi:

  • Linux systems always need a boot partition to get the hardware running. This is the 43 MB fat partition.
  • The Image of the OctoPrint server stuff is about 1.97GB (Ext4 format) .
  • The rest is the free space on your SD. For this partition is not allocated, you do not see it within file managers. It can only be seen from disk managers.

Creating a disk image is not just copying files. It is copying disk sectors one by one with all what is inside, inclusive the partitioning and formatting information and the directory structure.

Writing a disk image does the reverse. It overwrites all sectors, including your partitioning and formatting you have done before. That is the reason, that the boot sector is fat32 and the main partition (rootfs) is Linux Ext4.

More info.

@chillysmoks: You may work different with USB sticks, but the question was about the partitions on the SD card to work with a RasPi as an OctoPrint server.


#7

I found your problem.

Follow the instructions -> the official instructions. Use something like Etcher to burn the entire image to the microSD at once.

If you want to use something other than Etcher, then the official Windows version of the instructions are here.

Nowhere in any of these does it say "format ..."


#8

I don't know why but a lot of guides / tutorials I see for burning SD images tell you to format the SD card first. I reckon it's a NOOBS thing, which DOES require a fat formatted SD card to work, and people just sort of assume every other raspberry pi image needs it too.


#9

Thank you all so much for the help! Really excited to get the project going :slight_smile: Off to the SD card :smiley:


#10

Thanks @OutsourcedGuru - Etcher worked (and looks like an application to keep around). It looks like it took care of all of the stuff I needed to get the image on the SD. Time to fire up the Pi :slight_smile:


#11

Don't forget to touch an ssh file if you intend to remote into it.


#12

Awesome. Will do! Trying to find one of my monitors with an HDMI connection (or an adapter in the boxes of cables I have lying around).


#13

You'd be surprised at the number of microSD images I have. I had to write a database lookup website and a labeling system to keep track of them all.


#14

isn't that file already there by default for octopi images?


#15

It probably was but after some recent version, by default it's NOT there anymore.


#16

Just to close the loop, all of the recommendations about formatting were correct. After using Etcher to put the image on the SD and then editing the network-connection file, the first time the RP booted it expanded the disk to cover the entire SD. Connected the Pi to the printer and (after some more tweaking) it sees the Pi and vice versa ... Now I just need to figure out what to do with it :slight_smile:

Thanks again to everyone for all of the awesome help!