LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   GRUB 0.97: no 64-bit version? (https://www.linuxquestions.org/questions/slackware-14/grub-0-97-no-64-bit-version-4175451920/)

kikinovak 02-27-2013 10:29 AM

GRUB 0.97: no 64-bit version?
 
Hi,

I wanted to fiddle with GRUB 0.97 (for a course on bootloaders), and I remember Slackware had always featured it in extra/. Curious thing: it's available indeed, but only for 32-bit Slackware.

How comes there's no GRUB 0.97 for Slackware64?

gnashley 02-27-2013 10:54 AM

The legacy grub sources will not build on a 64-bit arch -I think more because of the grub *program* than because of the grub *bootloader*. It will boot 64-bit kernels though (with patch to sources), so if you know how to create a menu.lst and are able to install the bootloader someway, then you can use it on a 64-bit machine.

slackass 02-28-2013 11:29 AM

I've been using grub 0.97 from 32 bit /exta on Slack64 systems by installing to a separate very small, unmounted partition.

Erik_FL 02-28-2013 10:41 PM

On a 64-bit system you can use the "grub" package from the 32-bit version of Slackware.
You can run "grub" using Alien Bob's multilib packages or boot "grub" from a CD or floppy to use the "native" command mode.

Even without the multilib packages "grub" will boot a 64-bit kernel. Without multilib you have to install "grub" using a grub boot CD or floppy. Use "info grub" to find out how to create the grub boot CD or floppy disk.

To boot from the hard disk using "grub", copy the files from "/usr/lib/grub/i386-pc" to "/boot/grub" and then create the file "/boot/grub/menu.lst" with your boot menu configuration. The "/boot/grub" directory can be in the same partition as your 64-bit kernel. You don't need a separate partition for "grub".

Unfortunately you can't copy or edit files using the "grub" command mode. You will have to copy the files to "/boot/grub" and create "menu.lst" using the Slackware setup CD or some other OS. However, if you boot a "grub" CD or floppy you can type in commands to boot Linux from the hard disk.

Code:

root (hd0,0)
kernel /boot/vmlinuz root=/dev/sda1 ro
boot

You can also put a "menu.lst" file on the boot CD or floppy with a menu entry for booting Linux on the hard disk.

After the files are copied to the hard disk, boot from the "grub" CD or floppy and press "C" to go into "grub" command mode.

You type in two commands to install grub. For example:
Code:

root (hd0,0)
setup (hd0)

The above commands are for installing "grub" to the Master Boot Record of the first hard disk when the "/boot/grub" directory is in the first primary partition on the first hard disk.

To install "grub" to the Partition Boot Sector of the first partition instead of the MBR use these commands.

Code:

root (hd0,0)
setup (hd0,0)

The nice thing about "grub" is that you don't have to re-install "grub" after you change the "menu.lst" file or the Linux kernel files. Usually you just install "grub" once and then edit "menu.lst" as much as you like to change the boot menu. Grub will even work with soft links like "/boot/vmlinuz" and use whatever the links currently point to.

If you have an unusual boot device such as "fake RAID" that LILO can't handle, you may still be able to install "grub" from "native" command mode by booting the grub boot CD or floppy. You also need the required root device and file-system drivers in the kernel or "initrd" so that the Linux kernel can mount the root file-system. I've used either "dmraid" or "mdadm" on Slackware 64-bit with "grub" to boot the kernel and "initrd".

kikinovak 03-01-2013 03:39 AM

Thanks for all the detailed information, guys. I admit I only wanted to give GRUB a spin because unlike LILO there's no 15-character limit to the entry labels. But given the serious other limitations of the software, I guess I'll stick with good old LILO and be happy with entry labels like "MLED64-14.0" instead of "Microlinux Enterprise Desktop 14.0 64-bit".

Cheers,

Niki

rkelsen 03-02-2013 06:14 PM

You may not be able to compile grub legacy, but you can definitely use grub2. I just installed it yesterday on my cousin's laptop. He had a fresh installation of slackware64-14.0 and wanted grub on it.

I used sbopkg to compile and install it. You need to queue up the 3 packages it needs: gnu-unifont, os-prober and help2man then add grub2 to the queue last. Once it is finished downloading, building & installing these 4 packages [less than 5 minutes], it is ready to go. All you need to do is run these two commands:

Code:

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

Code:

# grub-install
It auto-detects all of the operating systems you have installed and adds the appropriate entries to the config file.

At first I wasn't confident about doing this, because I've been using LILO since, well, forever, but it worked... :)

Dunno how it works on an UEFI/GPT system, but on an old-school BIOS/MBR it works very well.

vigi 03-02-2013 10:02 PM

grub setup
 
Quote:

Originally Posted by slackass (Post 4901752)
I've been using grub 0.97 from 32 bit /exta on Slack64 systems by installing to a separate very small, unmounted partition.

I have used this setup with grub0.97 as a boot manager and load each loader to the specific os. I also have Grub4dos setup this way, on a different pc and do not see a difference between it and grub 0.97?

sahko 03-03-2013 05:27 AM

If you find lilo to be inadequate for your purpose you might want to give syslinux a try.
It's a modern bootloader based on the simplicity of lilo.
You will have to do some stuff manually though cause there is no automated way that i know of to make it work as a bootloader on Slackware yet.


All times are GMT -5. The time now is 02:03 AM.