tedmar
Posts: 2
Joined: Tue Jul 17, 2012 7:17 pm

Resizing raspbian

Tue Jul 17, 2012 10:05 pm

I am new with Raspberry Pi (I received my RPI today) and I tried Raspbian and it works ok.
The problem is that I am using an 8 GByte SD card and I want to resize Raspbian, so to use all the SD space.
The problem is that the swap partition is not at end; here is the print out of parted

Number Start End Size Type File system Flags
1 1049kB 67.1MB 66.1MB primary fat32
2 67.1MB 336MB 268MB primary linux-swap(v1)
3 336MB 3901MB 3565MB primary ext4

Questions:
1.- Must the swap file be at the end?
2.- If the swap file must be at end, then I must erase the swap file, resize the ext4 partition and create the swap file at the end?
2.- 256 MByte of swap file is enough?
3.- I saw that the partitions must be at 4 MByte boundaries. Is that true?

Thank you
Regards

dukla2000
Posts: 190
Joined: Tue Jan 10, 2012 12:02 am
Location: Reading.UK.EU

Re: Resizing raspbian

Tue Jul 17, 2012 10:23 pm

tedmar wrote:I am new with Raspberry Pi (I received my RPI today) and I tried Raspbian and it works ok.
Welcome to the forums - Raspbian is a good choice!
tedmar wrote:1.- Must the swap file be at the end?
No
tedmar wrote:2.- 256 MByte of swap file is enough?
Probably - you can always change it later if you decide differently.
tedmar wrote:3.- I saw that the partitions must be at 4 MByte boundaries. Is that true?
Not technically essential but is most likely to give you better performance.

However, if you try the soon to be announced foundation flavour of Raspbian (see this thread), then during the initial boot the setup application has an option to allow you to resize your card and it does it all automatically for you (on the second boot).
Daily driver: Pi3B, 64GB Samsung Evo+ @100MHz, DVB-T, onboard WiFi for internet, BT/USB dongle for KB/mouse, 250GB HDD via USB for media, Raspbian Jessie Lite with Openbox desktop.
Museum: Pi B

User avatar
joan
Posts: 14196
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Resizing raspbian

Tue Jul 17, 2012 10:24 pm

1.- Must the swap file be at the end?
No

2.- If the swap file must be at end, then I must erase the swap file, resize the ext4 partition and create the swap file at the end?
N/A

2.- 256 MByte of swap file is enough?
Don't know. I deleted the swap partition. It's not used by the default Debian squeeze distribution (commented out in /etc/fstab).

3.- I saw that the partitions must be at 4 MByte boundaries. Is that true?
No idea.

asb
Forum Moderator
Forum Moderator
Posts: 853
Joined: Fri Sep 16, 2011 7:16 pm
Contact: Website

Re: Resizing raspbian

Tue Jul 17, 2012 10:25 pm

Partitions don't need to be aligned on 4MiB boundaries, but it's better if they are because that is a multiple of the erase block size on most SD cards. See e.g. http://lwn.net/Articles/428584/

Return to “Raspbian”