I had linspire on a hard drive. I partitioned it, formated it, and it boots with "grub loading stage1.5. grub loading, please wait. error 17". How do I repair this?

Dani AI

Generated

GRUB error 17 is the legacy GRUB message for "cannot mount selected partition" — most often caused when GRUB's boot code expects a partition layout that was changed after installation. That fits ' observation: the MBR/boot code was left in place while the partitions were altered. As warned, overwriting sector 0 will remove the bootloader and (depending on method) the partition table and data.

Three practical approaches depending on the goal (drive kept as external backup, or made completely blank):

  • Non‑destructive and simplest: prevent the system from trying to boot from that disk (change BIOS/UEFI boot order or unplug the drive). This avoids any risk to other disks.

  • Remove only the bootloader while preserving the partition table: identify the correct device node first, unmount any partitions, then zero the MBR boot code area (the first 446 bytes). This removes GRUB but keeps the partition table intact:

sudo lsblk -o NAME,SIZE,FSTYPE,TYPE,MOUNTPOINT
sudo fdisk -l /dev/sdX

# remove only the MBR boot code, preserving partition entries
sudo dd if=/dev/zero of=/dev/sdX bs=446 count=1
  • If the drive is to be reused as a fresh backup disk, recreate a clean partition table and format it (example using parted + ext4):
sudo parted /dev/sdX mklabel msdos
sudo parted /dev/sdX mkpart primary ext4 1MiB 100%
sudo mkfs.ext4 /dev/sdX1

Cautions: always confirm the correct device node before running destructive commands — a mistake will wipe the system disk. Unmount any mounted partitions first and verify with lsblk or fdisk -l. If the intent is to make the disk bootable again rather than erase GRUB, a live CD and a proper grub-install/chroot sequence is the safer fix.

Recommended Answers

All 3 Replies

Don't bother. The next operating system that you install on the hard drive will almost certainly wipe out the MBR that contains GRUB you're noticing right now.

If you really must do it, boot up the Linspire CD, obtain a root prompt, and enter the following:

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

(replace /dev/sda with the device of your hard drive, if necessary)

Warning: this will wipe out your entire MBR -- this includes both GRUB AND all your partitions on the drive. Only execute this command if there is nothing of importance on the hard drive.

John is right, the short of it is that you left the MBR intact but changed the partition scheme so the original boot record isn't valid. Take his steps to correct the current boot record or just put a new one on it.

thanks john. I will give this a try and get back to you. I was formatting this HD to use in a external backup and did not intend installing an O/S.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.