Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm currently running Ubuntu 12.04 and want to completely format my laptop so I can install Windows 7 (replace Ubuntu).

When I put in my bootable USB with the OS it just shows a black screen with a white blinking cursor on the top left corner. I wait for hours (to be specific 5 whole hours) waiting for something to happen but I get nothing, so I pull out the USB and my Ubuntu 12.04 loads up.

Repeated this several times with putting different boot priority options on top-est that relate to USB but the results are same. I go and visit some sites on the net like this http://www.techspot.com/community/topics/cant-replace-ubuntu-with-windows.175716/ that say I have to zero out my hard drive.

My question is how?

Note: Erasing out all my data is no problem cause I have nothing important to backup.

If I have to lose my primary OS (Ubuntu 12.04) in the process I am ready to as my aim is just to install Windows 7 successfully. Please don't answer that there is something wrong with my USB or my USB reader/port/hardware or the content inside the USB cause they all works fine on my brothers PC as it boots up flawlessly.

share|improve this question
    
Look more likely that your computer is not booting from the USB correctly than a need to zero out the hard disk in it. Anyways the answer with the dd command should work out, just make sure you boot from a USB pen with Ubuntu or from the LiveCD. –  Bruno Pereira May 27 '12 at 23:02
    
@BrunoPereira I'm confused/lost cause what's running in my mind is that something is wrong with my BIOS but then the info on the net suggests that I do this :/ and in addition I will repeat 'I cannot boot form any external storage/media device what so ever!!!!' for your point in booting form "USB pen....or from the LiveCD". Thanks for your time and suggesting Andrejs Cainikovs answer, I'm gonna apply it as soon as he comments back ;) –  Mohd Arafat Hossain May 28 '12 at 7:20

3 Answers 3

up vote 7 down vote accepted

Zero-out drive on Linux is done via:

dd if=/dev/zero of=/dev/sdX

If you're not aware on how to do this, press Ctrl+Alt+T from Ubuntu, and type following:

sudo dd if=/dev/zero of=/dev/sda
share|improve this answer
    
I see when I type in 'sudo fdisk -l' that there is dev/sda1, dev/sda2, dev/sda5 so should I do 'sudo dd if=/dev/zero of=/dev/sda1 then with sda2 and later sda5 OR just =/dev/sda :/? –  Mohd Arafat Hossain May 27 '12 at 20:32
1  
@MohdArafatHossain No need, of=/dev/sda will make sure the all disk is filled with zeros no matter what partitions are in it. Notice that you should not be doing it from your boot disk, if you boot from sda and you want to erase sda you better boot from a LiveCD to make sure the process goes to the end. –  Bruno Pereira May 27 '12 at 22:57
    
I'm sorry but when I put in my LiveCD and put CD/DVD as my first priority it doesn't boot from it, the result is the same as when I put in my bootable USB (black screen with white blinking cursor). But when I put the CD in while running Ubuntu I can see its contents/files like when reading from any external storage devices. Should I go for it anyway (without using LiveCD)? OR will there be some problem later on? and I would like to mention that this too boots up fine in my brother's PC.... –  Mohd Arafat Hossain May 28 '12 at 6:53

It is really questionable whether this is an Ubuntu question at all.

If you have set the BIOS of your computer to boot from the USB first you should have no trouble. It should boot entirely from the USB stick and it should not matter how the Hard Drive is formatted.

Windows will format the Hard Disk and anything there will be overwritten.

You should not have to zero out the Hard Drive at all.

share|improve this answer
1  
USB is set as my first priority but it doesn't boot. There are numerous articles that I have read on the net that states that after Windows 7 is replaced with Ubuntu 12.04 the problem with a white blinking cursor with a black screen instead of booting happens that can be solved by zeroing out the drive using the currently running OS which happens to be Ubuntu 12.04 so I asked. –  Mohd Arafat Hossain May 27 '12 at 12:51
2  
Indeed, asking how use Ubuntu to zero out a drive is definitely an Ubuntu question. –  Eliah Kagan May 27 '12 at 23:05

Maybe I can add a little insight here. When booting with a Windows CD, the Windows installer program is kind of stupid and worthless as most Microsoft products are. What can end up happening is the operating system of the Windows installer CD will hand and die. Mostly because it doesn't know what to do with a hard drive that is not zero'd, or doesn't have Windows. It doesn't give an error, just hangs.

I happen to have a perfect example right in front of me right now. Even when I boot with an Ubuntu CD, on this ASUS computer, the OS, begins to start, then it touches the hard drive, as any good OS should do, in order to see what resources are present.

On this particular computer, (and the problem is with the BIOS of the particular machine) it appears to hang, for almost 20 minutes, for each touch of the hard drive. So booting a live CD on this computer can take almost 20 minutes. Just in case, I'd check for a BIOS upgrade on your system, it will prolly fix the USB booting issues and maybe the timeout routine for no hard drive access, although that's more unlikely.

If you can boot from the live CD, just let it sit. Shouldn't take more than an hour, if you have the same booting flaw as this machine. Once it comes up, do the HD zero out, in a pinch though, boot with your Ubuntu on HD, and zero it out anyhow. It should zero out enough before the OS crashes to allow your worthless Windows install CD to work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.