bugGNU GRUB - Bugs: bug #27389, grub-setup broke partition table

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #27389: grub-setup broke partition table

Submitted by:  Igor Murzov <garik>
Submitted on:  Sun 06 Sep 2009 11:35:32 PM UTC  
 
Category: Disk & PartitionSeverity: Major
Priority: 5 - NormalItem Group: None
Status: InvalidPrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: ClosedRelease: 
Release: Bazaar - trunkReproducibility: None
Planned Release: None

Sat 19 Dec 2009 09:28:16 PM UTC, comment #1:

Doing grub-setup -b cdboot.img '(hd0)' you basically instructed grub-setup to destruct 55AA signature. grub-setup is an internal tool not meant to be run directly. Use grub-install.

Vladimir Serbinenko <phcoder>
Project Administrator
Sun 06 Sep 2009 11:35:32 PM UTC, original submission:

grub-r2575 installed on /dev/hda (120 Gb disk with 4 partitions: hda1 - /boot, hda2 - swap, hda3 - /, hda4 - /home).

After my experiments with gettin' grub to boot system from cd, my partition table on hda became broken.

--------------------------------------------
root@garik:~# grub-setup -b cdboot.img '(hd0)'
root@garik:~# grub-setup -b boot.img -b cdboot.img '(hd0)'
grub-setup: error: Cannot guess the root device. Specify the option ``--root-device''.
root@garik:~# grub-setup -b cdboot.img '(hd0)'
grub-setup: error: Cannot guess the root device. Specify the option ``--root-device''.
root@garik:~# grub-setup -r /dev/hda -b cdboot.img '(hd0)'
grub-setup: error: Invalid root device `/dev/hda'
root@garik:~# grub-setup -r '(hd0)' -b cdboot.img '(hd0)'
grub-setup: warn: Attempting to install GRUB to a partitionless disk. This is a BAD idea.
grub-setup: warn: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and its use is discouraged.
grub-setup: error: If you really want blocklists, use --force.
root@garik:~# grub-setup -r '(hd0,1)' -b cdboot.img '(hd0)'
grub-setup: error: no such partition
--------------------------------------------

After that partition table has been recreated with cfdisk (using `df`, `free` info). It turned out that broken table and fixed table differs in only 3 bytes:

--------------------------------------------
$ cmp -l partition-table.broken partition-table.fixed
447 0 200
511 0 125
512 0 252
--------------------------------------------

With best regards,
Igor

Igor Murzov <garik>

 

Attached Files
file #18679:  partition-table.fixed added by garik (512B - application/octet-stream - dd if=/dev/hda bs=512 count=1)
file #18678:  partition-table.broken added by garik (512B - application/octet-stream - dd if=/dev/hda bs=512 count=1)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by phcoder (Posted a comment)
  • -unavailable- added by garik (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 19 Dec 2009 09:28:16 PM UTCphcoderStatusNone=>Invalid
      Open/ClosedOpen=>Closed
    Sun 06 Sep 2009 11:35:32 PM UTCgarikAttached File-=>Added partition-table.broken, #18678
      Attached File-=>Added partition-table.fixed, #18679

    Back to the top


    Powered by Savane 3.1-cleanup1