0

I managed to mess the grub menu earlier and tried to fix the situation.

Unfortunately I'm really out of ideas now. I get errors trying to run dpkg-reconfigure grub-pc and grub-install. grub-setup claims there is none of GPT partitions have a BIOS boot partition and that embedding is not possible.

/boot does have the boot flag on. I have tried to set the bios boot partition flag as well, but I'm uncertain where I'm supposed to put it. Setting it didn't do anything useful.

I have a three-disk system where 32 gigabytes at the start of each disk is reserved for /boot, /home, /, /var, /tmp and swap (/home is one 32GB partition, others are smaller). Rest of the disks are on RAID5.

I have tried all sorts and this is where I'm now and all I know to do would be to reinstall the system. I can't find anything useful by googling and I spent most of Saturday on this. So I would appreciate some pointers on what I could still try or if I should just give up and reinstall.

P.S. Now I know what I should have done instead of running any rescue applications: Download 64-bit Ubuntu image, boot, mount root and boot && bind /var, /tmp, /sys and /proc, chroot && edit the menu && update-grub.

But that's too late now. Next time I'm wiser.

Here's the output from fdisk -l:

root@ubuntu:/# fdisk -l

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1  3907029167  1953514583+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1  3907029167  1953514583+  ee  GPT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdc: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1  3907029167  1953514583+  ee  GPT

And here's parted:

parted -l
Model: ATA WDC WD20EARS-00M (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      17.4kB  32.0GB  32.0GB                     bios_grub
 2      32.0GB  2000GB  1968GB                     raid


Model: ATA WDC WD20EARS-00M (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system     Name  Flags
 1      17.4kB  8000MB  8000MB  linux-swap(v1)
 2      8000MB  16.0GB  8000MB  ext3
 3      16.0GB  32.0GB  16.0GB  ext3
 4      32.0GB  2000GB  1968GB                        raid


Model: ATA WDC WD20EARS-00M (scsi)
Disk /dev/sdc: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name  Flags
 1      17.4kB  200MB   200MB   ext3               boot
 2      200MB   32.0GB  31.8GB  ext3
 3      32.0GB  2000GB  1968GB                     raid

bios_grub flag was added by me, it didn't exist before that (or it was wiped out by the rescue application).

4
  • How do you get dpkg-reconfigure? Can you run fdisk -l and post the output?
    – John Siu
    Jan 7, 2013 at 23:39
  • I booted with a Live CD and did that part in the post scriptum. Jan 8, 2013 at 6:58
  • IS this a flash install with no data in yet?
    – John Siu
    Jan 8, 2013 at 14:46
  • Nope, the RAID disks are pretty much full. Jan 8, 2013 at 18:03

1 Answer 1

0

I accidently overwrote a boot device once mistaking it for a different device, although I did recover the bootable partition, either GRUB or the drive's MBR got incinerated. I managed to fix this by doing (based on a tutorial):

###First, mount the bootable partition somewhere, like /mnt
mount /dev/your-boot-device (maybe /dev/sda1) /mnt
###Next, mount a required system directory under it.
mount /dev /mnt/dev --bind
###You will probably need to chroot into the mounted boot device
chroot /mnt

###Finally, install GRUB again grub-install --boot-directory=/boot /dev/your-boot-device ###Unmount /dev (if you chrooted) umount /dev ##That should be it. It's been too long since I followed
that tutorial so this answer might be a bit rusty.
Let me know if so.

running from a Live CD as administrator. I hope this helps (or at least gets you close).

1
  • Scott, why did you edit my post? I understand you are a moderator, but why? Jul 13, 2018 at 15:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .