LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 01-19-2006, 03:39 PM   #1
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Rep: Reputation: 45
GRUB - How do I do I set it up from the command line


This is my Lilo boot

Code:
# Modified by YaST2. Last modification on Thu Jan 19 23:15:50 SAST 2006

menu-scheme = Wb:kw:Wb:Wb
timeout = 80
lba32
change-rules
reset
read-only
prompt
default = Linux
message = /boot/message
boot = /dev/hda


image = /boot/vmlinuz
###Don't change this comment - YaST2 identifier: Original name: linux###
    label = Linux
    append = "selinux=0  resume=/dev/hdc5  splash=silent showopts"
    vga = 792
    initrd = /boot/initrd
    root = /dev/hdc1


other = /dev/hda1
###Don't change this comment - YaST2 identifier: Original name: windows 1###

    label = XP


image = /boot/vmlinuz
###Don't change this comment - YaST2 identifier: Original name: failsafe###
    label = Failsafe
    append = "showopts ide=nodma apm=off acpi=off noresume selinux=0 nosmp noapic maxcpus=0 edd=off 3"
    initrd = /boot/initrd
    root = /dev/hdc1
What can I do have GRUB load these?
 
Old 01-19-2006, 03:52 PM   #2
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Do you have grub installed? Are you just trying to translate your lilo.conf to a grub.conf? What are you trying to do here?
 
Old 01-19-2006, 04:15 PM   #3
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
That is my lilo.conf file. I want to install grub. The filesystems that I want to appear are those that are in my lilo.conf above.
 
Old 01-19-2006, 04:37 PM   #4
bulliver
Senior Member
 
Registered: Nov 2002
Location: Edmonton AB, Canada
Distribution: Gentoo x86_64; Gentoo PPC; FreeBSD; OS X 10.9.4
Posts: 3,760
Blog Entries: 4

Rep: Reputation: 78
Well, have you read the grub docs? Have you even tried this yourself? The difference in syntax is really not that much different, and if you simply search for a grub.conf file you should be able to translate it yourself.

At least give it a shot yourself, and if you have problems then ask about them.
 
Old 01-24-2006, 04:00 PM   #5
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
I've follwed the instructions here: http://www.gnu.org/software/grub/manual/grub.html . More specifically Section 3.

Code:
# grub-install /dev/hda

grub> find /boot/grub/stage1
 (hd1,0)
 (hd1,5)

grub> root (hd1,0)

grub> setup (hd0)

grub> kernel /boot/vmlinuz

grub> boot
The above was run in SUSE (hd1,0). Although the SUSE partition is actually hdc1. I am able to boot XP and FC4. But not SUSE. I get an Error 17.

This is the result of:

Code:
# cat /etc/grub.conf
setup --stage2=/boot/grub/stage2 (hd2,0) (hd2,0)
setup --stage2=/boot/grub/stage2 (hd0) (hd2,0)
quit
I see now nothing refers to a initrd as well.

Last edited by Jongi; 01-24-2006 at 04:54 PM.
 
Old 01-26-2006, 10:22 AM   #6
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
Here is the menu.lst

Code:
# cat /boot/grub/menu.lst
# Modified by YaST2. Last modification on Wed Jan 25 20:08:30 SAST 2006

color white/blue black/light-gray
default 0
timeout 8
gfxmenu (hd1,0)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title SUSE LINUX 10.0
    root (hd1,0)
    kernel /boot/vmlinuz root=/dev/hdc1 selinux=0  resume=/dev/hdc5  splash=silent showopts
    initrd /boot/initrd

###Don't change this comment - YaST2 identifier: Original name: Fedora Core (2.6.11-1.1369_FC4) (/dev/hdc6)###
title Fedora Core 4
    kernel (hd1,5)/boot/vmlinuz-2.6.11-1.1369_FC4 root=LABEL=/ vga=792 ro rhgb quiet
    initrd (hd1,5)/boot/initrd-2.6.11-1.1369_FC4.img

###Don't change this comment - YaST2 identifier: Original name: windows 1###
title windows 1
    chainloader (hd2,0)+1

###Don't change this comment - YaST2 identifier: Original name: floppy###
title Floppy
    chainloader (fd0)+1

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- SUSE LINUX 10.0
    root (hd1,0)
    kernel /boot/vmlinuz root=/dev/hdc1 showopts ide=nodma apm=off acpi=off noresume selinux=0 nosmp noapic maxcpus=0 edd=off 3
    initrd /boot/initrd
FC4 boots without issue. Same with XP.

Here is the fdisk output

Code:
# fdisk -l

Disk /dev/hda: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        9963    80027766    7  HPFS/NTFS

Disk /dev/hdc: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1        3917    31463271   83  Linux
/dev/hdc2            3918       30401   212732730    f  W95 Ext'd (LBA)
/dev/hdc5            3918        4048     1052226   82  Linux swap / Solaris
/dev/hdc6            4049        6894    22860463+  83  Linux
/dev/hdc7            6895        8853    15735636   83  Linux
/dev/hdc8            8854       10681    14683378+  83  Linux
/dev/hdc9           10682       21125    83891398+  83  Linux
/dev/hdc10          21126       27653    52436128+  83  Linux
/dev/hdc11          27654       29089    11534638+   b  W95 FAT32
/dev/hdc12          29090       30401    10538608+   b  W95 FAT32

Disk /dev/hdd: 81.9 GB, 81964302336 bytes
255 heads, 63 sectors/track, 9964 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdd1   *           1        9964    80035798+   7  HPFS/NTFS

Disk /dev/sda: 131 MB, 131072000 bytes
16 heads, 63 sectors/track, 253 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         251      126472+   6  FAT16

Last edited by Jongi; 01-26-2006 at 10:32 AM.
 
Old 01-26-2006, 02:04 PM   #7
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Original Poster
Rep: Reputation: 45
So now it works. I still can't install GRUB from YaST but the install from the command line worked.

I changed the following in the BIOS:

Boot Hard Drive: From HDD-0 to HDD-3 (I'm not sure this made much of a difference because even after I had run fixmbr from the XP disk it was booting XP - the primary master drive)

Access mode (the one with Auto,LBA,CHS and Large) for the 250GB HD that SUSE is on: From Auto to Large.

Reboot into SUSE.

# grub-install /dev/hda

I noticed that the device map file had changed from

/boot/grub/device.map.old
Code:
(fd0)   /dev/fd0
(hd0)   /dev/hda
(hd1)   /dev/hdc
(hd2)   /dev/hdd
to

/boot/grub/device.map
Code:
(fd0)   /dev/fd0
(hd3)   /dev/sda
(hd1)   /dev/hdc
(hd0)   /dev/hdd
(hd2)   /dev/hda
Then ran:
# grub
> find /boot/grub/stage1
Code:
(hd1,0)
(hd1,5)
> root (hd0,0)
> setup (hd0)
> kernel /boot/vmlinuz
> boot

This produced
/boot/grub/menu.lst
Code:
# Modified by YaST2. Last modification on Wed Jan 25 20:08:30 SAST 2006

color white/blue black/light-gray
default 0
timeout 8
gfxmenu (hd1,0)/boot/message

###Don't change this comment - YaST2 identifier: Original name: linux###
title SuSE Linux 10.0
    root (hd1,0)
    kernel /boot/vmlinuz root=/dev/hdc1 selinux=0  resume=/dev/hdc5  splash=silent showopts vga=792
    initrd /boot/initrd


###Don't change this comment - YaST2 identifier: Original name: Fedora Core (2.6.11-1.1369_FC4) (/dev/hdc6)###
title Fedora Core 4
    kernel (hd1,5)/boot/vmlinuz-2.6.11-1.1369_FC4 root=LABEL=/ vga=792 ro rhgb quiet
    initrd (hd1,5)/boot/initrd-2.6.11-1.1369_FC4.img

###Don't change this comment - YaST2 identifier: Original name: windows 1###
title Windows XP
    chainloader (hd2,0)+1

###Don't change this comment - YaST2 identifier: Original name: floppy###
title Floppy
    chainloader (fd0)+1

###Don't change this comment - YaST2 identifier: Original name: failsafe###
title Failsafe -- SUSE LINUX 10.0
    root (hd1,0)
    kernel /boot/vmlinuz root=/dev/hdc1 showopts ide=nodma apm=off acpi=off noresume selinux=0 nosmp noapic maxcpus=0 edd=off 3
    initrd /boot/initrd
I obviously changed the XP title after it worked.

Last edited by Jongi; 01-26-2006 at 02:13 PM.
 
  


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
How to set up DNS via command line? johnnybhoy67 Linux - Networking 5 10-21-2005 09:59 AM
How to set Gateway by command line vanhelsing Linux - Networking 1 07-17-2004 11:42 AM
How to set the $PATH on command line? huangyanfeng Programming 3 11-07-2003 12:59 AM
How do i set up svga for command line greendusk Linux - Newbie 2 09-27-2003 09:17 AM
How do i set my command line resolution greendusk Linux - General 1 09-26-2003 05:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 05:21 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