You are not logged in.

#1 2013-06-24 14:19:57

Kinux
Member
Registered: 2010-06-05
Posts: 42

[Solved] Grub 0.97-21 updated to Grub 2.00-1

After the last Binaries move to /usr/bin requiring update intervention modifications that I manged well, I simply forgot adding GRUB to pacman ignore list to keep the legacy version on one of my systems.

Today's system update, updated grub 0.97-21 to 2.00-1 by error and after a reboot I got:

GNU GRUB version 0.97
grub>

and nothing else!

Reading messages here for 3 hours to find a solution for this problem, this is what I finally did.
I booted my system with the latest Arch CD and then :

Checking the disk partitions:

# fdisk -l

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *          63      208844      104391   83  Linux
/dev/sda2          208845     1269134      530145   82  Linux swap / Solaris
/dev/sda3         1269135    17655434     8193150   83  Linux
/dev/sda4        17655435    78124094    30234330   83  Linux

And then :

# mkdir /mnt/boot
# mount /dev/sda3 /mnt
# mount /dev/sda1 /mnt/boot
# cd /mnt
# arch-chroot /mnt

Backup old GRUB boot record for just in case:

# dd if=/dev/sda of=/root/mbr_backup bs=512 count=1
# dd if=/dev/sda of=/root/bootcode_backup bs=446 count=1

Generate Config File:

# grub-mkconfig -o /boot/grub/grub.cfg
found linux image: /boot/vmlinuz-linux
found initrd image: /boot/initramfs-linux

Then installed the GRUB2 Master Boot Record:

# modprobe dm-mod
# grub-install --recheck /dev/sda

Then I had to install systemd-sysvcompat. Because without it I got a No /sbin/init message after reboot.

# pacman -S systemd-sysvcompat (it added sysvinit-tools package too)

After this I rebooted and system worked fine. I have yet to find out where is that VGA= line in Grub2 to get a higher terminal resolution and get used to this new Grub. (or maybe to find a special grub menu editor)

Now, I wonder if I did correctly all of this or I should be worried that something might go wrong on next update?

Last edited by Kinux (2013-06-24 16:25:09)

Offline

#2 2013-06-24 14:24:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,532
Website

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

First, pacman wouldn't replace grub-legacy with grub.  Er ... it shouldn't have - but I see pacman just replaced it on my system too!  Off to fix that now.

But if everything is working for you, what is it you are looking for?  I'm fixing it by installing grub-legacy.

EDIT: package "grub" was dropped from the repos some time ago (v0.97).  That could remain happily on your system for some time as there was no other "grub" in the repos - there was grub-common, grub-bios, and other packages that made up grub2.  It seems these were just consolodated into "grub" in core a couple days ago - so this would replace the old grub, but not the aur grub-legacy.

Last edited by Trilby (2013-06-24 15:08:50)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2013-06-24 14:45:12

geekinthesticks
Member
From: England
Registered: 2011-09-21
Posts: 143
Website

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

I think your original problem was caused by pacman renaming /boot/grub/menu.lst to menu.lst.pacsave. Sorry not at the computer where this happened to me so not sure if that was the exact file, but booting from a live CD and re-renaming the file fixed it for me.

Offline

#4 2013-06-24 14:46:32

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

You did it correctly.  Enjoy grub.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2013-06-24 16:23:47

Kinux
Member
Registered: 2010-06-05
Posts: 42

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

Thanks everyone for confirmation of what I understood from other posts and Wiki to fix my problem, to be correct.

@geekinthesticks : You were right about menu.lst being renamed. I didn't realized if Grub 2 could use the old menu.lst with a boot record of 0.97.

I was caught by surprise with this Grub update. But as usual the frustration of breaking my Arch turned to a pleasant satisfaction of not only fixing a problem but also learning more on how Linux works.

Frankly, I liked better the simplicity of Grub 0.97 than the new one though!

Offline

#6 2013-06-24 16:34:57

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,560

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

Kinux wrote:

Frankly, I liked better the simplicity of Grub 0.97 than the new one though!

You're not alone, this has caused many of us to switch to Syslinux instead of Grub 2. Simplicity similar to the old Grub.

Online

#7 2013-06-25 14:56:13

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

You don't need a rescue cd, just boot with "configfile" from the grub shell (use tab completion):

configfile /grub/menu.lst.pacsave

Last edited by hokasch (2013-06-25 14:56:51)

Offline

#8 2013-06-25 18:42:09

liticovjesac
Member
From: Stockholm-Belgrade-Köln
Registered: 2008-07-16
Posts: 110

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

Hi,
i have the same problem with my grub update. I have been using old grub 9.7 and last update broke my boot. I manage to get system up with configfile /grub/menu.lst.pacsave
My question is how should I make this permanent solution instead of typing everytime this comand in grub shell?

Offline

#9 2013-06-25 18:44:47

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

liticovjesac wrote:

Hi,
i have the same problem with my grub update. I have been using old grub 9.7 and last update broke my boot. I manage to get system up with configfile /grub/menu.lst.pacsave
My question is how should I make this permanent solution instead of typing everytime this comand in grub shell?

Have you dealt with the pacsave file?

Offline

#10 2013-06-25 19:15:47

liticovjesac
Member
From: Stockholm-Belgrade-Köln
Registered: 2008-07-16
Posts: 110

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

karol wrote:
liticovjesac wrote:

Hi,
i have the same problem with my grub update. I have been using old grub 9.7 and last update broke my boot. I manage to get system up with configfile /grub/menu.lst.pacsave
My question is how should I make this permanent solution instead of typing everytime this comand in grub shell?

Have you dealt with the pacsave file?

I just renamed menu.lst.pacsave to menu.lst and it worked. I guess that is permanent solution + putting grub to ignore package in pacman config file

Offline

#11 2013-06-25 19:28:20

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

I don't think you need to ignore grub updates, you only need to read pacman's output and act accordingly.

Offline

#12 2013-06-25 19:29:36

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,532
Website

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

I'm not sure I follow - if you don't either install grub-legacy from aur, or ignore grub update, you will have grub 2.xx instead of 0.97.  The pacsave file would be the least of your problems then.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#13 2013-06-25 19:39:46

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

liticovjesac wrote:

I just renamed menu.lst.pacsave to menu.lst and it worked. I guess that is permanent solution + putting grub to ignore package in pacman config file

That is a somewhat half-baked solution, you already pulled in grub2 from the repos. In case you want to keep the old grub version, install grub-legacy (in AUR) and remove the grub package. Otherwise, update grub as described in the wiki.

@Trilby: it should work fine for the moment (still bad housekeeping) as all grub stages are at the legacy version (MBR and the files in /boot/grub) from running grub-install, not at the grub package version.

Edit: thanks karol

Last edited by hokasch (2013-06-25 19:45:24)

Offline

#14 2013-06-25 19:43:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

Offline

#15 2013-06-27 15:45:32

cro
Member
From: Germany
Registered: 2006-01-02
Posts: 101

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

I just wanted to say that it was a cruel mistake to let pacman (sort of) silently update grub legacy to grub2. It broke old well running systems. Please be more careful with that kind of updates!

Offline

#16 2013-06-27 15:46:42

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,093
Website

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

cro wrote:

I just wanted to say that it was a cruel mistake to let pacman (sort of) silently update grub legacy to grub2. It broke old well running systems. Please be more careful with that kind of updates!

I can't tell who this is aimed at, but it seems like a complaint aimed at the devs. In which case, please post personal rants on personal blogs.

All the best,

-HG

Offline

#17 2013-06-27 15:47:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,532
Website

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

cro wrote:

Please be more careful with that kind of updates!

Who is this request directed at?  If it's at the dev's, they didn't update your system - and they may not even read these forums let alone this thread.

If it's directed at other participants in this thread, we definitely didn't update your system.

There's only one person that needs to be careful with updateing your system.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#18 2013-06-27 16:09:08

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,394

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

Somebody care to explain why just renaming menu.lst back fixes the issue?
Is really grub2 compatible with grub menu.lst file or is just a lucky workaround... i mean:
when i ran the update yesterday i was presented with a nice grub shell and i realized what happened; then i restored grub legacy via a live usb.

Did pacman updated my mbr and cleared stage2?  i don't think so


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#19 2013-06-27 16:10:46

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

I'm not sure if grub-legacy -> grub update was needed, users were already warned about grub-legacy being unsupported https://www.archlinux.org/news/grub-leg … supported/ but reading pacman's output is a must anyway.

Offline

#20 2013-06-27 16:39:56

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,532
Website

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

kokoko3k, you had a package on your system named 'grub' that contained the file 'menu.lst' which you had edited.  As of a week ago 'grub' was a package in [core] and this had a higher version number than the grub on your system, so when you ran pacman -Syu it removed grub 0.97 and installed grub 2.xx.  Of course this doesn't touch your MBR, but grub 0.97 (on your system) owned menu.lst, grub 2.xx does not.  So that file would be removed in the update.  Since it had been edited, and was in the backup files array, it was properly backed up as a pacsave.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#21 2013-06-27 16:45:40

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Grub 0.97-21 updated to Grub 2.00-1

@kokoko3k
https://bbs.archlinux.org/viewtopic.php … 3#p1291923

Kinux wrote:

I didn't realized if Grub 2 could use the old menu.lst with a boot record of 0.97.

Offline

Board footer

Powered by FluxBB