LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-20-2007, 08:24 PM   #1
swampdog2002
Member
 
Registered: Jul 2005
Distribution: Slackware 12.2, 13.0, openSUSE 11.2
Posts: 400

Rep: Reputation: 33
Booting from the /boot partition


I recently set up one of my Slackware 11 machines with multiple partitions as follows:

/dev/hda1 as /swap
/dev/hda2 as /boot
/dev/hda3 as /
/dev/hda4 as /home

When I edited lilo.conf to set

root = /dev/hda2

I receive a kernel panic upon boot, stating that it could not locate init. Currently, the lilo entry is set for /dev/hda3, which is the / drive. My questions are as follows:

1. What parameters do I need to add to lilo.conf to allow to boot from my /boot partition (dev/hda2) for init?

2. Should the /boot partition be set for the bootable flag, or should this be set to /dev/hda3? I currently have it set to the /boot partition, even though it boots from the / partition.

3. Should I even be booting from the /boot partition, or leave it set to the / partition?

I've just gotten around to establishing multiple partitions for my hard drive as I've read numerous posts of others doing the same thing, but have a few concerns about doing so. Any help is greatly appreciated. Thanks.
 
Old 02-20-2007, 09:00 PM   #2
ygloo
Member
 
Registered: Aug 2006
Distribution: slack
Posts: 323

Rep: Reputation: 30
did you run "lilo" after making the changes to lilo.conf?

Last edited by ygloo; 02-20-2007 at 09:32 PM.
 
Old 02-21-2007, 07:30 AM   #3
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Quote:
Originally Posted by swampdog2002
I recently set up one of my Slackware 11 machines with multiple partitions as follows:

/dev/hda1 as /swap
/dev/hda2 as /boot
/dev/hda3 as /
/dev/hda4 as /home

When I edited lilo.conf to set

root = /dev/hda2

I receive a kernel panic upon boot, stating that it could not locate init. Currently, the lilo entry is set for /dev/hda3, which is the / drive. My questions are as follows:

1. What parameters do I need to add to lilo.conf to allow to boot from my /boot partition (dev/hda2) for init?

2. Should the /boot partition be set for the bootable flag, or should this be set to /dev/hda3? I currently have it set to the /boot partition, even though it boots from the / partition.

3. Should I even be booting from the /boot partition, or leave it set to the / partition?

I've just gotten around to establishing multiple partitions for my hard drive as I've read numerous posts of others doing the same thing, but have a few concerns about doing so. Any help is greatly appreciated. Thanks.

Hi,

My first question is to why you need to set /boot as the init?

If you go through the kernel init you will see the reasoning for the /. KISS! <- 'Keep it simple stupid', Seems to be a good reason.

You could use a initrd to allow the init using /boot. But why? What gains are you expecting?

There is nothing wrong with having multiple partitions. You can get some advantage by using multiple partitions. Especially in the server arena. Even as a desktop, especially if you are using multiple distros. I really don't want to get into a debate here about partitions, since this can be a touchy subject for many.
 
Old 02-21-2007, 07:31 AM   #4
swampdog2002
Member
 
Registered: Jul 2005
Distribution: Slackware 12.2, 13.0, openSUSE 11.2
Posts: 400

Original Poster
Rep: Reputation: 33
Yes I did run /sbin/lilo after making the changes, but I still received an error regarding not being able to find init when booting from /dev/hda2, which is the /boot partition. Do I need to pass any parameters in lilo.conf to direct the kernel to init?
 
Old 02-21-2007, 07:39 AM   #5
swampdog2002
Member
 
Registered: Jul 2005
Distribution: Slackware 12.2, 13.0, openSUSE 11.2
Posts: 400

Original Poster
Rep: Reputation: 33
Quote:
My first question is to why you need to set /boot as the init?
In case that my / partition is not accessible, due to either unforeseen circumstances or a format, I would like to have /boot remain to keep all of my kernel settings.

Quote:
You could use a initrd to allow the init using /boot. But why? What gains are you expecting?
I'm not expecting any gains, other than having a separate partition for /boot. Again, in case I decide to reinstall Slackware, all of my kernel settings will be intact within the /boot partition, rather than having to save them to an external media of sorts and then copy them back over once the reinstall is complete.

How would I use an initrd in this case if I wanted to boot from the /boot partition?

Last edited by swampdog2002; 02-21-2007 at 07:43 AM.
 
Old 02-21-2007, 01:21 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
Assuming that you have lilo installed in the MBR, you should have something like:
Code:
boot = /dev/hda
image = /boot/vmlinuz
  root = /dev/hda3
  label = linux-2.6.18
  read-only
Apart from the partition numbers, I use the same setup with /boot on its own partition and the settings work fine without an initrd (my file system and controller support is compiled into the kernel, not as modules).
 
Old 02-21-2007, 02:36 PM   #7
swampdog2002
Member
 
Registered: Jul 2005
Distribution: Slackware 12.2, 13.0, openSUSE 11.2
Posts: 400

Original Poster
Rep: Reputation: 33
I have a similar setup as well. My question is, though, if I wanted to change the setup:

Code:
root = /dev/hda3
to

Code:
root = /dev/hda2
I receive an error upon booting that init was not found, and then the kernel panics. The main concern I have is, though, should I even boot from /dev/hda2, which is my /boot partition, or leave it as /dev/hda3, which is the / partition. Thanks.
 
Old 02-21-2007, 03:58 PM   #8
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
The root keyword is to specify the device that should be mounted as root. In your case, you should have it set to /dev/hda3, not /dev/hda2. After you change the setting, re-run lilo and it should work for you.
 
Old 02-21-2007, 06:52 PM   #9
bioe007
Member
 
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654

Rep: Reputation: 30
@swampdog-

I think you're confusing the /boot with where your system actually 'boots' to. When you start linux, it loads a kernel image, from /boot (which can be a partition or a directory). Your 'system' actually runs from a few different places (mostly / & usr/).

Are you thinking that your not looking in /dev/hda2 for kernel images etc? And/Or that after startup /dev/hda2 is not listed as your /boot directory?

You can change your lilo.conf to explicitly reflect the /boot partition to look for the image argument there by:

boot=/dev/hda2 # this tells lilo the path to the kernel images, etc
image = /boot/vmlinuz
root = /dev/hda3 # this tells lilo where you root filesystem is, dont change this one (echo gilead )
label = linux-2.6.18
read-only

So you can also check your fstab: if there is an entry that says '/dev/hda2 /boot ...' then after starting up you are indeed using /dev/hda2 as the /boot directory.

If not then /boot is a directory thats really on your /dev/hda3 partition, and you can change it by adding an fstab line.

* Just be sure to run /sbin/lilo after modifiying your fstab so lilo is looking in the correct (new) /dev/hda2=/boot path.

++ if during slackware install you chose to mount /dev/hda2 as boot, then your system should already be properly configured.

Last edited by bioe007; 02-21-2007 at 06:54 PM.
 
Old 02-21-2007, 07:19 PM   #10
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Just a dumb question, but did you copy the /boot directory contents to new /boot directory (/dev/hda2) before trying all this? I believe you need an fstab entry, as well. IOW, you have to mess with the thing while it's working and then make the leap of faith that it will work when you reboot. Also, /dev/hda2 must be a primary partition, and not a logical partition. It's probably a good idea to have a liveCD on hand, just in case.
 
Old 02-21-2007, 07:47 PM   #11
swampdog2002
Member
 
Registered: Jul 2005
Distribution: Slackware 12.2, 13.0, openSUSE 11.2
Posts: 400

Original Poster
Rep: Reputation: 33
Quakeboy02,

The /boot partition, along with all of the others, were set up using fdisk prior to installing Slackware. The /etc/fstab entries for all of the partitions are in order as well.

bioe007,

Somehow I missed the logic of the boot = /dev/hda2 area in /etc/lilo.conf. I have changed this to /dev/hda2 and kept root = /dev/hda3. I don't know why I didn't realize this at first, but I believe that I have everything in order now. Sometimes it takes me a while to see what is obvious to others. Thanks for all of your help. Really, I don't know if I needed to perform any of this initially, but I enjoy the learning process, no matter how silly it makes me look or feel

Last edited by swampdog2002; 02-21-2007 at 07:55 PM.
 
Old 02-21-2007, 08:27 PM   #12
bioe007
Member
 
Registered: Apr 2006
Location: lynnwood, wa - usa
Distribution: archlinux
Posts: 654

Rep: Reputation: 30
Quote:
Originally Posted by swampdog2002
Somehow I missed the logic of the boot = /dev/hda2 area in /etc/lilo.conf. I have changed this to /dev/hda2 and kept root = /dev/hda3.
So its working now then?

Quote:
Originally Posted by swampdog2002
I don't know why I didn't realize this at first, but I believe that I have everything in order now. Sometimes it takes me a while to see what is obvious to others. Thanks for all of your help. Really, I don't know if I needed to perform any of this initially, but I enjoy the learning process, no matter how silly it makes me look or feel
you can see my # of posts for how many times i've asked what is an 'obvious' question

Slackware is all about helping others.. I'll bet in the not-to-distant future you may answer a post of mine that is an 'obvious' problem..
 
Old 02-22-2007, 08:43 AM   #13
swampdog2002
Member
 
Registered: Jul 2005
Distribution: Slackware 12.2, 13.0, openSUSE 11.2
Posts: 400

Original Poster
Rep: Reputation: 33
Quote:
So its working now then?
Yes, everything appears to be as it should. Of course, with the way I usually "experiment" with different aspects of my machines, this is subject to change, and in a short matter of time Thanks for your assistance.
 
  


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
Booting XP resets boot flag to its partition gavinbeatty Linux - General 6 12-26-2006 07:04 PM
[SOLVED] Creating and booting from a separate /boot partition eldiener Linux - General 5 11-12-2006 06:13 PM
boot fails when booting from lvm partition jlatl69 Linux - Newbie 6 03-07-2006 06:23 AM
Booting more than one linux - GRUB and \boot partition questions rozoweskarpetki Linux - Newbie 8 05-25-2005 05:58 AM
When booting from a CD I can't boot from my root partition. sharpie Linux - Newbie 3 01-28-2004 05:20 PM

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

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