Grub/ Grub2/ Lilo - canīt install any of them properly!
I usually install grub straight away after an install but this time it hasnīt worked for some reason after installing 13.1 on a new lappy.
I have tried grub, grub2 (from sbo) and lilo; nothing I install into MBR will boot my slackware installation, I have to use the boot USB stick every time. grub-legacy would be my preferred one so iīll ask for help specifically with that. This is what iīm doing so far - Code:
root@poppy:/boot/grub# cat /etc/fstab Checking /boot/grub, I see that no menu.lst has been created. Code:
root@poppy:/boot/grub# ls So I tried Code:
grubconfig Code:
Cheers spoov |
Looks like your mixing grub legacy and grub2?
grub legacy uses a menu.lst while grub2 uses a grub.cfg assuming you have grub installed, not grub2 (they will conflict) First, make a menu.lst for /boot/grub title Slackware root (hd0,0) kernel initrd open term, become root, do grub root (hd0,0) setup (hd0) quit should report success or failure |
Yeah I tried grub2 first but couldnīt get it to work, so removepkg-ed it and installed grub instead. I thought it might cause problems but hoped that everything was over-writable so wouldnīt be too much of a problem.
Anyway i did as you suggest, this is the output - Code:
grub> root (hd0,0) |
I get the grub menu, but when i select ĻSlackwareĻ I get
Code:
Error 1: Filename must be either an absolute pathname or blocklist Code:
root (hd0,0) |
no, you gotta fill it in
kernel /boot/name-of-kernel ro root=/dev/sda1 initrd /boot/name-of-initrd |
ah i see. Problem is I don't have an initrd in my boot partition. -
Code:
spoovy@poppy:/boot$ ls |
the dont put the initrd parameter
wait, why do you have different kernels? you have every kernel LOL what is your machine 486 or 686? smp or no? if its new lappy either use vmlinuz-huge-smp-2.6.33.4-smp or vmlinuz-generic-smp-2.6.33.4-smp the diff is with the generic kernel it is smaller but has less features and you need an initrd with the generic one the huge-smp doesnt need an initrd what does "ls -al" report about vmlinuz? vmlinuz should be a symlink to your running kernel if it's vmlinuz-huge-smp-2.6.33.4-smp then thats ok so, it would be title Slackware root (hd0,0) kernel /boot/vmlinuz ro root=/dev/sda1 |
I tried that setup, but still no luck. I get "File not found". It's finding /boot partition ok but can't seem to find the kernel. I tried
Code:
root (hd0,0) This is uname -a, from within the Slackware installation we are talking about - Code:
Linux poppy 2.6.33.4-smp #2 SMP Wed May 12 22:47:36 CDT 2010 i686 Genuine Intel(R) CPU 575 @ 2.00GHz GenuineIntel GNU/Linux Symlink in /boot seems to be ok - Code:
bash-4.1$ ls -lA | grep vmli |
oh
what partition is /boot on? and what partition is root / on? |
my fstab is posted in my op. /boot is sda1, / is sda2.
I have just read a little about smp. I understand that this is for symmetric processing therefore for multi-core processors. This machine is a single-core processor. Would that mean that I am running the wrong kernel? It works, once it's booted. |
I'm a bit confused because you are looking at "poppy" Linux with "uname" but apparently trying to install Slackware for booting. It is the version and kernel of the Slackware system that is important for booting Slackware, not the version of Linux you are using to install/configure GRUB.
SMP - Symetric-Multiprocessing (supports multiple CPUs in one OS) root - Means different things in different situations. Location of GRUB's files when installing GRUB (use "root" command) Location of kernel and initrd files in a "menu.lst" entry (use "root" command) Location of Linux OS files and root file system in a menu.lst entry ("root=" of "kernel" command) I've had the least problems installing GRUB when I use a GRUB boot CD or floppy and install GRUB from the native GRUB command line. That means boot only GRUB and press C to get the GRUB command line. Then enter GRUB commands to install GRUB. You can find instructions for that in the GRUB "info" pages or I can create an ISO image for you. If you look in the "/boot/grub" directory you should see the files required for GRUB. GRUB legacy requires these files to support all types of booting. Code:
iso9660_stage1_5 ufs2_stage1_5 Code:
title Linux Code:
rm vmlinuz Boot from a grub floppy disk or CD, or make sure that the "device.map" file has the correct information for the Linux system that you are using to install GRUB (not what you are going to boot with grub). IMPORTANT: DO NOT change the BIOS default boot disk or device boot order after configuring and installing GRUB. The DOS drive ID's (hd0), (hd1), etc. are defined based on the BIOS configuration. To install GRUB you specify two important locations.
For example, these GRUB commands will install GRUB to boot from the MBR (Master Boot Record) of the first hard disk, and load the GRUB files from the first partition on the first hard disk. Code:
root (hd0,0) Code:
root (hd0,0) Code:
root (hd0,2) Here is how I usually install GRUB.
I use GRUB legacy because it is very simple and flexible. LILO is nearly as flexible except for the need to re-run "lilo" after configuration changes. There is a difference between the environment when GRUB is being run from Linux versus when it is booting a system (native mode). When you type an identifier such as (hd0) GRUB has to convert that into a device identifier. On Linux that is done using "device.map" or by looking at information about devices in the kernel. From native booting mode, the BIOS is given a device ID and that is mapped to a disk by the BIOS. (hd0) BIOS device ID 80 (hex) (hd1) BIOS device ID 81 (hex) (hd2) BIOS device ID 82 (hex) (hd3) BIOS device ID 83 (hex) In some cases GRUB running on Linux cannot correctly determine the correct drive mapping or cannot access the boot sectors for installing GRUB. In that case you have to install GRUB from native mode by booting a GRUB floppy or CD to enter commands. Press "C" during the grub boot menu in order to enter GRUB commands. If you change BIOS settings after you install GRUB then the BIOS device ID's may change. Even when the assignment for the first BIOS device ID (80) does not change, a BIOS may change assignments of IDs to other disks. Many people are confused about boot sectors. There are basically 5 boot sectors on the first hard disk.
The BIOS only knows about hard disks (drive ID 80..83), not partitions. The BIOS always loads and runs the Master Boot Record sector of the first hard disk (80 hex). The standard boot sector software in the Master Boot Record looks for the Primary Partition marked as "active" (the "boot" partition). It loads and runs the boot sector for the "active" boot partition. The boot sector software in each Primary partition usually loads and starts the boot loader who's files are in that same Primary partition. If you "setup" GRUB to start from the Master Boot Record then the only way to start other boot loaders is by chaining to them. The "active" partition is ignored since the GRUB boot sector replaces the standard MBR software. There is very little advantage to installing GRUB to the MBR and it can cause problems for other operating systems. If you "setup" GRUB to start from a partition boot sector then you can use the "active" boot flag in the partition table to choose which boot loader starts up first. That can be GRUB if you want. Usually you "setup" GRUB to start from the partition that contains GRUB's files. The only time that you really must install grub to the Master Boot Record is when you need five different boot loaders and the other four are installed to the Primary partition boot sectors. Some people feel that installing GRUB to the MBR is easier than installing GRUB to the Linux partition's boot sector. I have found the reverse to be true as modifying the MBR has a tendency to break Windows booting and un-installing GRUB from the MBR prevents booting other operating systems. My suggestion is to install GRUB to a Linux partition's boot sector and then mark that partition as "active" for boot if you want GRUB to start first. If you have no other operating systems then you may have to format the disk or write the standard boot code into the MBR first. You should at least be able to get GRUB to start up and press "C" for command mode. At that point you can manually enter commands to boot the kernel even when "menu.lst" is incorrect. When you boot a kernel (and associated initrd) the kernel file and initrd file do not have to be in the same place as the root file system used by Linux. You specify the location of the root file system in the kernel parameters using "root=". You can put all your kernel and initrd files in the same place if you want. I find it less confusing to put the kernel and initrd files for each Linux system in that Linux system's root partition. You only need one working copy of GRUB and there is no reason to have GRUB chain to a different version of GRUB. It's less confusing if you don't install a GRUB for each Linux OS. In fact you can even create a separate, small Primary partition just for GRUB. Depending on your needs, you can also put all the kernel and initrd files in the same small partition with GRUB. That may be helpful for encrypted file systems, for example. To install GRUB successfully you need to know where you will put the GRUB files "/boot/grub" and also how you will start GRUB. Your choices for starting GRUB are basically the MBR versus a Linux Primary partition's boot sector. To boot Linux successfully you need to know where the kernel/initrd files are located "/boot". You will also need to know the root device where that kernel's Linux OS is installed. The disk containing the kernel/initrd files is specified by the "root" command of the "menu.lst" entry. Both the kernel and initrd must be in the same partition. The root device for the OS files is specified by the "root=" kernel parameter in the "kernel" command for the menu.lst entry. If you use a name such as "vmlinuz" or "initrd" that may be a symbolic link, make sure that the link goes to the correct files. If you build your own kernel you can also remove the symbolic links and create actual files called "vmlinuz" and "initrd". Each Linux OS can have its own "vmlinux" symbolic link located in its "/boot" directory of its root partition. The "root" menu option specifies the partition for those two files. |
Quote:
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! |
I believe that the problem booting is due to specifying a "boot"
directory name when in fact, the directory name should not be specified. Code:
title Linux You could also solve the problem by creating an extra symbolic link. Code:
cd /boot Then you can use either "kernel /vmlinuz" or "kernel /boot/vmlinuz" in "menu.lst". |
You might try one or more of the utilities found here: http://www.supergrubdisk.org/
They can often be helpful in rescuing a GRUB installation. |
EricFl is right
I never use a /boot partition...never really understood why anyone does.. but I think thats the issue |
All times are GMT -5. The time now is 11:41 AM. |