LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 05-10-2013, 09:41 AM   #1
flokofcgulls
Member
 
Registered: Apr 2013
Posts: 79

Rep: Reputation: Disabled
After reboot, liloconfig not working and lilo.conf missing


So I'm finally working on installing Slackware last night, everything is going well. I manually installed LILO using the liloconfig script, which worked fine but I forgot to make a setting I needed in my lilo.conf for my dual-boot setup, so I thought no big deal, I'll just boot from the CD and fix it up real quick...right?

This lead to an interesting situation. After booting from the disc, I opened all my encrypted LVM's, mounted them under /mnt, and chroot'ed into it. When I tried to edit my lilo.conf, I found it was not there. There was a lilo.conf_example but it didn't look like what I'm used to seeing.

So I thought I could just run liloconfig and have it create a new lilo.conf for me, but when I do that nothing happens, it just returns me to a prompt on the next line, with no messages or errors or anything. If I run it directly after the install but before rebooting it works fine, but after a reboot it just stops silently with no indication as to why.

One other little thing I noticed, was that when I chroot into my mounted install folders, there was no color coding, every folder in root was listed in white text, and my prompt never changed. When I exit and run ls on the live system, the color coding is present. I'm not sure if this is normal behavior, but it caught my attention.

So I guess my question in in three parts:

1) Why does my lilo.conf disappear when I reboot after install?

2) Why does liloconfig stop working after I reboot?

3) Does Slackware handle mounting a system and using chroot to access it differently than other distros?
 
Old 05-10-2013, 09:55 AM   #2
tuxbg
Member
 
Registered: Sep 2012
Location: Bulgaria,Varna
Distribution: Slackware64
Posts: 249

Rep: Reputation: Disabled
1) and 2 ) How you reboot your system ?
3) Yes.
 
Old 05-10-2013, 10:04 AM   #3
flokofcgulls
Member
 
Registered: Apr 2013
Posts: 79

Original Poster
Rep: Reputation: Disabled
I used Ctrl-Alt-Del to reboot.

To mount my system afterwards, I use the following commands:

mkdir /mnt/root
mount /dev/vgroot/root /mnt/root
mount /dev/vghome/home /mnt/home
mount /dev/sda3 /mnt/root/boot
mount -o bind /proc /mnt/root/proc
mount -o bind /dev /mnt/root/dev
mount -o bind /sys /mnt/root/sys
chroot /mnt/root

These commands are based from my previous experience with other distros, but the color-coding thing was what led to my thinking that perhaps something may be different here.

*Edit: I forgot to include the unencrypted /boot partition, corrected

Last edited by flokofcgulls; 05-10-2013 at 04:51 PM.
 
Old 05-10-2013, 12:51 PM   #4
P.T.Firefly
LQ Newbie
 
Registered: Jul 2006
Location: England
Distribution: Slackware
Posts: 1

Rep: Reputation: 0
I would think that the simplest explanation is that the etc/lilo.conf used during installation is not the /etc/lilo.conf on your encrypted root partition. If you're also getting a vanilla profile when logging in, it could be that sample profile files are not being installed to give you e.g. colorised ls. It would seem that the etc directory being used during installation is not the one on disk. Are there other .conf.samp files which do not have corresponding .conf files, for example is networking configured? It may be helpful to investigate exactly what is mounted where during installation.

My first post, so here's hoping I'm not talking out of my derriere!
 
Old 05-10-2013, 01:06 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,580
Blog Entries: 2

Rep: Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037
Do you have a separate /boot partition? Lilo is not able to boot directly from an encrypted /-partition or LVM, but I can't see you mounting that partition. Also, have you tried to run the liloconfig script from within pkgtool? I found this to work better sometimes.
 
Old 05-10-2013, 03:19 PM   #6
yenn
Member
 
Registered: Jan 2011
Location: Czech Republic
Distribution: Slackware, Gentoo
Posts: 153

Rep: Reputation: 21
Quote:
Originally Posted by flokofcgulls View Post
One other little thing I noticed, was that when I chroot into my mounted install folders, there was no color coding, every folder in root was listed in white text, and my prompt never changed. When I exit and run ls on the live system, the color coding is present. I'm not sure if this is normal behavior, but it caught my attention.

[...]

3) Does Slackware handle mounting a system and using chroot to access it differently than other distros?
It's normal. I'm not sure if it's possible to source profile scripts during chrooting, but you could try a little "trick" from Gentoo handbook.
Code:
# chroot /mnt/root /bin/bash
# source /etc/profile
# export PS1="(chroot) $PS1"
Last command is optional, but really useful if you need to do non-trivial changes and don't want to get lost between liveCD and chrooted environment.

Last edited by yenn; 05-10-2013 at 03:28 PM.
 
Old 05-10-2013, 05:03 PM   #7
flokofcgulls
Member
 
Registered: Apr 2013
Posts: 79

Original Poster
Rep: Reputation: Disabled
@P.T. Firefly: That was my initial thought as well, so I booted from the disc thinking that I could run liloconfig from there and create another one, but I was unable to do so. As for the color-coding in the chroot environment, I thought that this was a feature of ls, but you and another poster mentioned something about profiles so my ideas about that must be incorrect.

@TobiSGD: I neglected to include that line in my earlier post this morning, but yes I do have an un-encrypted boot partition. I edited my earlier post to reflect that, thanks for pointing that out. As for running liloconfig from pkgtool, no I have not tried that. I was attempting to just run it from the command line, but I'm going to try this out and see what happens here in a bit.

@yenn: Thanks for confirming this, I thought that it might be, but combined with the prompt not changing (which I'm used to seeing in other distros) I couldn't help but feel like there must be something else going on here. I don't mind living without the color-coding in chroot, it was just an observation I made and I honestly wasn't sure if it was related to my issue or not, so I thought I'd mention it. tuxbg replied earlier that Slackware does indeed handle chroot differently, but didn't elaborate on how exactly, so I don't know if the commands I'm using are correct in this case.

I'm going to try running liloconfig from pkgtool as TobiSGD suggested and I'll report back with the results.
 
Old 05-10-2013, 07:44 PM   #8
flokofcgulls
Member
 
Registered: Apr 2013
Posts: 79

Original Poster
Rep: Reputation: Disabled
Well, the good news is that running liloconfig from pkgtool worked. It complained about not being able to detect my video hardware and falling back to text-only mode, but it creates a new lilo.conf file that I can edit as needed, which is exactly what I was after. Still kinda curious why it disappears after every reboot though, I don't recall having that problem in the virtual machine I used to test all of this, I'll have to go back and check.

However, I'm faced with a new problem now...kernel panic: can't mount root filesystem...that ought to be interesting. Gonna try to hack around on my own and see if I can figure it out without opening another thread...but I may be back if that's ok. =)

Thanks for all the replies and suggestions, much appreciated!
 
Old 05-10-2013, 09:11 PM   #9
astrogeek
Senior Member
 
Registered: Oct 2008
Distribution: Slackware: 12.1, 13.1, 14.1, 64-14.1, -current, FreeBSD-10
Posts: 1,776

Rep: Reputation: 603Reputation: 603Reputation: 603Reputation: 603Reputation: 603Reputation: 603
Quote:
Originally Posted by flokofcgulls View Post
However, I'm faced with a new problem now...kernel panic: can't mount root filesystem...that ought to be interesting. Gonna try to hack around on my own and see if I can figure it out without opening another thread...but I may be back if that's ok. =)
When you run lilo you should not be in the chroot environment, all the real boot mount points must be mounted and valid.

[EDIT]
That was written in an interrupted hurry... let me say it better...

When you run lilo, the real boot/ location (i.e., lilo image=... location) must be mounted and visible exactly as it appears in the lilo stanza, which is probably not true within your chroot environment unless you have made it so.

Also, your root=... device at boot time must be the same as specified in your lilo.conf, which might differ from what appears when you boot to DVD and chroot.

In other words, make sure that your lilo.conf boot/ is mounted when you run lilo, and that the root/ agrees with exists at boot time. - Hope that helps.

[/EDIT]

Last edited by astrogeek; 05-10-2013 at 09:37 PM.
 
Old 05-11-2013, 09:44 AM   #10
flokofcgulls
Member
 
Registered: Apr 2013
Posts: 79

Original Poster
Rep: Reputation: Disabled
@astrogeek: I have the /boot partition mounted within the chroot, and the only errors I've seen when running lilo were something about not detecting my video hardware. I also see the changes I made to lilo.conf properly reflected in the MBR after rebooting, which indicates that lilo is working correctly.

The root= is a little different story because of the LUKS/LVM setup. I have an encrypted root partition on /dev/sda4, which when opened and activated maps to /dev/vgroot/root, and have created an initrd using the built-in script. If I'm remembering right, passing the -C option with /dev/sda4 is the part of the command that tells initrd to open the LUKS container there during boot, and this is handled by the rc.S script.

I suspect that something with the initrd/rc.S is not performing this step for some reason, but I'm not sure why yet. I had this all setup in a virtual machine before attempting it on the real thing, and had it all working in there, and I'm pretty sure I did the exact same thing on the laptop now. I still have the VM so I was thinking about taking a look at it later today to see if I can find any differences in the two.

I was a little hesitant to dive into this new problem in the same thread, I was thinking that wasn't good forum etiquette since future problem-solvers might have a hard time finding the solution if it's under a different title. I traditionally read far more than post, so I might be overly cautious about things like that. =)
 
Old 05-11-2013, 10:17 AM   #11
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,580
Blog Entries: 2

Rep: Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037
Quote:
Originally Posted by flokofcgulls View Post
I was a little hesitant to dive into this new problem in the same thread, I was thinking that wasn't good forum etiquette since future problem-solvers might have a hard time finding the solution if it's under a different title.
Indeed. Please open a new thread for your new topic and mark this one as solved.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Missing /etc/lilo.conf File Ani Slackware 1 04-03-2012 12:07 PM
[SOLVED] Slackware 13.37 - /etc/lilo.conf changes not working jdgr Slackware 2 02-07-2012 02:48 PM
Typo in slackware-current/source/a/lilo/liloconfig drumz Slackware 7 02-22-2008 12:53 PM
missing lilo.conf after installation Guciacz Debian 2 02-06-2005 11:03 AM
Lilo.conf missing! glaz Slackware 9 01-27-2005 04:02 PM


All times are GMT -5. The time now is 03:17 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration