Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parted: invalid token: primary #28

Closed
DrBakterius opened this issue Nov 24, 2017 · 2 comments
Closed

parted: invalid token: primary #28

DrBakterius opened this issue Nov 24, 2017 · 2 comments

Comments

@DrBakterius
Copy link

I only back up a partition from an SSD (sda2) to an img file on a FAT32 partition with 'dd if=/dev/sda2 of=/media/fat32/file.img bs=1M'. This works flawlessly.

Then I start: 'sudo /usr/local/bin/pishrink. sh /media/fat32/file.img'

There I get the following output until the script gets stuck with the error:

Creating new /etc/rc.local
e2fsck 1.43.3 (04-Sep-2016)
Durchgang 1: Inodes, Blöcke und Größen werden geprüft
Durchgang 2: Verzeichnisstruktur wird geprüft
Durchgang 3: Verzeichnisverknüpfungen werden geprüft
Durchgang 4: Referenzzähler werden überprüft
Durchgang 5: Zusammengefasste Gruppeninformation wird geprüft
/dev/loop0: 76785/229440 Dateien (0.3% nicht zusammenhängend), 587124/971264 Blöcke
resize2fs 1.43.3 (04-Sep-2016)
resize2fs 1.43.3 (04-Sep-2016)
Die Größe des Dateisystems auf /dev/loop0 wird auf 754009 (4k) Blöcke geändert.
Start von Durchgang 2 (max = 46859)
Blöcke werden verschoben     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Start von Durchgang 3 (max = 30)
Die Inode-Tabelle wird gelesenXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Das Dateisystem auf /dev/loop0 is nun 753664 (4k) Blöcke lang.

parted: invalid token: primary

What's wrong here?

@Drewsif
Copy link
Owner

Drewsif commented Dec 2, 2017

PiShrink expects a full disk image, not just a partition. Try making your image with dd if=/dev/sda of=/media/fat32/file.img bs=1M and see if that works

@Drewsif Drewsif closed this as completed Dec 2, 2017
@DrBakterius
Copy link
Author

Too bad, because I can't use pishrink with it. Finally, I want to make the backup to the same SSD in a separate partition. So only the partitions 'boot' and 'system'.

pishrink also failed when I backed up only the blocks of the first two partitions from the SSD.

Can't you change this to shrink images of individual partitions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants