Assuming you are using Debian.
The Short Version:
Backup your system
Remove the main and swap partitions (leaving the boot partition alone)
Recreate the main partition to utilize the remaining disk space (excluding the boot partiton). Make sure to reuse the same start sector as the original root partition.
reboot the system
resize the new boot root ...
Using the Debian-Wheezy Beta image, there is a configuration utility built in that makes this easy:
There is a utility called raspi-config. This runs on first boot if you're connected directly to the RPi. If you're over SSH you can run it manually using $ sudo raspi-config. (I think you can re-run the tool manually at any time).
The second option on the ...
I finally found a resource that is explaining my question.
Yes, truncating is possible!
Summary of the process:
Extracting the partition information from the image using fdisk:
$ fdisk -lu image.img
Disk image.img: 4096 MB, 4096000000 bytes, 8000000 sectors
Units = sectors of 1 * 512 = 512 ...
The image creates 2 disk partitions SDB1 and SDB2 in the image above. SDB1 is formatted as a fat16 filesystem, this partition is the only one seen by Windows and hence the small amount of free space it reports. Gparted sees both the fat formatted partition and the ext4 formatted partition.
By default the image does not use all of the space available on ...
If you are not very comfortable working on the command line, like in Steve Robillards excellent answer, there are some GUI applications available. In particular gparted works very well.
I think it's installed by default on a Ubuntu LiveCD but not on an installed system. There is of course an easy fix for this: apt-get install gparted. You can't do this on ...
Found this article -> Mount a Raspberry Pi SD card on a Mac (read-only) with osxfuse and ext4fuse, It worked like a charm.
Here is the commands I ran om my mac:
brew cask install osxfuse
brew install ext4fuse
sudo mkdir /Volumes/rpi
sudo ext4fuse /dev/disk2s2 /Volumes/rpi -o allow_other
sudo cp /Volumes/rpi/home/pi/Pictures/* /Users/me/work/raspi/Pix/
Type n to create a new partition.
Type p to make a primary partition.
Next press enter when prompted for a partition number to choose the next available.
Press enter again to pick the next available sector to start the partition.
Press enter again to use all of the remaining disk space.
Type w to save the changes.
On Difference between UUID and PARTUUID
You can get a few hints about the difference between UUID and PARTUUID by specifying the -p option.
blkid -p /dev/sda1
or whatever device/partition you are looking at. You may have noticed that if there are multiple partitions on the same UUID device, the PARTUUID is mostly the same with the partition number ...
I think you should look into doing this so you can take and restore backups of your card from time to time. Once you get a second card and as long as you don't destroy the original one, it should be easy to experiment. And yes, it should work.
Some instructions on how to set up a card image can be found on the RPI wiki "easy SD card setup". There's also a ...
Here is a solution with netbooting using sytemd-networkd.
Network booting works only for the wired adapter. Booting over wireless LAN is not supported 1.
It is also important that there is already a working DHCP server on the local network.
We use RPi 3B+. It comes with "Improved PXE network and USB mass-storage booting" 2. So PXE booting will work out ...
If btrfs is compiled as a kernel module, then you need to create an initramfs to load the module at boot. On Raspian (and other debian derivatives), update-initramfs is the easiest method to do this.
If initramfs-tools is installed, then any time apt-get installs a new kernel, it should trigger update-initramfs automatically.
sudo apt-get update
There are a few things that you need to do to get this to work. First, after physically connecting the drive, run dmesg to see the name of the node in /dev. You should find something like this:
[ 5155.744879] usb-storage 1-1.4.3:1.0: USB Mass Storage device detected
[ 5155.753654] scsi host1: usb-storage 1-1.4.3:1.0
[ 5157.013418] scsi 1:0:0:0: Direct-...
This answer is not specific to the raspberry pi, but is general advice for remote administered servers.
ssh. Using secure shell is almost as good as being there.
serial console and out of band administration: if you screw up your network interface having a second way to login is a lifesaver. a simple way would be to have a Identical backup machine running ...
Make sure you have
in your local /etc/ssh/ssh_config
Now the problem is that when you sudo, you don't have the right credentials in .Xauthority. The -E option preserves your environment
$ sudo -E gparted
I know this is an old question, but I would like to show how to do this process on Mac, because it is not as easy: fdisk doesn't have the -l option, and truncate is not installed by default:
1. Step 1: Install truncate on Mac OS X:
You need MacPorts or Homebrew for this. I use MacPorts. If you don't have one of these, go ahead and install them first. Link ...
If the error can happen any time after the system started, you can use a watchdog timer and some boot script.
The principle of this method is that whenever the system reboots without properly shut down, it goes to the recovery partition.
You need to write a script that runs every time the system starts and properly shuts down. Change /boot/cmdline.txt to ...
You can pipe dd backups into gzip, as the blocks are 0 when unused they are highly compressible.
ssh email@example.com sudo dd bs=4M if=/dev/mmcblk0 | gzip -c > raspberry_dd_4M.img.gz
or from a linux card reader
dd if=/dev/sdc bs=4M | gzip > rasppi_4M.img.gz
and the obligatory recovery command
gunzip -dc /home/user/raspberry_dd_4M.img.gz | dd bs=4M ...
As explained here, the "Data Partition" option creates a buffer that is untouched when the OS is installed. Like any partition, it segregates memory so that if a OS is reinstalled to the SD card, it doesn't wipe out all the preexisting memory.
Data Partition - Add a 512mb data partition for data that will be kept safe during a re-instalation of an ...
You can do it all on the Pi if you have SSH or terminal access, below are some notes I made when I first did it, you shouldn't lose any data if you do it correctly but as always it pays to have a backup just in case :
At a terminal prompt (you may need to amend the partition names depending on your layout/requirements) N.B. the results in this example were ...
It is not possible, Unix like system relies on standards that are not implemented in FAT or NTFS. Your system need permissions, groups, symbolic links to work properly. Neither FAT nor NTFS can provide it.
Once an SD card starts producing errors I believe it is defunct. They generally use a methodology called wear levelling (apparently often via a 32-bit ARM microcontroller) to maximize their lifespan.1
This means the addresses the card exposes are virtual, they do not literally correspond to specific physical blocks; a consequence of wear levelling is that ...
After digging around some more.. I looked at the init_resize script and noticed that the disk id was being replaced in /etc/fstab.
Apparently, when a new partition is created, the disk id is changed, so creating a new image, creating the new partition, then:
fdisk -l /dev/sdd
Disk /dev/sdd: 62.9 GB, 62881005568 bytes
64 heads, 32 sectors/track, ...
You can put your filesystem on an external drive, there are instructions to use an external drive to boot your Pi. See https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/msd.md
Alternatively you can continue to boot from SD Card, and use external mounted storage. See https://www.raspberrypi.org/documentation/configuration/external-...
The e2fsprogs package can be installed on Windows (via cygwin) and Mac OS X (via MacPorts).
You can then use resize2fs as described in the linked wiki page.
I have not been able to resize the image on the SD card directly under Windows, however you can back up the linux partition to a file (as described in another question), run resize2fs on the file, then ...
I have a 500Gb HDD formatted with ext3. I've connected it to my RPi using a USB->SATA enclosure and everything works just fine. Using ArchLinuxARM though. So I don't think there are any limitations on disk size for RPi.
What's your dd command look like? What size is your SD card? I've created bootable 8Gb SD cards from all 3 packages on the RasPi site with no trouble using dd on a Ubuntu VM. I use the Copying an image to the SD card in Linux (command line) procedure outlined here. My dd command is (for example)
dd bs=4M if=~/2012-10-28-wheezy-raspbian.img of=/dev/sdd
Take a look at BerryBoot. It allows you to put multiple operating systems on an SD card and select between them at boot.
They have a good walkthrough on how to install BerryBoot and your operating systems here: BerryBoot Walkthrough.
First try to raw-copy the entirety of data on the card, byte by byte. You may even want to set the little lever on the card to read-only or lock or whatever it says
dd if=/dev/sdX of=~/backup.img
Where sdX is your card. It may also be sth. like mmblc or so.
Do NOT add a number behind X, so that (if any are still detected) all partitions are copied.