LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-30-2008, 08:35 PM   #1
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
12.1 with Grub


This may sound stupid, but I've never switched bootloaders before. I've set up syslinux to boot USB and CF cards, but obviously never while I was running them. Thus said...

What is the surest (and simplest if possible) way of getting rid of Lilo and installing Grub in its place? I have to take out my drive sort-of frequently and as I was told in my last thread, Lilo doesn't really take kindly to switching hard drives. I end up with 9's all over my screen.

Any help is appreciated.
 
Old 06-30-2008, 08:50 PM   #2
slackass
Member
 
Registered: Apr 2006
Location: SE Texas
Distribution: Slack64-15.0
Posts: 910

Rep: Reputation: 90
Hi phantom_cyph.

Just install the grub package thats on the Installation disk in the extra folder.
Then run:
grubconfig
 
Old 06-30-2008, 10:08 PM   #3
orbit
Member
 
Registered: Sep 2006
Location: Australia
Distribution: Slackware
Posts: 176

Rep: Reputation: 30
Hi phantom_cyph,

After you have setup GRUB; if you want, you can use my /boot/grub/menu.lst file as a reference to setup your system with some extra options.

Hope this Helps

Cheers

Orbit

menu.lst:
Code:
# GRUB configuration file '/boot/grub/menu.lst'.
# generated by 'grubconfig'.  Sat Aug 18 21:37:20 2007
#
# The backup copy of the MBR for drive '/dev/hda' is
# here '/boot/grub/mbr.hda.3954'.  You can restore it like this.
# dd if=mbr.hda.3954 of=/dev/hda bs=512 count=1
#
# Start GRUB global section
timeout 2
#color light-gray/blue black/light-gray
# End GRUB global section

color light-gray/blue black/light-gray

## Splash image!
# splashimage (hd0,0)/boot/grub/slackware.xpm.gz
# End GRUB global section

-=-=-=-=-=-=-=-=-=-==-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
# Linux bootable partition config begins
title Crazed-Weasel-Linux
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hda1 ro vga=791 quiet splash=silent #acpi=force
initrd /boot/initrd-2.6.24.5-smp-IDE--[orbit].gz
# initrd /boot/initrd-2.6.24.5-smp-SATA--[orbit].gz
# (use SATA initrd if using a SATA HDD).
# (change /dev/hda* entries to /dev/sda*, here and in /etc/fstab if you change to SATA initrd).
---------------------------------
title Recovery-Mode
root (hd0,0)
kernel /boot/vmlinuz-huge-smp-2.6.24.5-smp root=/dev/hda1 ro vga=791
# Linux bootable partition config ends
-=-=-=-=-=-=-=-=-=-==-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

# Other bootable partition config begins
# ** Use only one of the following multiboot configs, not both.

## This config will enable Dual-Boot with Linux/Win-XP on Two Hard-Drives.
## N.B. Attach Linux HDD as Pri-Master ...  and Windows HDD as Pri-Slave.
## Un-Comment (remove #) the following six lines to activate multi-boot.
#  title Winwoes XP
#  map (hd0) (hd1)
#  map (hd1) (hd0)
#  rootnoverify (hd1,0)
#  makeactive
#  chainloader +1
-----------------------------------
## This config will enable Dual-Boot with Linux/Win-XP on the same Hard-Drive.
## N.B. Linux is hda1, linux swap is hda2 .. Windows is hda3
## Un-Comment (remove #) on the following six lines to activate this multi-boot. 
# title Winwoes XP
# map (hd0,2) (hd0,0)
# map (hd0,0) (hd0,2)
# rootnoverify (hd0,2)
# makeactive
# chainloader +1

# Other bootable partition config ends
-=-=-=-=-=-=-=-=-=-==-=-=--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

## This section has been removed to clean the Grub startup menu, it is not necessary.
#title --- For help press 'c', type: 'help'
#root (hd0)
#title --- For usage examples, type: 'cat /boot/grub/grub.txt'
#root (hd0)
 
Old 07-03-2008, 09:34 PM   #4
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
Perhaps the following will help:

Installing GRUB
 
Old 07-04-2008, 03:29 AM   #5
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
Reading you original posts it looks like you are simply swapping one drive for another and then back again. So if you install lilo to drive A and drive B is completely seperate you should be able to remove and replace drive A as much as you like with lilo working fine.

The 99's you are seeing are apparently because the drive geometry doesn't match what the Bios says or a bad map file.

I noticed that you are installing lilo to /dev/hda1 partition rather the MBR (/dev/hda). I've seen reports that installing lilo to the MBR may fix the 99 problem.

You may find this useful http://www.wlug.org.nz/LiloErrorCodes
 
Old 07-05-2008, 11:14 PM   #6
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472

Original Poster
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
Quote:
Originally Posted by bgeddy View Post
Reading you original posts it looks like you are simply swapping one drive for another and then back again. So if you install lilo to drive A and drive B is completely seperate you should be able to remove and replace drive A as much as you like with lilo working fine.

The 99's you are seeing are apparently because the drive geometry doesn't match what the Bios says or a bad map file.

I noticed that you are installing lilo to /dev/hda1 partition rather the MBR (/dev/hda). I've seen reports that installing lilo to the MBR may fix the 99 problem.

You may find this useful http://www.wlug.org.nz/LiloErrorCodes
During Slackware's setup, I specifically told it to install to the MBR. If it didn't, its not something I did.

I haven't had time to get around to installing Grub yet, but will try soon.
 
Old 07-06-2008, 08:24 AM   #7
bgeddy
Senior Member
 
Registered: Sep 2006
Location: Liverpool - England
Distribution: slackware64 13.37 and -current, Dragonfly BSD
Posts: 1,810

Rep: Reputation: 232Reputation: 232Reputation: 232
The lilo.conf you gave :
Quote:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/hda1
#message = /boot/boot_message.txt
prompt
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
The line boot=/dev/hda1 sets lilo to install to the hda1 partition. Something strange happening here. It may be worth trying to install to the MBR to see if this fixes your problem.
 
Old 08-19-2008, 05:02 PM   #8
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Rep: Reputation: 31
Installing grub in slackware 12.1

I attempted to install grub using the grub package in the /extras directory on the install dvd.
I started by copying the grub*.tgz to the desktop then ran:
Code:
root@Slacklinux:/home/gary/Desktop# installpkg grub*.tgz
Installing package grub-0.97-i486-6...
PACKAGE DESCRIPTION:
grub: grub (GNU GRUB Legacy bootloader)
grub:
grub: This is the legacy (0.9x) version of GNU GRUB, the GRand Unified
grub: Bootloader.  GRUB is an alternative to other familiar bootloaders
grub: such as LILO.  Unlike LILO, it loads a kernel through direct file-
grub: system support rather than a block list so it does not need to be
grub: updated if a new kernel is installed.
grub:
grub: Also included is Kent Robotti's 'grubconfig' tool (similar to the
grub: Slackware 'liloconfig' setup tool).
grub:

root@Slacklinux:/home/gary/Desktop#
root@Slacklinux:/home/gary/Desktop# grubconfig

ERROR: Can't find 'stage1' from the grub package.
If you have the grub package installed, you should have a
/usr/lib/grub, /usr/share/grub, or /usr/local/share/grub
directory, containing the stage files.
root@Slacklinux:/home/gary/Desktop#
/user/lib/grub exists; /usr/local/share/grub also exists, but it is empty.

here is a list of the contents of /usr/lib/grub:
Code:
gary@Slacklinux:~$ ls -l /usr/lib/grub/*
-rw-r--r-- 1 root root   8608 2008-03-27 13:34 /usr/lib/grub/e2fs_stage1_5
-rw-r--r-- 1 root root   8448 2008-03-27 13:34 /usr/lib/grub/fat_stage1_5
-rw-r--r-- 1 root root   7648 2008-03-27 13:34 /usr/lib/grub/ffs_stage1_5
-rw-r--r-- 1 root root   7648 2008-03-27 13:34 /usr/lib/grub/iso9660_stage1_5
-rw-r--r-- 1 root root   9344 2008-03-27 13:34 /usr/lib/grub/jfs_stage1_5
-rw-r--r-- 1 root root   7776 2008-03-27 13:34 /usr/lib/grub/minix_stage1_5
-rw-r--r-- 1 root root  10496 2008-03-27 13:34 /usr/lib/grub/reiserfs_stage1_5
-rw-r--r-- 1 root root    512 2008-03-27 13:34 /usr/lib/grub/stage1
-rw-r--r-- 1 root root 117834 2008-03-27 13:34 /usr/lib/grub/stage2
-rw-r--r-- 1 root root 117834 2008-03-27 13:34 /usr/lib/grub/stage2_eltorito
-rw-r--r-- 1 root root   8000 2008-03-27 13:34 /usr/lib/grub/ufs2_stage1_5
-rw-r--r-- 1 root root   7136 2008-03-27 13:34 /usr/lib/grub/vstafs_stage1_5
-rw-r--r-- 1 root root  10248 2008-03-27 13:34 /usr/lib/grub/xfs_stage1_5

/usr/lib/grub/i386-pc:
total 344
-rw-r--r-- 1 root root   8608 2008-03-27 13:34 e2fs_stage1_5
-rw-r--r-- 1 root root   8448 2008-03-27 13:34 fat_stage1_5
-rw-r--r-- 1 root root   7648 2008-03-27 13:34 ffs_stage1_5
-rw-r--r-- 1 root root   7648 2008-03-27 13:34 iso9660_stage1_5
-rw-r--r-- 1 root root   9344 2008-03-27 13:34 jfs_stage1_5
-rw-r--r-- 1 root root   7776 2008-03-27 13:34 minix_stage1_5
-rw-r--r-- 1 root root  10496 2008-03-27 13:34 reiserfs_stage1_5
-rw-r--r-- 1 root root    512 2008-03-27 13:34 stage1
-rw-r--r-- 1 root root 117834 2008-03-27 13:34 stage2
-rw-r--r-- 1 root root 117834 2008-03-27 13:34 stage2_eltorito
-rw-r--r-- 1 root root   8000 2008-03-27 13:34 ufs2_stage1_5
-rw-r--r-- 1 root root   7136 2008-03-27 13:34 vstafs_stage1_5
-rw-r--r-- 1 root root  10248 2008-03-27 13:34 xfs_stage1_5
gary@Slacklinux:~
It looks to me like the stage files are there. What went wrong?
 
Old 08-19-2008, 06:40 PM   #9
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
I think you have to copy stage1, stage2 and other required *stage* files in /boot/grub
Do you have a /boot/grub directory yet ?
(If you have enough space, you can copy all stage files in /boot/grub)

Last edited by keefaz; 08-19-2008 at 06:41 PM.
 
Old 08-19-2008, 11:01 PM   #10
jong357
Senior Member
 
Registered: May 2003
Location: Columbus, OH
Distribution: DIYSlackware
Posts: 1,914

Rep: Reputation: 52
Just run "grub-install /dev/hda". It'll copy all those files for you along with installing to the MBR.

You'll need to make the directory /boot/grub first and have a working grub.conf or menu.lst
 
Old 08-20-2008, 10:22 AM   #11
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Rep: Reputation: 31
keefaz: Thanks for the reply. Will re-try after I fix the damage I've already done to the system (its a virtual machine running on a suse host)

EDIT:
jong357 -- Thankyou for the reply,

Last edited by garyg007; 08-20-2008 at 10:40 AM.
 
Old 08-20-2008, 02:26 PM   #12
garyg007
Member
 
Registered: Aug 2008
Location: north-east ohio
Distribution: Debian-squeeze/stable;
Posts: 279
Blog Entries: 1

Rep: Reputation: 31
The doc/articles that I had read failed to mention that the "grub" folder in the /extra folder on the install dvd needed to be copied to /boot. Did it with:
Code:
cp /media/cdrom/extra/grub/*.* /boot/grub
Once I did that everything appeared to work -- except i wasn't able to get grub to replace lilo by using "grubconfig"
I ended up using
Code:
grub-install /dev/hdx
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing GRUB-GRUB, GRUB-LILO and vice versa andreas_skw Linux - Newbie 1 06-05-2008 06:40 AM
grub failed to load linux (grub think ext3 partition as fat) khairilthegreat Linux - Newbie 7 08-09-2007 12:12 PM
GRUB menu.lst/grub.conf file with multiple partitions dasy2k1 Linux - General 1 04-19-2007 08:42 AM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 12:55 PM
Why grub prompt after installing Grub inder Debian woody 3.0r2? velan Debian 1 04-20-2004 04:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration