Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a little diffuse question. I recently wanted to upgrade my nginx installation on one of my servers running ubuntu 12.04. I read somewhere that this should be done by running apt-get upgrade nginx -f - however that seems to be wrong, because my server started to upgrade A LOT of packages - including grub - and this is what my question is about. It prompted me for telling which device or partition to install grub to, and it something about installing it to all if unsure. I ended up aborting the installation, and then it told me that my server might not boot correctly if I restarted it, because I didn't specify the devices or something.

As you might have expected I have no knowledge about grub, and my question is therefor:

Is there currently something wrong after I aborted the apt-get upgrade? How do I now ensure that everything is OK? Can I safely restart my server (if I one day need that)?

I have a RAID 1 array over my two 3TB disks. Here is some info about the system:

First: df -1

Filesystem      1K-blocks    Used  Available Use% Mounted on
/dev/md2       1065281580 2449292 1009145256   1% /
udev             16310664      12   16310652   1% /dev
tmpfs             6527992     328    6527664   1% /run
none                 5120       0       5120   0% /run/lock
none             16319972       0   16319972   0% /run/shm
cgroup           16319972       0   16319972   0% /sys/fs/cgroup
/dev/md3       1828890816 9885048 1726835052   1% /home
/dev/md1           507836   45060     436564  10% /boot

Disk /dev/md1 doesn't contain a valid partition table

Second: cat /proc/mdstat

Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
md1 : active raid1 sda2[0] sdb2[1]
      524276 blocks super 1.2 [2/2] [UU]

md0 : active raid1 sda1[0] sdb1[1]
      12581816 blocks super 1.2 [2/2] [UU]

md2 : active raid1 sda3[0] sdb3[1]
      1073740664 blocks super 1.2 [2/2] [UU]

md3 : active raid1 sda4[0] sdb4[1]
      1843414335 blocks super 1.2 [2/2] [UU]

Third: gdisk -l /dev/sda

GPT fdisk (gdisk) version 0.8.1

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): E7CD481A-663E-4312-AFC0-E72669DA4E34
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            4096        25169919   12.0 GiB    FD00  
   2        25169920        26218495   512.0 MiB   FD00  
   3        26218496      2173702143   1024.0 GiB  FD00  
   4      2173702144      5860533134   1.7 TiB     FD00  
   5            2048            4095   1024.0 KiB  EF02

Fourth: gdisk -l /dev/sdb

GPT fdisk (gdisk) version 0.8.1

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 3FD386DF-A293-4A31-86FF-1E1EF5CA6566
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            4096        25169919   12.0 GiB    FD00  
   2        25169920        26218495   512.0 MiB   FD00  
   3        26218496      2173702143   1024.0 GiB  FD00  
   4      2173702144      5860533134   1.7 TiB     FD00  
   5            2048            4095   1024.0 KiB  EF02
share|improve this question
    
your drive setup, if you haven't noticed, isn't shown in the output you give. Use gdisk or sgdisk as outlined in my answer. –  0xC0000022L Feb 27 '13 at 12:47
    
Okay, I updated my question and some of the stats - Does that help you? –  Niels Kristian Feb 27 '13 at 14:19
    
it does. Because now we can talk in actual device names as they occur on your machine ;) –  0xC0000022L Feb 27 '13 at 14:27

1 Answer 1

You can try to reinstall grub in the MBR of both HDD with grub-install /dev/sda and grub-install /dev/sdb as root.

This ensures, that you can boot, even if one of your hdd is broken.

This worked for me with my 2x 500 GB at RAID 1.

share|improve this answer
    
Okay, since I aborted the upgrade process of grub, should I then reupgrade it? And is there any commands I can run to check that everything is okay? –  Niels Kristian Feb 27 '13 at 12:10
    
Try to do a full system upgrade with apt-get update && apt-get dist-upgrade as root. If needed GRUB will be updated. It is possible, that GRUB is already upgraded, but the config is not ok because you aborted the configuration last time. This is why you need to reinstall grub as shown above. Grub is a tricky thing sometimes. –  prophecy201 Feb 27 '13 at 12:15
    
@prophecy201: sorry, but you are talking about something that has little to do with the question. MBR != GPT. That's a fundamental difference. Starting with 2 TB a GPT is required and as glue to BIOSes you also need a "BIOS Boot Partition". Also, if you want to update the configuration, say so: update-grub, it really is that trivial ;) –  0xC0000022L Feb 27 '13 at 12:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.