Cleaning/Formatting used computer?

Discussion in 'hardware' started by roark37, Jun 3, 2016.

  1. roark37

    roark37 Registered Member

    Joined:
    May 23, 2006
    Posts:
    193
    Hi,

    I am buying a cheap used desktop on craigslist and was wondering about cleaning it up from any viruses/malware or even any illegal content that may be on it from prior owner(s). The pc comes with XP and I have no intention of ever even using XP and if I did I would not connect to internet with it as I am planning to install linux on it, likely starting with Lubuntu but quite likely trying others and maybe even something like Cloudready. If I install Lubuntu(or any other) and choose to use all the disk instead of partitioning my understanding is XP and entire disk will be completely written over. Is that true? And is that enough for reasonable safety in terms of wiping? Or are there things I should do to clean up in XP itself first? I was hoping one or more linux full installs would be enough to securely wipe all prior data but not sure? Would welcome any recommendations.


    Thanks.
     
  2. roger_m

    roger_m Registered Member

    Joined:
    Jan 25, 2009
    Posts:
    8,627
    You should have the option to erase the hard drive when you install Linux. This will wipe everything on the drive, and that is all you will need to do.
     
  3. Bill_Bright

    Bill_Bright Registered Member

    Joined:
    Jun 29, 2007
    Posts:
    4,041
    Location:
    Nebraska, USA
    Smart move! :) Not because you are installing Linux on it, but because XP is just too unsafe. And not just for the user but the rest of us. Compromised XP systems are often used to distribute spam and malware, or to participate as a zombie in a bot-army conducting DDoS attacks against others - without the user even knowing their XP system has been compromised. :(

    Just to clarify, erase (or delete) is not the same as "wipe". When you erase or delete files off a drive, the files remain behind and the storage spaces are just marked as available in the file tables. When you "wipe" a disk using a program like DBAN or CCleaner's Disk Wiper feature, you actually are over-writing every single storage sector with a bunch of random 1s and 0s, ensuring any residual magnetism representing previously stored data is obliterated. Wiping the drive is a step you should take when getting rid of old hard drives to ensure your personal data cannot be retrieved by the new owner.

    When you install Linux, you should have the option to "format" the drive(s). This is what you want to do. Use the "full" format option. This will ensure every storage sector is touched, configured for new data, and marked as free/available in the file tables. If there are already multiple partitions on the drive(s), you need to do a "full" format on every partition (or change/delete the partitions, then format them all). A full format will also check each sector on the disk for integrity. If the sector is found to be unreliable, it will be marked as "bad" in the file tables and not used to store your new data - a good thing.

    And yes, full formatting provides enough safety/security. There is no need to "wipe" a drive you are getting - a full format is enough.

    Alternatively, instead of doing this during your new OS install, you could remove the drives from this computer and temporarily attach them to another computer, then format them. That may actually be easier then during the Linux install. Just make sure this other computer's security is up to date and you attach them as "secondary" drives (not boot drive).

    I would also avoid temptation to see what is on those drives - just repartition, if necessary, and start formatting.
     
  4. roark37

    roark37 Registered Member

    Joined:
    May 23, 2006
    Posts:
    193
    Thanks for the replies but they have now raised further questions. I have only installed linux(lubuntu) once before and it was super easy and I set up a dual boot with XP. The steps I followed were to run live Lubuntu USB and once I confirmed hardware all working fine I hit install and a list of options came up one of which was dual boot which I chose. Then the only other question I remember answering was how much space to allocate to Lubuntu and that was it. Now on that list of choices that will pop up upon hitting install will full install with formatting entire disk be one of the options? And is there even any way to install fully without dual boot that would not format entire disk? I am hoping not so I can't accidentally choose that one. Also is it safe to run live Lubuntu USB with ethernet connected with XP still on it? I thought it was as I intended to test hardware live first. There is no risk when running live from the hard drive contents as I thought it does not even get touched, is that correct? Lastly, assuming I do successfully install linux completely wiping out XP as I intend, that will have no impact on the BIOS at all right? So even with linux on it I can still run live usb's of other distros if I choose? I thought so but just want to be sure.

    Thanks again for all your help.
     
  5. Bill_Bright

    Bill_Bright Registered Member

    Joined:
    Jun 29, 2007
    Posts:
    4,041
    Location:
    Nebraska, USA
    It has been so long since I installed Linux, I don't know when or how you may be prompted to format. And I suspect each flavor of Linux may do it differently anyway and I know I have not used lubuntu. I would just advise you very carefully watch each screen and DON'T automatically accept any default setting. This may mean you have to click on "Back" at each prompt to see any format and/or partitioning options. Or, as mentioned earlier, pull the drive(s) from this machine and install them in an enclosure attached to another computer, or as secondary (not boot) drives in another machine, then partition and format. Then return them to the new computer and install Linux.

    Not sure what you mean here but my concern is this is a used computer you are buying off Craigslist. Therefore, you cannot trust anything about it! Even if you personally know and fully believe the seller is trustworthy, you cannot assume he is a security expert and those drives have not been compromised without his knowledge.

    And not, installing Linux will have no impact on the BIOS.
     
  6. roark37

    roark37 Registered Member

    Joined:
    May 23, 2006
    Posts:
    193
    I did not phrase it correctly but I meant is it safe to run live linux usb before I have formatted/erased XP? I thought it would be okay as running live I did not think any of the XP stuff or even the hard drive it is on comes into play. Thanks again.
     
  7. Bill_Bright

    Bill_Bright Registered Member

    Joined:
    Jun 29, 2007
    Posts:
    4,041
    Location:
    Nebraska, USA
    Yes. That is safe - as long as you don't open an infected file on the hard drive.
     
  8. zapjb

    zapjb Registered Member

    Joined:
    Nov 15, 2005
    Posts:
    5,554
    Location:
    USA still the best. But barely.
    If t'were me I'd just install any Linux distro choosing to take over the whole disk. Then if didn't please me I'd be positive I'm safe running any LiveCD.
     
  9. Amanda

    Amanda Registered Member

    Joined:
    Aug 8, 2013
    Posts:
    2,115
    Location:
    Brasil
    Not at all. In fact, I don't even think the MBR will be touched, only the partition table part. So if there's a virus on the Master Boot portion of the MBR, it could re-infect the computer (assuming it's a very advanced malware).

    Yes. There's a very simple command to erase the MBR and therefore "Killing" all viruses that might exist on the disk surface.

    First, unplug all other HD's and leave only the HD that has XP on it. Then do this command (as root):

    dd if=/dev/zero of=/dev/sda bs=512 count=2

    Highly unlikely as it can take hours to wipe a relatively big HD. No regular home user wants that by default.
     
  10. oliverjia

    oliverjia Registered Member

    Joined:
    Jul 21, 2005
    Posts:
    1,926
    Alternatively, use a Windows 10 boot USB, choose repair --> advanced --> cmd, enter diskpart, and issue a "clean" command to the disk with XP, then you can effectively wipe out the MBR. If you want to wipe the whole drive, which could take a long time to do so, use "clean all" command.
     
  11. SirDrexl

    SirDrexl Registered Member

    Joined:
    Apr 14, 2012
    Posts:
    556
    Location:
    USA
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.