LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-21-2011, 04:24 PM   #1
nicolas_lz
LQ Newbie
 
Registered: Aug 2011
Distribution: Debian
Posts: 4

Rep: Reputation: Disabled
GRUB-PC installation error in a botched hard disk


Hello everyone!

I have a trouble when I try to install grub-pc in my hard disk, I get this error message:
Quote:
/usr/sbin/grub-setup: error: /dev/sda appears to contain a udf filesystem which isn't known to reserve space for DOS-style boot. Installing GRUB there could result in FILESYSTEM DESTRUCTION if valuable data is overwritten by grub-setup (--skip-fs-probe disables this check, use at your own risk).
/dev/sda is not an optical device, it is a Serial ATA hard disk. It happened after a huge mistake I made yesterday: I accidentally deleted the partition table of that HD filling with zeroes the first part of the disk. Yeah, using the "dd" command in the wrong device :P

Luckily, I recovered almost all of my partitions using TestDisk (http://www.cgsecurity.org/wiki/TestDisk), but since then I get the "udf filesystem" error when I try to install grub on it. I suppose there might be some zero-filled bits over there, and Grub didn't expect it.

I've tried with grub-pc versions 1.99~rc1-13ubuntu3 (Ubuntu 11.04) and 1.99-11 (Debian Unstable). I've got a x86-64 processor and a Western Digital WD2500AAJS-0 hard disk, 250GB.

Does anybody knows how to fix it?
Thanks in advance!

PD: I am using a Live CD with Xfce Desktop, and Thunar displays the partitions of the hard disk as "UDF volume"...

Last edited by nicolas_lz; 08-21-2011 at 05:08 PM.
 
Old 08-21-2011, 06:59 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 312Reputation: 312Reputation: 312Reputation: 312
I have not tried this, but it seems that it may work.
Quote:
Originally Posted by http://nitinpant.hubpages.com/hub/Repair-Partition-Table
All you have to do with Gparted to fix the broken partition-table is to do some changes like edit or shrink a partition, create a new one out of existing space or so.

http://nitinpant.hubpages.com/hub/Re...artition-Table
 
Old 08-21-2011, 10:22 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
What does "fdisk -l" (as root if necessary) show - from a terminal on the liveCD.
 
Old 08-21-2011, 10:33 PM   #4
nicolas_lz
LQ Newbie
 
Registered: Aug 2011
Distribution: Debian
Posts: 4

Original Poster
Rep: Reputation: Disabled
andrewthomas, unfortunately, it didn't work for me. I only could try gparted because the only partition I couldn't recover was the Windows installation (I don't care about it). Thanks anyway!

syg00, this is the output of fdisk. Thanks for your help.
Code:
$ sudo fdisk -l /dev/sda

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0004cec6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        9961    80010240   83  Linux
/dev/sda2   *        9962       20550    85056140   83  Linux
/dev/sda3           20551       30273    78099996   83  Linux
/dev/sda4           30274       30402     1030144   82  Linux swap / Solaris
now, sda1 is just an empty ext3 filesystem. I had a Windows installation here before I deleted the partition table.
sda2 is for Debian
sda3 is the /home directory
sda4 is swap
 
Old 08-21-2011, 10:53 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Not making too much (more) sense - that looks o.k. except for the 2 boot flags; delete one or both.
Go here, do what it says, and post the RESULTS.txt. Has all your (current) boot/partition info.
 
Old 08-22-2011, 01:14 PM   #6
nicolas_lz
LQ Newbie
 
Registered: Aug 2011
Distribution: Debian
Posts: 4

Original Poster
Rep: Reputation: Disabled
Here you have the RESULTS.txt file: RESULTS.txt

Now, the name of the troubled device is /dev/sdb, because I added another hard disk with some personal documents, and it took the "sda" label.
Also, I've tried using LILO and it worked! (GRUB still doesn't). However, I would like to know what happened to the drive.

Thanks you!
 
Old 08-22-2011, 07:07 PM   #7
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,126

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Normally that contains a hex dump of the MBR - those decoder errors may indicate your guess above is correct.
Grub classic handles zeroed disks fine - must admit I haven't bothered testing grub2; still not much of fan of it.

If he grub-install still doesn't work open a bug report against it.
 
Old 09-02-2011, 01:44 PM   #8
nicolas_lz
LQ Newbie
 
Registered: Aug 2011
Distribution: Debian
Posts: 4

Original Poster
Rep: Reputation: Disabled
Hi again! Luckily, I've solved it. For some reason (testdisk, maybe?) I had another partition table in /dev/sda1 device. I just made a backup of the disk contents (I had to buy another HD), then I zeroed again (now, intentionally) the first part of /dev/sda, I created the partitions again and restore its contents from the backup.

Grub worked again, "and they lived happily ever after"

Thanks for your help!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GRUB Hard Disk Error Sudharsan Linux - Software 3 12-10-2010 12:35 AM
GRUB Hard disk error dave247 Linux - General 4 02-14-2008 10:29 AM
Grub Hard disk error santana Linux - Embedded & Single-board computer 5 01-17-2008 11:30 PM
grub hard disk error gtanghookup Linux - Software 7 04-24-2004 12:33 AM
GRUB Hard Disk Error joe_wilkins2001 Linux - Newbie 1 01-25-2004 04:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration