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

Submitter:  Igor Murzov <garik>
Submitted:  Sun 06 Sep 2009 11:35:32 PM UTC
   
 
Category:  Disk & Partition Severity:  Major
Priority:  5 - Normal Item Group:  None
Status:  Invalid Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  Bazaar - trunk
Release:  Reproducibility:  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>
Group 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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
  • -email is unavailable- added by phcoder (Posted a comment)
  • -email is unavailable- added by garik (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-12-19 phcoder StatusNone Invalid
        Open/ClosedOpen Closed
    2009-09-06 garik Attached File- Added partition-table.broken, #18678
        Attached File- Added partition-table.fixed, #18679

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code