LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Grub/ Grub2/ Lilo - canīt install any of them properly! (https://www.linuxquestions.org/questions/slackware-14/grub-grub2-lilo-can%B4t-install-any-of-them-properly-844367/)

Erik_FL 11-15-2010 04:01 PM

Quote:

Originally Posted by linus72 (Post 4159885)
EricFl is right
I never use a /boot partition...never really understood why anyone does..
but I think thats the issue

Usually the reason is because the Linux root file system is encrypted and can't be accessed by GRUB. The file system for "/boot" has to be unencrypted. Creating a "/boot" mount point makes the directory layout look normal. I believe I may have also seen some distros use the extra symbolic link that I mentioned in my previous (edited) post.

Except for my painful experience installing Linux on fake hardware RAID I wouldn't have learned a lot about GRUB booting. I have to say that the painful experience was with Slackware 10. At that time Slackware was the only distro that I could figure out how to boot from my RAID. Today, Slackware is much easier to install on fake hardware RAID. Slackware has made exceptional progress in adding flexibility and support for unusual boot requirements.

spoovy 11-15-2010 04:23 PM

Well, I tried removing the /boot section of the menu.lst line as suggested. Completely forked it up. Kernel panic ensued, and it also somehow stopped my USB boot stick from working so I can't get into my slack installation at all.

I dug out an old super grub disk from somewhere and that can't boot it either. I'm in puppy linux at the moment trying to get back into slackware to sort something out - i will try to put in the extra simlink as you suggest.

I hate Grub with a passion, I have as little to do with it as possible, and i'm remembering why again.


Additional - I created the simlink, tried to boot again, still kernel panic. Error message says something about not syncing - unable to find init.

MrUmunhum 11-15-2010 04:36 PM

Quote:

Originally Posted by spoovy (Post 4159835)
FYI its the same installation. I am currently booting into it using the boot usb stick I created at install time. I am trying to set up grub so I don't need the usb stick.

I will read through the rest of your post in a bit = thanks!

If you are booting off a USB stick then the order of the disks is changing. hd0 is your USB disk and then hd1 would be your first hard drive.

spoovy 11-15-2010 04:54 PM

Finally!

Code:

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

Did the trick. I thought I had tried this before, but maybe I was missing something.

Thanks very much for your help guys, very much appreciated!!

linus72 11-15-2010 05:39 PM

No doubt!
now, I suggest you make or get a compatible slackware livecd/usb to fix anything if it ever gets messy again. Better than using Puppy or some other non-slack distro!
That's why I made the MiniSC and MiniSCR, runs just like Slax
their slackware -current but I have one that has both the slackware 2.6.33.4-smp kernel and a 2.6.35.6 kernel too. the latest one only has 2.6.35.7-smp kernel
MiniSCR (R= rescue) (best for persistent usb)
http://multidistro.com/NFLUXNEW/SQ4/...os/miniscr.zip

see here
http://linux.softpedia.com/get/Syste...ue-60734.shtml
Quote:

The Mini Rescue comes with Both the 2.6.33.4-smp kernel and also the 2.6.35.6 i686 custom kernel with BFS, BFQ, Tuxonice, Aufs2 & Squashfs-lzma
Wanna go almost 100% slackware compatible go with a Salix OS 13.1.2 livecd/usb
http://www.salixos.org/wiki/index.php/Download

and i can easily show you how to make your own installable/persistent hdd/usb rescue cd with desktop,etc
or just remaster one
Good luck on your adventures in Slackware!

Zarniwoop79 11-16-2010 02:14 AM

I also think that the separate boot-partition might be the issue. I recently installed Slackware 13.1 and created a separate boot-partition (for information, the reason for this is that on older PCs, but maybe not anymore, be BIOS (?) couldn't handle boot partitions larger than X mb so it was recommended to create a boot-partition which was smaller than 1 GB/1024MB).

I couldn't get it to boot, so I tried installing with everything on the same partition, and then it worked.

For my installation I had lilo as boot manager though as that was the default.

spoovy 11-16-2010 03:23 AM

A Salix USB would make a handy backup certainly, i'll give that a go.

You are probably right that the boot partition is the problem, but I normally use one as I normally encrypt mobile devices. I only didn't bother this time as I was in a hurry and there doesn't seem to be an easy way to encrypt with the Slackware installer - I intend to reinstall Slackware on this lappy soon but using encrypted LVM.

Hopefully it will be easier next time now I know more about how grub works and I will definately have a Salix USB rescue installation!

Thanks again.

markkie 11-16-2010 03:46 AM

Eric Fl Thank you for the excellent 'Howto'/description of Grub! It is by far the best I have read on the very confusing complex subject.

spoovy 11-16-2010 02:06 PM

+1 ^

It should be a wiki article if it isn't already.

Richard Cranium 11-17-2010 01:29 AM

Grub2 uses grub-mkconfig to generate a configuration file for you. It appears to work fairly well, although I've written a /etc/grub.d/09_slackware_linux file (based off the 10_linux file that comes with the grub2 slackbuild) that attempts to match the way Slackware does things versus (I guess) Debian's way.

I've got a mix of SATA and SCSI drives, a root partition on lvm, a separate /boot ext2 partition and a Windows XP drive. grub-mkconfig managed to find everything and provided valid menu entries. (Well, the 10_linux menu generator script appears to believe that you would use an available initrd with any kernel that has the same version number.)

MrUmunhum 11-17-2010 06:08 PM

Quote:

Originally Posted by linus72 (Post 4159885)
EricFl is right
I never use a /boot partition...never really understood why anyone does..
but I think thats the issue

If you are using an older PC with a weak BIOS that does not support bigger disk, you need to use a boot partition close to the front of the drive.

JZL240I-U 11-19-2010 06:35 AM

Just a brief remark: You need some code in the MBR, since (as EricFL pointed out) the BIOS loads that code first. THis MBR-code then starts GRUB proper. If necessary GRUB can put that code in the MBR.

Reason I mention this: If you build your own machine or buy a new disk and have no OS running yet you have to install this code once -- in this case by GRUB.


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