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

Option to wipe data #2465

Closed
afriza opened this issue Sep 3, 2018 · 10 comments
Closed

Option to wipe data #2465

afriza opened this issue Sep 3, 2018 · 10 comments

Comments

@afriza
Copy link

afriza commented Sep 3, 2018

Steps:

  • Flash gzip file to sdcard
  • Insert sdcard to Raspberry Pi 3 B+, then set password and do some configurations
  • Shutdown RPi, and reflash the same gzip

Results

The password (SSH and WebUI login) remain there along with the configurations. Flashing the sdcard doesn't wipe data/configurations.

Expected

There is an option to wipe/erase the data and configuration when flashing.

Workaround

As a workaround for the current behavior, I have to flash another image (e.g. raspbian lite) file before flashing the gzip file again.

@lurch
Copy link
Contributor

lurch commented Sep 3, 2018

Sounds like that's probably an "issue" with the image you're flashing. I see that it mentions "sysupgrade" in the filename, so maybe that image is supposed to leave passwords and configurations intact?

Or perhaps this is a duplicate of #273 ?

@afriza
Copy link
Author

afriza commented Sep 4, 2018

I'm not sure if the image is supposed to behave that way, but even after:

  • initial flashing of image
  • erasing/formatting the sdcard using Disk Utility (under macOS)
  • flashing the image again
    The passwords and configuration are still there.

Therefore I don't think it is duplicate of #273 since #273 erases Master Boot Record only.

@lurch
Copy link
Contributor

lurch commented Sep 4, 2018

I don't have a Mac myself, but does Disk Utility have a "full format" / "full erase" option?

@afriza
Copy link
Author

afriza commented Sep 4, 2018

I don't see any option related to "full erase/format" during erase

disk utility erase

What is supposed to be different when using "full format/erase" ?

@lurch
Copy link
Contributor

lurch commented Sep 4, 2018

A "quick format" (which is what it appears to be doing) will only overwrite the metadata at the start of the disk, whereas a "full format" would overwrite the entire contents of the disk (and hence be much slower).

I just did a quick search and found https://www.howtogeek.com/179284/how-to-securely-wipe-a-hard-drive-on-your-mac/

@afriza
Copy link
Author

afriza commented Sep 6, 2018

Hi @lurch, thanks for the link. However it seems that the Security Options... is not available for flash-based storage including sdcard.

@jhermsmeier
Copy link
Contributor

This is odd – reflashing the same image that doesn't contain any config should still reset the filesystem's allocation tables, as well as overwrite the particular config files, and those values shouldn't be there anymore.

then set password and do some configurations

@afriza can you describe which configurations etc. exactly you've set there? I'd like to see if I can reproduce this.

@lurch
Copy link
Contributor

lurch commented Sep 6, 2018

@jhermsmeier as the image is labelled "sysupgrade" I was guessing that maybe it's small enough to only overwrite the boot / OS partitions at the start of the disk, and leaves a settings partition towards the end of the disk untouched? (which would explain the behaviour described here).
But that's a total guess so I might be totally wrong 😆

@jhermsmeier
Copy link
Contributor

I've had a look at the images; the sysupgrade image has a FAT16 & squashfs partition, the others seems to have two squashfs partitions. Since squashfs is read-only by design (unless unsquashed & resquashed), I suspect there's something else going on here, but I'd need more info about the process steps, devices and all to be able to tell.

@lurch
Copy link
Contributor

lurch commented Sep 7, 2018

AFAIK the Raspberry Pis are only able to load their firmware (bootcode.bin, start.elf etc.) from a FAT16 / FAT32 partition, so a disk image that only has squashfs partitions indeed sounds very strange 🤷‍♂️

@jviotti jviotti closed this as completed Oct 15, 2018
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

4 participants