You are not logged in.

#1 2012-07-20 11:33:59

Onyros
Member
From: Lisbon, Portugal
Registered: 2007-10-11
Posts: 295

From grub to grub2... (and failed restore of grub-legacy!)

... eventually led me to syslinux tongue

I followed instructions on the ArchWiki to "convert" a running Arch installation from grub to grub2, but when I tried booting:

Cannot find root device [uuid] yadda yadda yadda

I tried changing the kernel line to read the appropriate /dev/sda1 (where boot is located) but it also failed.

Eventually resorted to syslinux in order to boot (installed with a rescue USB disk), because when I tried restoring my conveniently backed up grub-legacy and bootcode-backup I was stuck with GRUB and a blinking cursor on my screen. I used dd with bs=446 on both backup and restore.

So, dear forum members, fellows, comrades... Beware of the transition. Make sure you have an alternative booting method at hand (and a rescue LiveCD), because this one, much like the glibc update isn't going to be a smooth one.

Can anyone lend me a hand in transitioning to GRUB2? In helping it find the UUID devices, so it does boot? I followed the Wiki and didn't miss a step.

I can keep on using syslinux, it does what I expect of it (boot my only existing installation, that is), but would eventually like to transition to GRUB2.

Thanks in advance! smile

Last edited by Onyros (2012-07-20 11:36:56)

Offline

#2 2012-07-20 11:48:58

progandy
Member
Registered: 2012-05-17
Posts: 2,152

Re: From grub to grub2... (and failed restore of grub-legacy!)

I made the switch while it was still called grub2. I discarded my old config (no grub-menulst2cfg) and directly used grub-mkconfig.

Offline

#3 2012-07-20 12:19:56

Onyros
Member
From: Lisbon, Portugal
Registered: 2007-10-11
Posts: 295

Re: From grub to grub2... (and failed restore of grub-legacy!)

I will try that, though I see no difference from what I'm putting into the config and what the conversion script inputted, the UUID was correct, the bootloader didn't find it, though.

Offline

#4 2012-07-20 12:25:15

Shark
Member
From: /dev/zero
Registered: 2011-02-28
Posts: 663

Re: From grub to grub2... (and failed restore of grub-legacy!)

Did you ran:

 grub-mkconfig -o /boot/grub/grub.cfg

after grub2 installation?

Last edited by Shark (2012-07-20 12:26:14)


If you have built castles in the air, your work need not be lost; that is where they should be. Now put foundations under them.
Henry David Thoreau

Registered Linux User: #559057

Offline

#5 2012-07-20 12:30:07

Onyros
Member
From: Lisbon, Portugal
Registered: 2007-10-11
Posts: 295

Re: From grub to grub2... (and failed restore of grub-legacy!)

Yes, I did and there were no errors whatsoever there - I checked the generated cfg file and everything seemed fine. What worried me, especially, was the fact that restoring the legacy GRUB failed, though. I will eventually nail the transition, but I suspect a few people will get stuck if this happens to them.

Last edited by Onyros (2012-07-20 12:33:47)

Offline

#6 2012-07-20 15:18:13

marvn
Member
From: Prague
Registered: 2010-01-05
Posts: 84

Re: From grub to grub2... (and failed restore of grub-legacy!)

the guide sais I should add additional arguments into /etc/grub/default but there is no such file...should I create it manually?

https://wiki.archlinux.org/index.php/Gr … _arguments

EDIT: meh ... /etc/default ? this srsly suprised me tongue

Last edited by marvn (2012-07-20 15:20:25)


core i5 4590, x86_64, nvidia 970

Offline

#7 2012-07-20 15:20:05

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

Re: From grub to grub2... (and failed restore of grub-legacy!)

If you have grub-common installed you should have /etc/default/grub.

Offline

#8 2012-07-20 15:47:44

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: From grub to grub2... (and failed restore of grub-legacy!)

He should, since grub-common is a dependency of grub-bios.

http://www.archlinux.org/packages/core/i686/grub-bios/


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#9 2012-07-20 16:03:59

marvn
Member
From: Prague
Registered: 2010-01-05
Posts: 84

Re: From grub to grub2... (and failed restore of grub-legacy!)

OK, I've done what wiki said, it works but with following issues:

1. the consle reslolution works only in menu, not after boot. I've used:
GRUB_GFXMODE=1024x768x24
GRUB_GFXPAYLOAD_LINUX=keep

--> this can be probably sloved by adding the "depraceted" vga=0x0318 back into params

2. windows do not want to boot. I have them on primary partition /dev/sda1
I've used both methods on the wiki:

A. I found bootmgr file in "/media/acer/Windows/Boot/PCAT/bootmgr", did the probe and add

#!/bin/sh
menuentry "Microsoft Windows 7 BIOS-MBR" {
    insmod part_msdos
    insmod ntfs
    insmod search_fs_uuid
    insmod ntldr     
    search --fs-uuid --no-floppy --set=root 8020F94A20F947A4
#    ntldr /bootmgr
nrldr /Boot/PCAT/bootmgr
}

---> neiher /bootmgr nor /Boot/PCAT/bootmgr works as it says cannot find bootmgr

EDIT> i have a typo there, not sure how I make it by ctrl+c & ctrl+v, but anyhow

when I use ntldr /Windows/Boot/PCAT/bootmgr it starts but fail to start (recent hw or se change might be the cause, lol). there is 2 more bootmgr on my windows partition, I can try them maybe...

B. I used to have this in old menu.lst

# (4) Windows
title Windows
rootnoverify (hd0,1)
makeactive
chainloader +1

so I've added following to 40-custom:

# (2) Windows 7 
    menuentry "Windows 7" {
    set root=(hd0,1)
    chainloader (hd0,1)+1
}

---> it it gives me "Invalide signature" error

Last edited by marvn (2012-07-20 16:19:38)


core i5 4590, x86_64, nvidia 970

Offline

#10 2012-07-20 16:22:51

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: From grub to grub2... (and failed restore of grub-legacy!)

Delete whatever you put in 40_custom (delete "40-custom" if you created such a file) and create a new "/etc/grub.d/11_Windows" with the following contents:

#! /bin/sh -e
echo "Adding Windows 7..." >&2
cat << EOF
menuentry "Windows 7" {
set root=(hd0,2)
chainloader +1
}
EOF

Note: If you used "(hd0,1)" in GRUB Legacy (and it worked), you need to use "(hd0,2)" for GRUB 2, because GRUB 2 starts counting partitions from 1.

(Later Edit)

Set the executable bit (as root) before you re-generate the .cfg:

# chmod -x /etc/grub.d/11_Windows

Then re-generate your .cfg:

# grub-mkconfig -o /boot/grub/grub.cfg

And don't forget to mark it as solved (by editing the first post).

Last edited by DSpider (2012-07-20 18:10:19)


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#11 2012-07-20 16:43:02

marvn
Member
From: Prague
Registered: 2010-01-05
Posts: 84

Re: From grub to grub2... (and failed restore of grub-legacy!)

DSpider wrote:

Delete whatever you put in 40_custom (delete "40-custom" if you created such a file) and create a new "/etc/grub.d/11_Windows" with the following contents:

#! /bin/sh -e
echo "Adding Windows 7..." >&2
cat << EOF
menuentry "Windows 7" {
set root=(hd0,2)
chainloader +1
}
EOF

Note: If you used "(hd0,1)" in GRUB Legacy (and it worked), you need to use "(hd0,2)" for GRUB 2, because GRUB 2 starts counting partitions from 1.

Then re-generate your .cfg:

# grub-mkconfig -o /boot/grub/grub.cfg

And don't forget to mark it as solved (by editing the first post).

Thanks!

I didn't created 40-custom, I was editing 40_custom (my bad)

after changing the root to hd0,2 I can boot into the windows smile

Your guide however doesnt work...as the grub-mkconfig was ignoring the script...ok, it was probably because I didnt +x it (I'm not very smart today) ... so maybe it will work if done correctly tongue

btw. It's not my thread, so I'm not sure if I can mark it as solved. And there will be probably more people with issues with this upgrade, as there are lot of unintuitive things in GRUB2 (imho) and the wiki page is overcomplicated I'm afraid

well, thanks again.

btw2. I've found some thread about the issue "http://ubuntuforums.org/showthread.php?t=1264151&page=1", read 3 pages and I would probably read all without being any closer to the solution without you tongue

Last edited by marvn (2012-07-20 16:45:44)


core i5 4590, x86_64, nvidia 970

Offline

#12 2012-07-20 17:59:28

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: From grub to grub2... (and failed restore of grub-legacy!)

there are lot of unintuitive things in GRUB2 (imho) and the wiki page is overcomplicated I'm afraid

GRUB2 is overcomplicated. I switched to Syslinux a few months ago and haven't looked back.

https://bbs.archlinux.org/viewtopic.php … 8#p1109328


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#13 2012-07-20 20:43:49

Onyros
Member
From: Lisbon, Portugal
Registered: 2007-10-11
Posts: 295

Re: From grub to grub2... (and failed restore of grub-legacy!)

Actually, DSpider, I feel tempted to just keep using Syslinux, too. Not that it wouldn't eventually work, but if Syslinux does what I expect of a bootloader without much complication (apart from having a 1366x768 splash). Configuration seems much simpler and straightforward, much KISSer.

And now, buckling up for the shift to systemd. tongue (should be fun)

Offline

#14 2012-07-21 08:13:32

Viski
Member
From: Espoo, Finland
Registered: 2008-06-26
Posts: 11

Re: From grub to grub2... (and failed restore of grub-legacy!)

My grub update went awry too.

I was following the instructions in wiki to install Grub2 to MBR.

After running

sudo grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda

I got this:

/usr/sbin/grub-bios-setup: info: scanning hostdisk//dev/sda for LDM.
/usr/sbin/grub-bios-setup: info: no LDM signature found.
/usr/sbin/grub-bios-setup: info: Scanning for lvm devices on disk hostdisk//dev/sda.
/usr/sbin/grub-bios-setup: info: no LVM signature found.
/usr/sbin/grub-bios-setup: warning: this LDM has no Embedding Partition; embedding won't be possible.
/usr/sbin/grub-bios-setup: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-bios-setup: error: will not proceed with blocklists.

I did some research, but didn't find anything specific. I tried to increase the empty space in the beginning of the hd from 64 to 2048 sectors, but to no avail.

The whole logs (including fdisk -l) can be found here: http://pastebin.ca/2173240

Offline

#15 2012-07-25 06:18:18

Akael
Member
Registered: 2011-09-19
Posts: 23

Re: From grub to grub2... (and failed restore of grub-legacy!)

Viski wrote:

My grub update went awry too.

I was following the instructions in wiki to install Grub2 to MBR.

After running

sudo grub-install --directory=/usr/lib/grub/i386-pc --target=i386-pc --boot-directory=/boot --recheck --debug /dev/sda

I got this:

/usr/sbin/grub-bios-setup: info: scanning hostdisk//dev/sda for LDM.
/usr/sbin/grub-bios-setup: info: no LDM signature found.
/usr/sbin/grub-bios-setup: info: Scanning for lvm devices on disk hostdisk//dev/sda.
/usr/sbin/grub-bios-setup: info: no LVM signature found.
/usr/sbin/grub-bios-setup: warning: this LDM has no Embedding Partition; embedding won't be possible.
/usr/sbin/grub-bios-setup: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-bios-setup: error: will not proceed with blocklists.

I did some research, but didn't find anything specific. I tried to increase the empty space in the beginning of the hd from 64 to 2048 sectors, but to no avail.

The whole logs (including fdisk -l) can be found here: http://pastebin.ca/2173240

I am getting the exact same thing with a brand new install of Arch. Did you every find a solution to this issue?

Offline

#16 2012-07-25 07:05:26

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: From grub to grub2... (and failed restore of grub-legacy!)

Because you need to use "grub-install /dev/sda", not /dev/sda1; you want to install to the MBR.

https://wiki.archlinux.org/index.php/Be … bootloader


"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#17 2012-07-25 16:25:21

Akael
Member
Registered: 2011-09-19
Posts: 23

Re: From grub to grub2... (and failed restore of grub-legacy!)

DSpider wrote:

Because you need to use "grub-install /dev/sda", not /dev/sda1; you want to install to the MBR.

https://wiki.archlinux.org/index.php/Be … bootloader

Dspider,

I did try to use "grub-install /dev/sda" and all I get is:

/usr/sbin/grub-bios-setup: warning: this LDM has no Embedding Partition; embedding won't be possible.
/usr/sbin/grub-bios-setup: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/usr/sbin/grub-bios-setup: error: will not proceed with blocklists.

Offline

#18 2012-11-10 07:25:06

Pip
Member
Registered: 2012-01-25
Posts: 4

Re: From grub to grub2... (and failed restore of grub-legacy!)

This is the real problem reason and solution:
https://bugs.launchpad.net/ubuntu/+sour … omments/26
Now, case [finally SOLVED]

Offline

#19 2012-12-03 09:09:20

ikey
Member
Registered: 2009-11-04
Posts: 3

Re: From grub to grub2... (and failed restore of grub-legacy!)

Pip wrote:

This is the real problem reason and solution:
https://bugs.launchpad.net/ubuntu/+sour … omments/26
Now, case [finally SOLVED]

I tried this solution, but didn't work for me.

Offline

Board footer

Powered by FluxBB