LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slackware64 ext4 grub installation trick/guide (https://www.linuxquestions.org/questions/slackware-14/slackware64-ext4-grub-installation-trick-guide-752713/)

jedi_sith_fears 09-04-2009 12:59 PM

Slackware64 ext4 grub installation trick/guide
 
Since 13.0, Slackware has an official x86_64 port. There is no grub package by default, and if you simply try to install it, you will get an error. A lot of users, including me, prefer grub over lilo.

It is not so much difficult to install grub on Slackware64, and I finally managed to do it. So it I thought it will be helpful for those who are new to Slackware64 and wants the old grub back. Hence the guide. Hope this will help you guys.

First, we have to keep two things in mind :

  • Slackware64 is pure 64-bit, it build binaries only in 64-bit.
  • Its multilib-compatible, just the multilib libraries (here, 32-bit compilers and libraries) are not present.
  • grub can be compiled in only 32-bit mode.
alien(Eric Hameleers) is well-known for slackware packages. He is really kind to make the multilib packages for Slackware64, so we can just use those packages to make our system multilib (like Slamd64).

you can get the packages from http://slackware.com/~alien/multilib/. Here is an excellent guide made by alien http://alien.slackbook.org/dokuwiki/...kware:multilib for how to do it step-by-step.
Quote:

download the following packages form there :
* The gcc compiler suite:
- gcc-4.3.3_multilib-x86_64-4alien.txz
- gcc-g++-4.3.3_multilib-x86_64-4alien.txz
- gcc-gfortran-4.3.3_multilib-x86_64-4alien.txz
- gcc-gnat-4.3.3_multilib-x86_64-4alien.txz
- gcc-java-4.3.3_multilib-x86_64-4alien.txz
- gcc-objc-4.3.3_multilib-x86_64-4alien.txz

* The GNU libc libraries:
- glibc-2.9_multilib-x86_64-3alien.txz
- glibc-i18n-2.9_multilib-x86_64-3alien.txz
- glibc-profile-2.9_multilib-x86_64-3alien.txz
- glibc-solibs-2.9_multilib-x86_64-3alien.txz
- glibc-zoneinfo-2.9_multilib-noarch-3alien.txz

then just upgrade the packages by running:
upgradepkg --reinstall --install-new *.t?z



Next step is to get the grub source (It is inside /extra/source/grub)
from the Install DVD.

Now we have to apply the ext4 patch since by default grub is compiled
without ext4 support. you can get the patch from http://svn.cross-lfs.org/svn/repos/c...7-ext4-1.patch.

Then its quite simple, just modify the grub.SlackBuild file to include
the patch and make the package.

Quote:

There is one last thing left now, go to grub install folder
(by default /boot/grub ) and copy the file e2fs_stage1_5 as ext4_stage1_5.

#cd /boot/grub
#cp -v e2fs_stage1_5 ext4_stage1_5


Now you are all set, just run grubconfig, install grub and edit menu.lst if you wish so.

Voila!! Now you have Slackware64 with grub and ext4. :Pengy:





sahko 09-04-2009 02:35 PM

That is only worth it if you were going to use miltilib for other more important tasks that just booting your Slackware installation.
Just for GRUB this is plain overkill.

Jeebizz 09-04-2009 02:37 PM

It might be overkill, but if someone needs GRUB, this works. Until GRUB can be compiled on a 64-bit system without such procedures, then technically this is the only option.

Woodsman 09-04-2009 03:06 PM

I'm using the legacy GRUB and have done so for as long as I have used GNU/Linux systems. In another thread I asked for people to share caveats with migrating from 32-bit 13.0 to 64-bit 13.0. Related to that thread is this news about GRUB.

Am I to understand correctly from this thread that, if I install 64-bit 13.0 in its own partition(s), that I no longer will be able to use GRUB as already installed as my bootloader? That the currently installed GRUB cannot boot a 64-bit OS?

lumak 09-04-2009 03:09 PM

how is it that grub is hailed as better than lilo (by some users) but is not actively developed to facilitate the development of grub2 which isn't ready for anything more than 'usable,but'?

@ Woodsman
you can't compile grub on 64bit only architecture. However, if you have a 32bit binary of grub, it will still be able to boot any of your partitions provided that you have the 32bit libs that grub requires or you have a static compile of grub. If somebody provides you the grub package for slackware64, you probably only need the glibc multilib packages

Woodsman 09-04-2009 05:58 PM

Quote:

you can't compile grub on 64bit only architecture. However, if you have a 32bit binary of grub, it will still be able to boot any of your partitions provided that you have the 32bit libs that grub requires or you have a static compile of grub.
Okay, that makes sense. Thanks. I never had read anything that GRUB could not be used to load a 64-bit OS. I intend to install 64-bit 13.0 in different partitions from 32-bit 13.0. As the GRUB files will be stored on the 32-bit 13.0, according to your description GRUB should be able to boot the 64-bit version.

slackass 09-04-2009 10:50 PM

I'm using this grub package:
ftp://slackware.mirrors.tds.net/pub/....0/extra/grub/
I use a small boot partition that it's installed to.
After you run:
grubconfig
it boots Slack, Slack64, Slamd64, BW64 - ext3 or ext4.

jedi_sith_fears 09-04-2009 11:28 PM

@sahko

well if you use wine, you also need multilib. grub and wine are two very common packages which are only compiled in 32-bit.

@slackass

can you please a bit elaborate? you use a separate ext3 boot partition?

slackass 09-05-2009 12:06 AM

jedi_sith_fears:
Yes.
My 1st partition is my boot partition. 256 MB

jedi_sith_fears 09-05-2009 12:10 AM

Ok, yes, if you use a ext3 boot partition there is no problem at all. Cheers.

slackd 09-05-2009 07:10 AM

Thnx jedi_sith_fears, works like a charm.

plasmonics 09-05-2009 10:00 AM

I tried the above procedure and now GRUB is working fine on Slackware64. If you use slackpkg to update, you have to remember to blacklist the multilib packages, otherwise they will be overwritten by the standard packages.

jedi_sith_fears 09-05-2009 12:44 PM

Quote:

Originally Posted by plasmonics (Post 3670979)
I tried the above procedure and now GRUB is working fine on Slackware64. If you use slackpkg to update, you have to remember to blacklist the multilib packages, otherwise they will be overwritten by the standard packages.

yes, that is explained in the alien's wiki. I am glad that you are booting now with grub and ext4.

el_b 09-09-2009 10:42 PM

Quote:

Originally Posted by slackass (Post 3670489)
I'm using this grub package:
ftp://slackware.mirrors.tds.net/pub/....0/extra/grub/
I use a small boot partition that it's installed to.
After you run:
grubconfig
it boots Slack, Slack64, Slamd64, BW64 - ext3 or ext4.

Thanks, it worked, but I had to cp -v e2fs_stage1_5 ext4_stage1_5

jedi_sith_fears 09-18-2009 11:49 PM

Yes thats natural since grub comes with only e2fs_stage1_5 by default and booting into ext4 needs a ext4_stage1_5 file to be there. Though on boot messege it shows ext4 as e2fs ... since its just a renaming

tasodan 12-06-2009 10:17 AM

Excuse me, I've a problem:
Quote:

Originally Posted by jedi_sith_fears (Post 3669943)
Now we have to apply the ext4 patch since by default grub is compiled
without ext4 support. you can get the patch from svn.cross-lfs.org/svn/repos/cross-lfs/trunk/patches/grub-0.97-ext4-1.patch.

Then its quite simple, just modify the grub.SlackBuild file to include
the patch and make the package.


How have I modify the grub.SlackBuild? What have I add?

Sigg3.net 03-02-2013 07:38 AM

Quote:

Originally Posted by lumak (Post 3670087)
how is it that grub is hailed as better than lilo (by some users)

I have an old T61 laptop that has some boot issues with any other boot loader. Lilo is easier to configure, but after first boot (which works) it will not boot at all. So, GRUB is my only option to use this old laptop, which works great and stable as soon as it has booted. There's something GRUB legacy and GRUB 2 does, that works. Other than that, I'd be happy to use lilo:)

Hypothesis of boot issues: It's bad capacitors and a SATA controller problem.
I've used this laptop since 2006 (today with an SSD).


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