SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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?
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.
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).
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.
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.
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.
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.
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.
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..
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.