Why won't my computer let me defragment C drive?

Computer refuses to let us erase the hard drive

  • How can I wipe a hard drive if I can't boot from CD and there is no floppy drive? We want to install winXP on a machine with Ubuntu (eventual dual-boot). My friend's computer is not working. He installed ubuntu 6.10, and now it won't boot from CD. We have tried doing things to the grub, to no avail. We can't tell if the cdrom is hda or hdb or hd5hkjhjth. We can provide more details if this ends up being the best way to fix the problem. There's another post on ask.mf, which explains lots of scary ways of accessing the hard drive through the internet or via a usb. Should we try them? Or should we buy a floppy drive for $5? Or should we take the hard drive out of his computer, put it in mine, and wipe it clean, then put it back and see if the CDrom will be read? We are at wit's end. Please help, ObiWans.

  • Answer:

    Booting from CD is a BIOS thing, not a Ubuntu thing. Are you sure there isn't a "hit any key to boot from CD" message during boot (but before Linux comes up) that you might be missing? Alternatively you can go into BIOS and set the CD-Rom to be the first boot device, after which it should try to boot from it every time no matter what.

billtron at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

In the first seconds after you turn on your PC, you will see a message that says something like: "Press <DEL> to Enter BIOS Setup." Do this. You will get into your BIOS. Explore the options (but don't mess around too much) until you find something that says: "Change boot device order" or "Select boot device" Muck about with this. Set it so it boots from CD-ROM as the first boot device. Save and exit from your BIOS setup. Reboot your PC. It should now boot from the CD-ROM. Once you've achieved what you want to achieve, remember to go back into your BIOS and change it back, so it boots from your harddrive as default. If this doesn't work, then your CD-ROM drive is probably broken.

Jimbob

(The other reason this might not work, by the way, is if the CD you are trying to boot from is scratched / corrupted. Although in this case you should see a "Booting from CDROM..." message come up before it fails.)

Jimbob

if there's some menu that I can access before grub, I haven't been able to find it. When I get to grub, there is no boot to CD option. I figure it would be there if there was one. Am I wrong? The CD-Rom drive works, because we can access information on discs from within Ubuntu.

billtron

Sometimes you have to hit a function key during a brief window during bootup to get into the BIOS. There will be a message on the screen saying that, but depending on the machine and the settings, it may only be present for a fraction of a second. (On some computers, it's F10.) I don't know what "grub" is, but if it's part of Ubuntu, then by that point you've already missed the BIOS.

Steven C. Den Beste

So what you're saying is, when you turn on your PC you see nothing on your screen..totally blank..until the GRUB menu appears asking which OS you want to boot? Have you tried repeatedly banging on the [delete] or [F1] keys after you press the power on button? If all else fails, you might need to find your motherboard's manual. All modern PCs let you access your BIOS settings, and it's the first thing that happens after you press the power on button.

Jimbob

others are correct. if you do not see BIOS messages before you see grub, something is amiss. google for your computer model and look for the BIOS key sequence, common options as mentioned before are 'delete', 'F1', 'F10', 'F11', 'F12', 'F2'. reboot and bang on these keys before grub is loaded and you might find yourself in the BIOS configuration where you can specify that you wish to boot from CD-ROM first. if all else fails, there are a few options... google for 'grub boot CD' and you'll find a few things that you can download and install on the *nix side that will give grub a 'boot from CD' option. failing that, google for 'grub freedos' and you will find methods that let you boot to a FreeDOS floppy disk image from which you can pretend that you're on an old machine that boots from a floppy. failing that, there's one final dangerous option... boot into the *nix that is installed, do a 'dd if=/dev/zero of=/dev/hda bs=512 count=1', where you replace hda with your actual hard drive info.... (as root type: 'mount' and look for a /dev/??? appropriate to your hard drive, probably it will be either "hda" or "sda"). this will *nuke* your boot block on the hard drive, and the machine should then look to the next device (hopefully your CD-ROM) for something to boot from. this last option is *extreemly* dangerous, but should force your machine to boot from the CD-ROM drive.

zengargoyle

Everything folks have told you is correct. I just thought I'd add some explanation. The boot process starts in the computer's BIOS; this is built-in to the machine, and doesn't rely on any operating system. The more recent your BIOS, the more devices you'll be able to boot from; the newest ones can boot from USB drives and network connections. But the 'boot' process is fairly simple... start up devices, load a few hundred bytes from the first one on the priority list, and transfer control to it. That's all. That few hundred bytes is your bootloader. That's 'grub', or 'lilo' on some versions of Linux, or NTLDR if you're running Windows. Basically, once you get to the bootloader, it's too late to boot from CD... you already booted, more or less! If you absolutely can't get the BIOS working, some bootloaders are smart enough to be able to load others. So you might be able to tell grub to 'chain' to another bootloader on another device. This is enormously harder than just booting directly, so you want to explore that option later. One thought... obviously the machine did boot from CD long enough to get Ubuntu going. Many BIOSes will try the hard drive first, and then fall back to CD... as soon as it sees a valid bootsector on the drive, it stops trying the CD anymore. As zengargoyle is saying, you might be able to just wipe your existing drive. If you don't care about the data that's on it now (and THINK ABOUT THIS), just boot up Ubuntu normally. Once you're up, open a terminal window and type 'mount'. Look through the list of mounted filesystems. You will have at least a "/" filesystem, the root. Look to see what device it's on.... for instance, you might see: /dev/sda5 on / type ext3 (rw,noatime,errors=remount-ro) This example line shows you that the device "/dev/sda5" is loaded on "/". This means that sda is most likely the boot drive. Your machine might be hda or hdc.... you're interested in the first three letters of your / partition. Once you know that, you can wipe the drive this way: dd if=/dev/zero of=/dev/sda bs=512 (substitute your correct device for 'sda') This will destroy all data on the drive. Make sure you disconnect any drives with data you care about before doing this. Let this run about ten seconds, hit control-c to break it, give it another ten seconds to write the data to the drive, and then hit the power. Don't bother shutting down, as you've wiped the start of the drive anyway. No sense worrying about the integrity of the filesystem(s) you've just destroyed. :) You may then be able to boot from your Windows CD. But this won't totally solve the problem, in that once you get it going, you'll no longer be able to boot into Ubuntu for reinstallation as a dual-boot.... but it will at least get you back where you started. In theory. If you've had a hardware failure, you may end up with a machine that won't boot at all, so think about this before doing it. Note: after rereading, I see zengargoyle uses 'count=1' in his line. That means to write just one block. This is the bootsector. I'm not sure, anymore, what happens if you wipe just that one sector. My approach will absolutely wipe the drive completely; his may wipe only the bootsector, and preserve the data on the drive. But without experimenting, I wouldn't want to make that promise. My method is the nuke-from-orbit option, his is the surgical strike. :)

Malor

Malor, if you want to do a fast nuke-from-orbit, use bs=1M instead of bs=512.

flabdablet

During the ubuntu install your friend probably messed around with the bios and changed the boot order. You want to make the boot order cd drive then hard drive. Then you'll see a short 'press any key to boot from CD' when you leave a bootable CD in the drive before grub starts up. Feel free to take the hard drive out while doing this. Grub lives on the hard disk, not on the computer someplace.

damn dirty ape

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.