LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-10-2007, 05:46 PM   #1
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Rep: Reputation: 31
lilo root option


I'm experimenting a bit with Linux From Scratch and I want to try if it's bootable. Everything is installed in my home, and since /home is is on /dev/hda7, I want to add something to lilo.conf like:

image = /boot/vmlinuz-2.6.19.2
root = /dev/hda7/user/lfs
label = LFS
read-only

But this is impossible since the root option expects only the "/dev/hda7". Any ideas on how I could solve this?
 
Old 07-10-2007, 07:39 PM   #2
MQMan
Member
 
Registered: Jan 2004
Location: Los Angeles
Distribution: Slack64 14.1
Posts: 581

Rep: Reputation: 38
So, do I understand you have a complete linux filesystem, starting at /home/user/lf, which you want to boot.

You "might" be able to get it to boot with:

image=/user/lfs/boot/vmlinuz-2.6.19.2
root=/dev/hda7

But, my guess is, that it's going to treat /dev/hda7 as the / directory, and start looking there for /etc, which of course it isn't goint to find.

Cheers.
 
Old 07-11-2007, 09:32 AM   #3
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
Had something similar.

Had to use something like this with lilo:

image = /boot/vmlinuz-2.6.19.2
append = "root=/dev/hda7/user/lfs"
root = /dev/hda7
label = LFS
read-only

append tells linux to set that as root and root= tells lilo to boot from that drive (basically).

Last edited by Hern_28; 07-11-2007 at 09:34 AM.
 
Old 07-11-2007, 10:43 AM   #4
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Original Poster
Rep: Reputation: 31
Aah, yes, I see. And what would the /home/user/lfs/etc/fstab file look like?
Following will not work:

Code:
/dev/hda7     /     reiserfs  defaults       1     1
since the root is actually /dev/hda7/home/user/lfs .
 
Old 07-11-2007, 10:52 AM   #5
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
Oops.. typo

image=/user/lfs/boot/vmlinuz-2.6.19.2(this should be the mounted path from the base system to /boot of the created system)
ex image =/mnt/hda1/lfs/boot/vmlinuz(ver).

append = "root=/dev/hda7/user/lfs"
root = /dev/hda7
label = LFS
read-only

Fstab i was able to leave the same base off the appended value. just have to be sure the path exists to /user/lfs/boot exists in the system you are building (and booting) from. Sorry for the typo .

EDIT: Its been a while since I used lilo, so I might be a bit rusty.

Last edited by Hern_28; 07-11-2007 at 11:02 AM.
 
Old 07-11-2007, 11:05 AM   #6
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Original Poster
Rep: Reputation: 31
Sorry, I don't understand the ex image option. I can't seem to find anything about it in the man page. And could you post the fstab line, I'm afraid I don't understand that one either.
 
Old 07-11-2007, 11:33 AM   #7
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
Hmm.

Trying to make it a little easier. Have a couple of options.

1) Could create a link too vmlinuz-2.6.19.2 in or copy it into the /boot directory on /dev/hda7.

Then lilo.conf will look something like:

image=/boot/vmlinuz-2.6.19.2 (the copy or like too the file)
append = "root=/dev/hda7/user/lfs" (system path for /)
root=/dev/hda7 (lilo's answer for which drive)
label=LFS
read-only

2) Try booting as currently setup.

image=/user/lfs/boot/vmlinuz-2.6.19.2 (LFS vmlinuz)
append = "root=/dev/hda7/user/lfs" (system path for /)
root=/dev/hda7 (lilo still booting to hda7)
label=LFS
read-only

The append will hopefully work like a chmod to /user/lfs to test you system and will be set as root for it. Sorry for being sketchy, like I said its been a while. I tried to use settings that would be closer to your setup. I know that I have gotten something line option #1 to work.

Last edited by Hern_28; 07-11-2007 at 11:35 AM.
 
Old 07-11-2007, 11:47 AM   #8
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
Also

Don't remember for sure, I do remember having to do a lot of tinkering to get it to work. But one of the things I can't remember for sure is if append="root=/dev/hda7/user/lfs" worked of I had to use append="root=/user/lfs". Only thing I remember is the next time I created a LFS system I used grub lol.
 
Old 07-11-2007, 11:49 AM   #9
merchtemeagle
Member
 
Registered: Oct 2004
Location: Belgium
Distribution: Slackware 13.37
Posts: 512

Original Poster
Rep: Reputation: 31
Ok, now I understand everything. But I still don't know how to edit the fstab file. If my system under /dev/hda7/user/lfs mounts /dev/hda7 as / , that should give problems, no?

Edit: Maybe I give grub a try, but than this question still holds I think.

Last edited by merchtemeagle; 07-11-2007 at 11:51 AM.
 
Old 07-11-2007, 11:57 AM   #10
Hern_28
Member
 
Registered: Mar 2007
Location: North Carolina
Distribution: Slackware 12.0, Gentoo, LFS, Debian, Kubuntu.
Posts: 906

Rep: Reputation: 38
Grub was easier (once figured out LOL)

The trick is with the append option. The append= sets root wherever you want it so if it works then fstab has no problem and requires no special modification. This keeps /dev/hda7 from being / and sets it somewhere else in this case /user/lfs. root= is just for lilo so it will boot to /dev/hda7 but the append= is where your system setups up / and it will override the root= once the system is booting.

EDIT: WOW... That looks like geek to me.

If nothing is appended then the system assumes that the root= location specified is to be set as root. If the append works correctly, you can cut and paste your current fstab into the LFS system and it should work which is what you want anyway .

Last edited by Hern_28; 07-11-2007 at 07:48 PM.
 
  


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
LILO menu option doesn't work Ed-Slack Slackware 5 09-21-2004 03:23 AM
Which Lilo Boot option is best to use? Stevetgn Mandriva 3 06-29-2004 02:43 PM
New LILO option after updating kernel? chombee Mandriva 2 12-01-2003 07:33 AM
No new kernel-option in LILO after editing lilo.conf corwax Debian 3 08-26-2003 08:55 PM
want to add lilo option to ntloader onlyhuman9 Linux - Software 1 09-21-2001 02:49 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:21 AM.

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