Clear eMMC on SG-2440 with SSD installed
-
if your device came with factory installed pfSense, eMMC is already clear, pfSense is installed on SSD.
If you wish to clean device it's quite simle
boot pfsense installer from usb stick
and install (it will install on ssd by default)reboot
enable ssh on new instalation
log in via ssh
shellverify if there are partitions on eMMC:
gpart list da0
if you get an error like:
gpart: No such geom: da0.
mean you havve clean eMMC , no need any actions.
otherwise run:
gpart delete -i 3 da0
gpart delete -i 2 da0
gpart delete -i 1 da0
gpart destroy -F da0reboot
now you have fresh install of pfsense on ssd , and totally clean emmc
-
Thanks for the reply.
I'm not sure if SSD was factory or added so this is helpful.
pfSense is currently installed, though my intention is to do a fresh install. I assume I can just pick up from the ssh steps in your instructions? However, I'm not sure what you mean by "enable ssh" and "log in via ssh". I can go through the serial console or from the web GUI, can you be a little more specific please?
Thanks again,
Adam -
if your device came with factory installed pfSense, eMMC is already clear, pfSense is installed on SSD.
If you wish to clean device it's quite simle
boot pfsense installer from usb stick
and install (it will install on ssd by default)reboot
enable ssh on new instalation
log in via ssh
shellverify if there are partitions on eMMC:
gpart list da0
if you get an error like:
gpart: No such geom: da0.
mean you havve clean eMMC , no need any actions.
otherwise run:
gpart delete -i 3 da0
gpart delete -i 2 da0
gpart delete -i 1 da0
gpart destroy -F da0reboot
now you have fresh install of pfsense on ssd , and totally clean emmc
I wasn't sure about the SSH (still not), so I logged in through the web GUI and ran the commands through Diagnostics>Command Prompt in the Execute Shell Command section.
gpart list da0 = listed a bunch of disk information
gpart delete -i 3 da0 = did not find anything
gpart delete -i 2 da0 = did not find anything
gpart delete -i 1 da0 = deleted successful
gpart destroy -F da0 = destroyed successfulThen I ran gpart list da0 again and received gpart: No such geom: da0. back as a reply.
So now my question is, if running gpart list da0 and receiving gpart: No such geom: da0. as a reply is a verification that the eMMC is wiped clean?
Thanks again,
Adam
-
You can certainly use gpart to work with partitions but if you want to ensure a drive is completely wiped, the most certain way is with dd.
dd if=/dev/zero of=/dev/da0 bs=1m
-
You can certainly use gpart to work with partitions but if you want to ensure a drive is completely wiped, the most certain way is with dd.
dd if=/dev/zero of=/dev/da0 bs=1m
Thank you!
Can I run this from the GUI command prompt execute shell?
What should I see for a response and/or how do I verify it is wiped?
Thanks again,
Adam -
I wouldn't run it from the GUI, run it from a shell prompt over ssh or the console.
At the end it will output the total amount written. If it doesn't show any errors and the total is about the same size as the disk, then it worked.
-
Excellent- thank you!
-
Excellent- thank you!
Finally got around to trying this from console>shell
The response I received is
dd: /dev/da0: Operation not supported
I don't know anything about this command to know what might be wrong or why it might have given me this message.
Help?
Thanks!
-
Excellent- thank you!
Finally got around to trying this from console>shell
The response I received is
dd: /dev/da0: Operation not supported
I don't know anything about this command to know what might be wrong or why it might have given me this message.
Help?
Thanks!
did you reboot after gpart destroy?
-
Excellent- thank you!
Finally got around to trying this from console>shell
The response I received is
dd: /dev/da0: Operation not supported
I don't know anything about this command to know what might be wrong or why it might have given me this message.
Help?
Thanks!
did you reboot after gpart destroy?
I'm 99.9% sure that I did but it's been several days do I really don't remember. Just for clarification the first set of commands suggested in here I followed but per Jimp's suggestion I wanted to try another and that's where I ran into potential trouble. I really don't know anything about these commands. Maybe the eMMC is already cleared and just a command to view free space would be all that I need now? I just wanted to clear it so it's just like it left the factory is all.
-
Ok, so I made a bonehead move and realized I was actually into the console on the wrong device (more than one connected to this PC so I can play with them). Anyway, I got into the correct one and re-ran the commands. Same results on the gpart commands. When using dd I was finally rewarded with:
[2.4.0-RELEASE][root@pfSense.localdomain]/root: dd if=/dev/zero of=/dev/da0 bs=1m
dd: /dev/da0: end of device
3649+0 records in
3648+0 records out
3825205248 bytes transferred in 310.579761 secs (12316338 bytes/sec)
[2.4.0-RELEASE][root@pfSense.localdomain]/root:Total ends up pretty close to 4gb. I would say that is a success!
Thank you!
Adam