URL: <http://savannah.gnu.org/bugs/?27389>
Summary: grub-setup broke partition table Project: GNU GRUB Submitted by: garik Submitted on: Sun 06 Sep 2009 11:35:32 PM GMT Category: Disk & Partition Severity: Major Priority: 5 - Normal Item Group: None Status: None Privacy: Public Assigned to: None Originator Name: Originator Email: Open/Closed: Open Discussion Lock: Any Release: Release: SVN Reproducibility: None Planned Release: None _______________________________________________________ Details: 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. -------------------------------------------- r...@garik:~# grub-setup -b cdboot.img '(hd0)' r...@garik:~# grub-setup -b boot.img -b cdboot.img '(hd0)' grub-setup: error: Cannot guess the root device. Specify the option ``--root-device''. r...@garik:~# grub-setup -b cdboot.img '(hd0)' grub-setup: error: Cannot guess the root device. Specify the option ``--root-device''. r...@garik:~# grub-setup -r /dev/hda -b cdboot.img '(hd0)' grub-setup: error: Invalid root device `/dev/hda' r...@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. r...@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 _______________________________________________________ File Attachments: ------------------------------------------------------- Date: Sun 06 Sep 2009 11:35:32 PM GMT Name: partition-table.fixed Size: 512B By: garik dd if=/dev/hda bs=512 count=1 <http://savannah.gnu.org/bugs/download.php?file_id=18679> ------------------------------------------------------- Date: Sun 06 Sep 2009 11:35:32 PM GMT Name: partition-table.broken Size: 512B By: garik dd if=/dev/hda bs=512 count=1 <http://savannah.gnu.org/bugs/download.php?file_id=18678> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?27389> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/ _______________________________________________ Bug-grub mailing list Bug-grub@gnu.org http://lists.gnu.org/mailman/listinfo/bug-grub