LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation
User Name
Password
Slackware - Installation This forum is for the discussion of installation issues with Slackware.

Notices


Reply
  Search this Thread
Old 09-01-2006, 03:33 PM   #1
IDK
LQ Newbie
 
Registered: Apr 2006
Posts: 10

Rep: Reputation: 0
Question 2linux on different partitions won't boot


This is maybe a grub/lilo Q but since both are affected I guess it's Slackware that is the problem. This could be false

I got one linux installed on my hda2 and then I installed slackware on hda6 from packages I downloaded to hda7.

The prob is that when I try to boot with Grub or Lilo it won't work.
Lilo tells me:
Fatal: open /boot/initrd.gz: No such file or directory

For this entry:
image=/boot/initrd.gz
label=Slackware
root=/dev/hda6
read-only

In GRUB I can install, but I can't boot anyway.

Both GRUB and Lilo are installed on the linux on hda2.

Here's some misc facts:

dsl@box:/etc$ lilo -v
LILO version 22.5.7.2, Copyright (C) 1992-1998 Werner Almesberger
Development beyond version 21 Copyright (C) 1999-2003 John Coffman
Released 20-Aug-2003, and compiled at 23:02:13 on Aug 26 2003
Compiled for Debian GNU/Linux.


dsl@box:/etc$ grub --version
grub (GNU GRUB 0.91)


Happy programming wishes Niklas Ulvinge aka IDK
 
Old 09-01-2006, 06:15 PM   #2
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
Quote:
Originally Posted by IDK
...
Lilo tells me:
Fatal: open /boot/initrd.gz: No such file or directory

For this entry:
image=/boot/initrd.gz
label=Slackware
root=/dev/hda6
read-only
That's because the file does not exist... what else can I say?
Do this as root
Code:
ls -l /boot/
and check the results. You should have a /boot/vmlinuz file. Change that line in the /etc/lilo.conf file to
Code:
image=/boot/vmlinuz
Type to install the loader:
Code:
lilo -v
And review what else it says. If everything went OK, then it should work.
I can't help you with GRUB.
 
Old 09-02-2006, 02:45 AM   #3
IDK
LQ Newbie
 
Registered: Apr 2006
Posts: 10

Original Poster
Rep: Reputation: 0
I have the file, but on /dev/hda6 and not on /dev/hda2

I don't want to mix the filesystems.
 
Old 09-02-2006, 09:26 AM   #4
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
Quote:
Originally Posted by IDK
I have the file, but on /dev/hda6 and not on /dev/hda2
I don't want to mix the filesystems.
I don't understand how you could mix the filesystems.
You only need one working lilo.conf file on a system to boot any system on your machine, just mount all the boot directories before doing the lilo -v command (as I have to mount my /mnt/suse10.1 partition for the boot directory in there to be available when installing lilo)
I'm posting my office machine's lilo.conf file, it boots some different kernels, a memory testing application, and a SuSE system on a different partition; I hope it serves as a guide for you:
Quote:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/sda
message = /boot/boot_message.txt
timeout = 50
prompt
# Override dangerous defaults that rewrite the partition table:
compact
lba32
change-rules
reset
vga=792
# VESA framebuffer console @ 1024x768x64k
#vga = 791
# Normal VGA console
# vga = normal
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sda1
label = Slack_2.6.17.11
read-only
image = /boot/vmlinuz_2.6.17.8
root = /dev/sda1
label = Slack_2.6.17.8
read-only
image = /mnt/suse10.1/boot/vmlinuz
root = /dev/sda3
label = SuSE10.1
initrd = /mnt/suse10.1/boot/initrd
append = " splash=silent resume=/dev/sda5 showopts desktop"
read-only
image = /boot/memtest.bin
root = /dev/sda1
label = memtest
read-only
# Linux bootable partition config ends
Feel free to ask any doubt.
 
Old 09-02-2006, 12:46 PM   #5
IDK
LQ Newbie
 
Registered: Apr 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks that solved it.

I still think it's confusing...

When booting /mnt/hda6 isn't mounted so it shouldn't be possible to give that as a path.
In fact, nothing should be mounted, not even /dev/hda2

So how could /mnt/hda6 work, when /dev/hda6 doesn't?

I don't get it
 
Old 09-02-2006, 01:27 PM   #6
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
Quote:
Originally Posted by IDK
When booting /mnt/hda6 isn't mounted so it shouldn't be possible to give that as a path.
In fact, nothing should be mounted, not even /dev/hda2
When booting, lilo asks for an image to load and mounts the corresponding root partition at the root directory ( / ) and then checks and mounts the needed filesystems for that OS found in a fstab file (likely /etc/fstab). So when you boot from hda6, it is not at /mnt/hda6, but it is the root ( / ) partition of the system installed there.
Basically, for lilo, it is only important to give the proper image and the corresponding root partition (check again my lilo.conf), everything else should fall in place by itself.
I hope this had helped you more than do worse.
So, it is already working fine right?
 
Old 09-02-2006, 03:01 PM   #7
IDK
LQ Newbie
 
Registered: Apr 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by raska
When booting, lilo asks for an image to load and mounts the corresponding root partition at the root directory ( / ) and then checks and mounts the needed filesystems for that OS found in a fstab file (likely /etc/fstab). So when you boot from hda6, it is not at /mnt/hda6, but it is the root ( / ) partition of the system installed there.
Exactly, then I should give relative paths to it, like /boot/vmlinuz
Quote:
Originally Posted by raska
I hope this had helped you more than do worse.
So, it is already working fine right?
Yes it works, but I want to undestand why and how.

This is my working configuration:
Code:
image=/mnt/hda6/boot/vmlinuz
	label=Slackware
	root=/dev/hda6
	initrd=/mnt/hda6/boot/initrd.gz
	read-only
 
Old 09-04-2006, 09:56 AM   #8
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
Quote:
Originally Posted by IDK
....Exactly, then I should give relative paths to it, like /boot/vmlinuz...
No because the given configuration on /etc/lilo.conf is only used then you install the loader, i.e. when you type lilo -v.
That's why in my former post I started with "When booting...".
When booting, right after the BIOS seeks for something to boot in a disk's MBR, the bootloader is started and uses the installed information on the MBR or the root partition, wherever you said to install itself, to load the given image(s) (which is not in the MBR but near after it) or an arbitrary partition (i.e. when booting something else than linux). The bootloader doesn't care for your configuration on /etc/lilo.conf (it can see it anyway), only when you install it -- That's why you need to reinstall lilo when you change kernel version, because the new image in /boot/vmlinuz is different than the one installed for the bootloader, if you change kernel without reinstalling lilo and reboot you shall get the old-already-there kernel.

Here, you might get a clearer idea.

Last edited by raska; 09-04-2006 at 09:57 AM.
 
Old 09-04-2006, 11:00 AM   #9
IDK
LQ Newbie
 
Registered: Apr 2006
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by raska
No because the given configuration on /etc/lilo.conf is only used then you install the loader, i.e. when you type lilo -v.
That's why in my former post I started with "When booting...".
When booting, right after the BIOS seeks for something to boot in a disk's MBR, the bootloader is started and uses the installed information on the MBR or the root partition, wherever you said to install itself, to load the given image(s) (which is not in the MBR but near after it) or an arbitrary partition (i.e. when booting something else than linux). The bootloader doesn't care for your configuration on /etc/lilo.conf (it can see it anyway), only when you install it -- That's why you need to reinstall lilo when you change kernel version, because the new image in /boot/vmlinuz is different than the one installed for the bootloader, if you change kernel without reinstalling lilo and reboot you shall get the old-already-there kernel.

Here, you might get a clearer idea.
Yes I get that, but are you saying that lilo copies the kernel and boot loader to the MBR (or after it), and only uses those?
 
Old 09-04-2006, 11:33 AM   #10
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
I'm not sure if lilo copies it all to the MBR or just notes where the kernel image(s) is lying on the disk. It depends with 32-bit LBA BIOS compatibility and such things.
 
Old 09-04-2006, 01:15 PM   #11
IDK
LQ Newbie
 
Registered: Apr 2006
Posts: 10

Original Poster
Rep: Reputation: 0
OK, there we have it, it takes note of where it lies on the disk.

One problem with that though.
What if I move the kernel image to a temporary dir, and then move it back. Then it could be on another place on the drive and then it's easy to forget to run lilo again...

OK, it's not a prob, but rather a design oddity...

Thanks for your time raska
 
Old 09-04-2006, 01:40 PM   #12
raska
Member
 
Registered: Aug 2004
Location: Aguascalientes, AGS. Mexico.
Distribution: Slackware 13.0 kernel 2.6.29.6
Posts: 816

Rep: Reputation: 31
mmmmm..... I hadn't tried to move the kernel image, I don't know if that would screw up the system... well I'm aware that when being root there are innumerable ways to easily screw up a linux system.

Quote:
Originally Posted by IDK
......Thanks for your time raska
No problem! You are welcome ^_^
 
  


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 Dual Boot Partitions fireemblem555 Linux - General 2 10-17-2005 06:16 AM
cloning both partitions, dual boot system, master boot record, logical volume manager saranga2000 Linux - Hardware 3 01-10-2005 11:04 AM
Boot partitions, how many can I have or should I have. dalek Linux - General 12 11-16-2003 10:53 PM
lilo-2linux+win? mtb Linux - Software 4 03-24-2003 08:22 AM
boot partitions newlinuxman Linux - Software 4 09-16-2001 11:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - Installation

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