You are not logged in.

#1 2013-06-09 12:54:28

theking2
Member
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 329

[SOLVED] This msdos-style partition label has no post-MBR gap

Today I was faced with a problem caused by an update of filesystem. I used to have grub-legacy on my system running like breeze. The unfortunate update of filesystem https://bbs.archlinux.org/viewtopic.php?id=164312&p=17 required me to get rid of grub-legacy and replace it by grub2.

After installing grub2 (and thereby removing grub-legacy) I was left with the task to configure grub2

Before the update my part tatble was

   Device Boot      Start         End      Blocks   Id  System
/dev/sdf1    *          1      208844      104422+  83  Linux
/dev/sdf2          208845      738989      265072+  82  Linux swap / Solaris
/dev/sdf3          738990    16113194     7687102+  83  Linux
/dev/sdf4        16113195   125033894    54460350   83  Linux

Having the boot partition this location was working fine for grub-legacy, grub2 apparently needs more space and

 grub-install /dev/sdf --recheck

issued the warning and error similar to

This msdos-style partition label has no post-MBR gap;

in other words I was f*cked. Not wanting to go back to grub-legacy I took the drastic step of getting rid of the first (boot) partition and put the /boot in a folder on the root partition instead without using it as the mount point.(change fstab to not mount LABEL=boot to /boot)

For that I copied all files from /boot to /boot.save unmounted /boot copied /boot.save to /boot and deleted the /boot partition. Now I could do the grub-install without a warning. A reboot to the system failed as it couldn't locate the root disk by uuid. :-(

The solution was recreated the ram image with mkinitcpio. In order to this I
1) booted from a usb
2) setup the arch environment

mount LABEL=root /mnt/arch

3) used arch-chroot to chroot in this

arch-chroot /mnt/arch

4) to make sure, updated all the packages with pacman -Syu and reinstalled mkinitcpio
5) created the image with

mkinitcpio -p linux

With the new grub install and image, archlinux booted again. But ofcourse sans a separate the boot partition. I can live with that.

Last edited by theking2 (2014-03-20 20:27:27)


archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

#2 2013-06-09 12:59:55

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,987
Website

Re: [SOLVED] This msdos-style partition label has no post-MBR gap

Are you just sharing this incase someone else needs to do something similar?  Or is there a question here?

This was clearly elaborated - good instructions - but I suspect this is not an optimal solution that should be recommended.  Fixing grub was trivial, changing to grub-legacy from AUR would be trivial, switching to syslinux (wihch behaves much more like grub-legacy) is trivial.  This solution is a bit more involved and requires the deletion of the boot partition.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#3 2013-06-09 23:54:29

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,058

Re: [SOLVED] This msdos-style partition label has no post-MBR gap

I wonder if you could have just resized /dev/sdf1 to make room for Grub2?

Offline

#4 2013-06-10 00:21:15

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: [SOLVED] This msdos-style partition label has no post-MBR gap

anonymous_user wrote:

I wonder if you could have just resized /dev/sdf1 to make room for Grub2?

I was wondering this myself.  I bet if you just made a new partition now with fdisk, it would just start it at sector 2048 instead of 1, and you could just use the given value for the ending to have it the same size as before minus 2047 sectors.

Offline

#5 2013-06-13 19:32:33

theking2
Member
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 329

Re: [SOLVED] This msdos-style partition label has no post-MBR gap

to all above. I suspect there were a number of alternatives routes to obtain a working version of my file slash media slash dhcp server. There were a couple of hopefully educated reasons to go the way  I went:


1. although a separate boot parition seemed a good idea at  the time there is no particular reason to have it, is there?

2. The system sits on a SSD. I did not want to stress it with moving partitions around. This would involve quit a number of unnessecairy writes.

3. I really contemplated on reinstaling the system, this time with something less labour intensive as debian or so. As it is a fairly old install surviving one house move and two marriages I felt it might be time for something new. So I was particularly proud of myself to get it/something running in the end without the reinstall.
(indeed, no question but a mere message to not dispair when the grub2 upgrade doesnt go as well as per the wiki's instructions, which have a rather optimistic pretext.)

4. I'm almost sure in the future of arch grub-legacy, even as AUR, will prove to break a prohibitaly number of things lest the disappearance of the package maintainer.

Last edited by theking2 (2013-06-13 19:34:25)


archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

#6 2013-06-16 11:12:07

theking2
Member
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 329

Re: [SOLVED] This msdos-style partition label has no post-MBR gap

I've invested another sunday morning in this to get seperate boot partition back as anonymous_user and woofy suggested.

As I had now 100+Mb sitting free at /dev/sdf creating a new partition started at sector 63. I now went back to my netboot USB and recreated the boot environment:

mount /dev/sde3 /mnt
mount /dev/sde1 /mnt/boot
arch-chroot in /mnt bash
mkinitcpio -p linux
grub-mkconfig -o /boot/grub/grub.cfg
grub-install --recheck /dev/sde

after that I could boot using the fresh boot partition.


archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

#7 2013-06-30 00:06:04

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: [SOLVED] This msdos-style partition label has no post-MBR gap

If that is all you did, I doubt you booted using the boot partition as you do not seemed to have reinstalled linux so the kernel won't be on the boot partition. I'd guess you booted using the /boot directory on /.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#8 2014-03-20 20:23:41

theking2
Member
From: Romanshorn Switzerland
Registered: 2009-03-04
Posts: 329

Re: [SOLVED] This msdos-style partition label has no post-MBR gap

no, I booted using the same boot partition. But since this is close to a child bearing ago I could be wrong.

Device    Boot     Start       End   Blocks  Id System
/dev/sde1 *           63    208844   104391  83 Linux
/dev/sde2         208845    738989   265072+ 82 Linux swap / Solaris
/dev/sde3         738990  16113194  7687102+ 83 Linux
/dev/sde4       16113195 125033894 54460350  83 Linux

Last edited by theking2 (2014-03-20 20:26:40)


archlinux on a Gigabyte C1037UN-EU, 16GiB
a Promise  PDC40718 based ZFS set
root on a Samsung SSD PB22-J
running LogitechMediaServer(-git), Samba, MiniDLNA, TOR

Offline

Board footer

Powered by FluxBB