Downgrading grub2

Help with issues regarding installation of Debian

Re: Downgrading grub2

Postby Grimnar » 2010-03-12 13:51

logan wrote:I just reinstalled my work machine the other day using an old lenny cd and then upgraded to squeeze. I thought the installer said it it'd clean up any files in /boot/grub when I uninstalled grub-pc, but that didn't happen (or it left a heck of alot behind). I got rid of *.mod, *.lst (except for menu.lst), *.img, as well as *.o, grub.cfg, grubenv, some .png file, and unicode.pf2.

Make sure you update-grub after uninstalling grub-pc and installing grub-legacy, so you get 0.97 on the mbr.


Yeah, this is typical Debian the way I see it. Many intstallers and such say they are going to remove/clean up stuff, but they leave a pretty much left to create confusion.
Running apt-get remove --purge package should really remove /etc/package and /usr/share/package for instance. Or else we should rename that syntax to apt-get remove --fuck-up package or apt-get remove --create-confusion package
Don't get me started on dpkg-reconfigure package, it works just as great as windows' repair network connection button
And the way I see it, installing and running grub2 really is a step back. way to many conf-files to comprehend. The files users are suppose/can edit should be visible, all in one dir the rest of the files we should not temper with should be tucked away in a non-obvious lib-dir or something. And of course, /boot/grub should be renamed to /boot/grub2 that goes to /etc/grub as well, call it /etc/grub2 (yeah I know its 1.97)
And what is really the progress of grub2 besides installing splash images?
Grub is a _very_ crucial part of running a computer and it's too easy the way I see it to **** it up and make it totaly useless for normal users.

This is my view of the state of some parts of Debian today.
In other words, before : If you dont know how to run Debian, stick to Windows. If you dont know how to run Squeeze, stick to stable, and every other typical forum quotes. And of course, RTFM
Excuse the french in this post. But it was really good!
Now, I'm going to fix me a workable version of grub! :D
User avatar
Grimnar
 
Posts: 173
Joined: 2008-03-30 16:24

Re: Downgrading grub2

Postby Grimnar » 2010-03-12 14:59

kansasnoob wrote:I hope that's helpful.



This is from my fresh install of Debian Squeeze.

Code: Select all
/home/andreas# dpkg -l | grep grub
ii  grub-common                             1.98~20100115-1            GRand Unified Bootloader, version 2 (common files)
ii  grub-pc                                 1.98~20100115-1            GRand Unified Bootloader, version 2 (PC/BIOS version)


apt-cache search grub gives me this:

grub-choose-default - Control Grub Default through a GUI
grub-splashimages - a collection of great GRUB splashimages
grub-disk - GRUB bootable disk image (dummy package)
grub-doc - Documentation for GRand Unified Bootloader (dummy package)
grub-legacy-doc - Documentation for GRUB Legacy
grub-legacy - GRand Unified Bootloader (Legacy version)
grub - GRand Unified Bootloader (dummy package)
grub2-splashimages - a collection of great GRUB2 splashimages
grub-common - GRand Unified Bootloader, version 2 (common files)
grub-coreboot - GRand Unified Bootloader, version 2 (Coreboot version)
grub-efi-amd64 - GRand Unified Bootloader, version 2 (EFI-AMD64 version)
grub-efi-ia32 - GRand Unified Bootloader, version 2 (EFI-IA32 version)
grub-efi - GRand Unified Bootloader, version 2 (dummy package)
grub-emu - GRand Unified Bootloader, version 2 (emulated version)
grub-firmware-qemu - GRUB firmware image for QEMU
grub-ieee1275 - GRand Unified Bootloader, version 2 (Open Firmware version)
grub-linuxbios - GRand Unified Bootloader, version 2 (dummy package)
grub-pc - GRand Unified Bootloader, version 2 (PC/BIOS version)
grub-rescue-pc - GRUB bootable rescue images, version 2 (PC/BIOS version)
grub2 - GRand Unified Bootloader, version 2 (dummy package)

And a whole lot of other crap which is irrelevant.
Anyways, now I'm going to move the /boot/grub to /boot/backup_grub and try to install grub (0.97).

This is now the ls of /boot
Code: Select all
backup_grub         grub              initrd.img-2.6.32-trunk-amd64.bak  vmlinuz-2.6.32-trunk-amd64
config-2.6.32-trunk-amd64  initrd.img-2.6.32-trunk-amd64  System.map-2.6.32-trunk-amd64


According to Kansasnoob, (which is outside and having fun with his goats! That's gotta be pretty fun! :D ) I should use synaptic to play with the installed grub and such. I dont use synaptic since I dont have gnome installed. Going to try my best anyways.

apt-get install grub-legacy which give me this:

Code: Select all
  multiboot-doc grub-emu grub-legacy-doc mdadm
The following NEW packages will be installed:
  grub-common grub-legacy os-prober


Then I had to update-grub and that gave me this:

Code: Select all
Searching for GRUB installation directory ... found: /boot/grub
Probing devices to guess BIOS drives. This may take a long time.
Searching for default file ... Generating /boot/grub/default file and setting the default boot entry to 0
entry not specified.


No problem, cause I'm going to run grub-install /dev/sda
And that gave me this:

root@debianUSB:/etc/apt# grub-install /dev/sda
Searching for GRUB installation directory ... found: /boot/grub
Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0) /dev/sda


So far so good I guess.
Now it's time to update-grub
And voila, the end of it looked like this:

Code: Select all
root@debianUSB:/etc/apt# update-grub
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ...


Generating /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.32-trunk-amd64
Updating /boot/grub/menu.lst ... done


Now it's time to run grub and run find boot /boot/grub/stage1
And that gave me this, as suspected

Code: Select all
grub> find /boot/grub/stage1
 (hd0,0)

grub>


And next up:

Code: Select all
grub> root (hd0,0)
 Filesystem type is ext2fs, partition type 0x83

grub> setup (hd0,0)
 Checking if "/boot/grub/stage1" exists... yes
 Checking if "/boot/grub/stage2" exists... yes
 Checking if "/boot/grub/e2fs_stage1_5" exists... yes
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
 Running "embed /boot/grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
 Running "install /boot/grub/stage1 (hd0,0) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
Done.

grub>

Not sure about the first error there, since /dev/sda is ext3, but all systems are go so far in my view.

And now /boot/grub looks like this
Code: Select all
root@debianUSB:/boot/grub# ls -l
total 212
-rw-r--r-- 1 root root    197 2010-03-12 09:39 default
-rw-r--r-- 1 root root     15 2010-03-12 09:38 device.map
-rw-r--r-- 1 root root   8672 2010-03-12 09:39 e2fs_stage1_5
-rw-r--r-- 1 root root   8512 2010-03-12 09:39 fat_stage1_5
-rw-r--r-- 1 root root   9536 2010-03-12 09:39 jfs_stage1_5
-rw-r--r-- 1 root root   4047 2010-03-12 09:41 menu.lst
-rw-r--r-- 1 root root   7872 2010-03-12 09:39 minix_stage1_5
-rw-r--r-- 1 root root  10688 2010-03-12 09:39 reiserfs_stage1_5
-rw-r--r-- 1 root root    512 2010-03-12 09:39 stage1
-rw-r--r-- 1 root root 126728 2010-03-12 09:39 stage2
-rw-r--r-- 1 root root  10248 2010-03-12 09:39 xfs_stage1_5

Looking good in my opinion! (Not like the crap that fills the grub2 /boot/grub folder)
Now I'm going to boot this sucker to see if it works! And hopefully the classic grub front is presented.
About a minute later, it works pretty good.
But /etc/grub.d/ is still populated (not good, create confusion)
Same goes to /etc/default/grub

And to make this perfect, I would like to remove the UUID stuff from menu.lst

Code: Select all
title      Debian GNU/Linux, kernel 2.6.32-trunk-amd64
root      (hd0,0)
kernel      /boot/vmlinuz-2.6.32-trunk-amd64 root=UUID=6271c35e-a80a-45c2-a4f8-441f54aec1fd ro
initrd      /boot/initrd.img-2.6.32-trunk-amd64



A big thanks to Kansasnoob! What a ironic nick!


But I'm still a bit upset of grub-common, I don't see why I need to have that package installed. Don't worry I'm not going to remove it, yet.

Code: Select all
root@debianUSB:/etc/default# dpkg -l | grep grub
ii  grub-common                             1.98~20100115-1            GRand Unified Bootloader, version 2 (common files)
ii  grub-legacy                             0.97-59                    GRand Unified Bootloader (Legacy version)
rc  grub-pc                                 1.98~20100115-1            GRand Unified Bootloader, version 2 (PC/BIOS version)
User avatar
Grimnar
 
Posts: 173
Joined: 2008-03-30 16:24

Re: Downgrading grub2

Postby Grimnar » 2010-03-13 00:31

And of course, I have more to cry over :D

Looking at my /etc/fstab I discovered this:

Code: Select all
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# / was on /dev/sda1 during installation
UUID=6271c35e-a80a-45c2-a4f8-441f54aec1fd /               ext3    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=329ebb13-2a9d-4715-9325-23f700cc2519 none            swap    sw              0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/sda1       /media/usb0     auto    rw,user,noauto  0       0
/dev/sda2       /media/usb1     auto    rw,user,noauto  0       0
/dev/sda5       /media/usb2     auto    rw,user,noauto  0       0


Not exactly pretty stuff. Is there any way to fix this?
Some of it is commented out, but the UUID scares me :?
Is it okay (and will it still work) to remove the clutter and make look like this:

Code: Select all
proc            /proc           proc    defaults        0       0
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/sda1       /media/usb0     auto    rw,user,noauto  0       0
/dev/sda2       /media/usb1     auto    rw,user,noauto  0       0
/dev/sda5       /media/usb2     auto    rw,user,noauto  0       0

And I'm going to fix it like Nadir points out here viewtopic.php?f=17&t=50193
Yeah, its on a 16gb usb stick.
User avatar
Grimnar
 
Posts: 173
Joined: 2008-03-30 16:24

Re: Downgrading grub2

Postby dotlj » 2010-03-14 20:51

I think that what you have done is a useful exercise; you (and others) have learned something useful and you have your system the way you want it. I was happy with GRUB, most of the time and the first few times I installed various distros with GRUB2 I looked for the GRUB option, or, chose not to overwrite my working GRUB MBR. After reading in Squeeze (which shares my hard disk with Lenny), that GRUB2 will be the default once Squeeze becomes stable (and that is not too far away now), I thought that I may as well try it and it does work much better, with minimal changes I'm happier now with GRUB2 than with GRUB.

I have had kernel upgrades in both Lenny and Squeeze that GRUB2 handled correctly, but in the past with GRUB, I would have had to modify the menu.list - so far, I haven't had to do that. In the past I've had one or two GRUB updates that caused problems and I needed to use the install CD as a rescue disk, mount the / partition, run "grub-install" and reboot, but not since GRUB2; so overall I think GRUB2 is better. :)
User avatar
dotlj
 
Posts: 646
Joined: 2009-12-25 17:21

Re: Downgrading grub2

Postby runbei » 2011-01-18 00:53

This is more than a matter of taste - Grub1 vs. Grub2. Grub1 (legacy) allows me to enter a nomodeset command in the grub boot screen kernel line so that the suspend-to-ram/resume function works on my ThinkPad X32. Grub2 doesn't allow that, and so far, I have been unable to find a way to make suspend/resume work with Grub2 installed.
Last edited by runbei on 2011-01-18 02:07, edited 1 time in total.
runbei
 
Posts: 15
Joined: 2008-12-29 20:47
Location: Mountain View, CA

Re: Downgrading grub2

Postby stoat » 2011-01-18 01:57

runbei wrote:
Grub1 (legacy) allows me to enter a modenoset command in the grub boot screen kernel line so that the suspend-to-ram/resume function works on my ThinkPad X32. Grub2 doesn't allow that...

It's nomodeset, not modenoset. Right? In GRUB 2, have you tried it in /etc/default/grub as GRUB_CMDLINE_LINUX="nomodeset" followed by sudo update-grub? No promises.
stoat
 
Posts: 62
Joined: 2010-07-03 00:10

Re: Downgrading grub2

Postby runbei » 2011-01-18 02:09

Oops and thank you - will try that and report the results.
runbei
 
Posts: 15
Joined: 2008-12-29 20:47
Location: Mountain View, CA

Re: Downgrading grub2

Postby jago25_98 » 2011-11-20 22:22

Another thing that cheeses me off about grub is how are you supposed to find the root filesystem?

When upgrading Ubuntu and when trying to install Sabyron I found I was left with grub on the MBR but no menu entries. I then had to keep guessing with

Code: Select all
root (hd0,0)


until I found the scsi disk. I then also had to use

Code: Select all
kernel /boot/kernel root=/dev/sda1


It was annoying since there is 6 drives in the system and I didn't know which one has the root FS.
So I had to translate what grub calls it to what linux calls it. This took a lot of trial and error, trial and error that really I feel grub should be helping me with.

In general it would have been easier to boot to a liveCD.
jago25_98
 
Posts: 7
Joined: 2006-01-16 16:55
Location: uk

Previous

Return to Installation

Who is online

Users browsing this forum: No registered users and 4 guests

fashionable